Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by dws (Chancellor)
on Jul 07, 2002 at 00:30 UTC ( #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 musing on the Monastery: (11)
As of 2023-12-05 11:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (26 votes). Check out past polls.

    Notices?