Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl: the Markov chain saw
 
PerlMonks  

Re: How to pass form data to a onclick=javascript:new.window perl script

by benn (Vicar)
on Feb 17, 2004 at 06:31 UTC ( [id://329565]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to How to pass form data to a onclick=javascript:new.window perl script

As Abigail-II says, this is a javascript problem, but I'll bite...:)

Your parameters need to be read and passed by javascript - they don't exist as CGI values until the form is submitted, and the "window.open" command isn't submitting the form, so you'll need to do something like this, using the DOM's 'value' command...
window.open('http://xww.test.com/cgi-bin/cgiwrap/rootcgi/create_data.p +l?machine_name=' + document.forms[0].machine_name.value + '&reason=' ++ document.forms[0].reason.value,'create_window','');
HTH,
Ben.
  • Comment on Re: How to pass form data to a onclick=javascript:new.window perl script
  • Download Code

Replies are listed 'Best First'.
Re: Re: How to pass form data to a onclick=javascript:new.window perl script
by Asgaroth (Novice) on Feb 17, 2004 at 07:18 UTC
    Hi Ben

    Thats it, it worked, thanks a load for the response, I would never have guessed that!!

    Guess thats why I'm at the bottom of the food chain 8)

    Thanks
    Asgaroth

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://329565]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.