passing data
Hello,
I'm relatively new to web programming, and I would appreciate your help. Pardon me for a rather long description, but I'm trying to be specific.
Here is what I'm trying to do:
I have some vbscript code embedded in CSP(crystal server pages, similar to ASP) that displays a custom input form built on the fly for crystal reports. It accepts user input, and then transfers the control to crystal engine to render the report.
I want to be able to do dependent drop down boxes in the input form for each parameter of crystal report, and here is what I am planning to do so far:
In my vbscript, I can output some javascript that will execute on the client side. The javascript will store key-value pair for each drop down in an array, and then populate/depopulate drop downs as user makes selections. For that, I must pass data for each parameter to the client, which Javascript should be able to identify, store and retrieve.
To be able to relate various parameters with each other, I need to pass a bunch of data. For example, a data table for each parameter with key value, value to display in the drop down, return value, what other drop downs depend on it, and their foreign key mappings and such.
Here comes the question:
I would like to be able to pass this information from the server, most of which I'm reading from an XML document or SQL server 2000 through ADO, to the client in a meaningful way (ideally an object that VBscript can populate on the server side and javascript can process on the client side).
How can I accomplish this?
I can put hidden controls in html and populate them with data, which javascript can parse, but how will javascript know the unique names of the controls if each report has different parameters, whose names dictate the html control names?
Thanks a bunch.
|