Web Analytics Made Easy -
StatCounter Setting Form Element Value on different page? - CodingForum

Announcement

Collapse
No announcement yet.

Setting Form Element Value on different page?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting Form Element Value on different page?

    I know that you can use this example syntax to set the value of a text box, radio or other form element:
    document.myform.theelement.value = "Whatever..."

    But is it possible to do this on another page without reloading the page?


    Here is why I ask:
    I want a visitor to click on a link to open a pop-up window. Within the window will have various choices. When the form on the pop-up window is submitted, that window closes and sends the value of whatever is selected to a form element on the opening page...the trick being not reloading the main page:

    Any suggestions? Thanks in advance for the help!

  • #2
    Use opener

    opener.document.formName.elementName.value

    Script the submit button in the opened/child window to copy it's values to the opener window. You will have to do this one by one, but if it's not a big form, it's not a big deal.

    I just posted an example of one here http://www.codingforum.net/showthrea...&threadid=1859 that one is just a little more complicated as it generates the content of the child.

    ShriekForth

    Comment

    Working...
    X