| Author |
generating tags when submit button in clicked
|
Ella Rath
Greenhorn
Joined: Apr 19, 2004
Posts: 17
|
|
Hi, i have a simple javascript form with an image and a submit button in my 'home' page. when the image is clicked, the user is taken to another page, 'page2' where he has a form with a select tag and some options. these options allow him to select an image from set of images. now the user selects one of the options and the image he has chosen is displayed on the screen using an appropriate function. the user then clicks on a 'back' button and returns to the 'home' page. here when he clicks on the 'submit' button, a XML file showing his selection is to be displayed ie XML looks like <choice> <figure>D:\My Documents\af.jpg</figure> </choice> the figure tag is dynamic and changes depending on the value chosen by the user. i have the code by which the above XML is generated but it works only in page2 ie as soon as the user makes his selection, the image is displayed and simultaneously the above XML is also generated in a separate window. instead i want this XML to be generated ONLY WHEN THE USER CLICKS ON THE SUBMIT BUTTON in the home page. thanks in advance.
|
 |
Gjorgi Var
Ranch Hand
Joined: Feb 24, 2004
Posts: 85
|
|
If I followed you right in your specification, read the code right and assumed rightly that the function you have constructed that fires up on onclick event creates the things you want up to and including xml and you want only xml to be generated by onclick, then I think you should try to separate xml generating process into new function... I hope this helped, but I apologize if I misunderstood you... [ May 07, 2004: Message edited by: Gjorgi Var ]
|
 |
nilavan oli
Greenhorn
Joined: May 07, 2004
Posts: 1
|
|
If you want to display the images alone, use the same loadfile() method in the onChange event of Select object, like this <select name="sel" onChange="loadfile()"> , this will show the images in new page ,whenever you choose the particular image. u can right a new method in submit button for different purpose. Oli
|
 |
 |
|
|
subject: generating tags when submit button in clicked
|
|
|