Javascript Problem

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Arya
Forum Newbie
Posts: 3
Joined: Mon Dec 04, 2006 1:29 am

Javascript Problem

Post 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.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Take a look at JSON - at the very least it's a good way to embed data structures in Javascript.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Javascript Problem

Post 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.
Post Reply