Hi,
I have got a list box of numbers. When i choose say "3" then the same page should populate a table with 3 rows. How do i go about doing that? I have no clue...Can anybody help pls? Thanx
Printable View
Hi,
I have got a list box of numbers. When i choose say "3" then the same page should populate a table with 3 rows. How do i go about doing that? I have no clue...Can anybody help pls? Thanx
Could you please post your code. Are you using JavaScript or a server side language?
I am using html and java script. The thing is that i do not know how to go about writing the javascript code. I onky have a drop down list with a few numbers
1) Implement a server side page that returns an xml representation of the data you want displayed in the table.
2) Place a div tag where you want the table to be. Give the div an id that you can reference it by...
3) Develop an xslt that transforms the xml data into the html table. Oh yeah...store this file on the server with the rest of your files.
4) Create an xml data island in your web page and point it to the xslt file.
5) Catch the onchange event of the drop down box
6) Create a javascript procedure (executed onchange of drop down) that will request information from the server page you created using MSXML.HTTP_REQUEST object.
7) Use MSXML2.XSLTemplate object and the xslt file you created to transform the xml received from the server page into the html table.
8) Assign the html output of (7) to the div.innerHTML.
And hey presto, you there!
This might seem like a lot, but there is not much code at all to each step.
Any more questions, dont hesitate to ask.