Page 1 of 1
Javascript Problem
Posted: Fri Nov 09, 2007 6:48 pm
by Arya
We are looking for a way of passing generated content into the javascript (via database calls), and then a way of getting the selections back into a form element on the
parent page (perhaps into hidden fields).
We do not know what the content will be in advance, and we don't know how many selections are required.
Does anyone know if this is possible?
Thanks.
Posted: Fri Nov 09, 2007 8:45 pm
by Kieran Huggins
Take a look at JSON - at the very least it's a good way to embed data structures in Javascript.
Re: Javascript Problem
Posted: Sat Nov 10, 2007 6:10 pm
by califdon
Arya wrote:We are looking for a way of passing generated content into the javascript (via database calls), and then a way of getting the selections back into a form element on the parent page (perhaps into hidden fields).
We do not know what the content will be in advance, and we don't know how many selections are required.
Does anyone know if this is possible?
Thanks.
What you described sounds like the perfect application of Ajax technology. There's a lot of information on the web about Ajax. If you already know javascript, Ajax requires almost no additional learning. Ajax can return either JSON, XML or plain text to the javascript in your page, which determines where to put the data in the page without refreshing the entire page.