Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Retrieving value from HTML->Javascript->Perl

by dws (Chancellor)
on Jul 07, 2002 at 00:30 UTC ( [id://179903]=note: print w/replies, xml ) Need Help??


in reply to Re: Retrieving value from HTML->Javascript->Perl
in thread Retrieving value from HTML->Javascript->Perl

Should read:
win=window.open("cgibin/getPrice.pl?textBox='+text+' ","width=250,height=240")

Nope. Not unless the CGI expects the string to arrive with single quotes around it. I suspect that the right thing to do here is to URL-encode 'textBox', via

win=window.open("cgibin/getPrice.pl?textBox=" + escape(text), "width=250,height=240")

Replies are listed 'Best First'.
Re: Re: Re: Retrieving value from HTML->Javascript->Perl
by TexasTess (Beadle) on Jul 07, 2002 at 00:52 UTC
    I've just written some code almost exactly like this..but it's at work and I'm at home..and my brain is fried so can't remember the EXACT syntax I used however....

    I've found that when trying to use quotes inside a quoted string the CGI converts the ' nicely...but leave the " in and it screws it up...ALSO shouldn't there be a "+" on either side of the variable?
    Texas Tess

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://179903]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-25 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found