This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

generating dynamic tags

 
Yell Srik
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't that what your code is already doing??
I am not sure what you are talking about.
Eric
 
Yell Srik
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Yell Srik
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
thank u. i will work as u suggested.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic