This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi, i need a small clarification regarding the following code code for abc.html:
in the above code, the user on clicking the image is taken to "program.html" where he has select boxes with options. he selects one of the options and then clicks on a 'back' button and returns to "abc.html"and here when he clicks on the submit button, the change() function is to be executed and the following code is to be generated in a separate window:
the value of the pic tag is a dynamic one and changes depending on the option chosen by thte user. code for program.html:
code for change():
i want the change() function to be executed only when the "submit" button in "abc.html" is clicked. how can i implement the above functionality? thanks in advance
Isn't that what your code is already doing?? I am not sure what you are talking about. Eric
Joined: Mar 10, 2004
Hi eric, actually what i want to acheive is that: i want the change() function to be executed only when the submit button in "abc.html" is clicked. the exact point i need clarification is where to place the change() function. currently i have placed it in the "abc.html" page but the change() takes its parameters from the form values in the "program.html" page. the code i have given is not working and i am unable to detect what is the error. hope i have made things clear and waiting to hear from u.
you can't do it like that. You're trying to access form values from an html file which is not loaded... What you can do is put the second html page in a popup window and have the submit for that one pass something back to the calling page which uses it to set some hidden formfields.