• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

generating dynamic tags

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
thank u. i will work as u suggested.
 
reply
    Bookmark Topic Watch Topic
  • New Topic