form and pop up window

They have: 4 posts

Joined: Dec 2001

hi ..i have a form with 3 radio buttons.
I want that when the use clicks on the image button a popup is called, that i already have the function for as below:
-----------------------------
function view_poll_results(vote) {
window.open('poll/pop_up.asp?vote='+vote,'JPOLL','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=yes,scrollbars=no,width=330,height=143');
}
-------------------------------

Im trying something like this ..but i cant get it to work as the variable 'vote' from the form on the main page above is coming through undefinded. I want to keep my main page open which is why im using the pop up. Any ideas ? thanks ..rory

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi Rory,

Sorry to say I'm a little confused, but...

radio buttons are an array (same name, different values) therefore, you cannot simply say "document.formname.buttonname.value" because the browser won't know which button you mean
you need to loop through the array and then get the value. see the "Validating Forms" script/tutorial at my site

Vinny

Where the world once stood
the blades of grass cut me still

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.