Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hello monks!

I am trying to connect to my database while the user is filling out the form. It works as such: the user fills out a text box, without submitting the form, I would like to have a pop up window from where the user can have more options that are coming from a database.
Here is my code:
IN HTML I HAVE:
<input type="text" name="textBox" size="8"> <a href="javascript:priceList('form.textBox.value');">Price List</a>
IN JAVASCRIPT I HAVE:
function priceList(text){ win=window.open("cgibin/getPrice.pl?textBox="+text,"","width=250,heigh +t=240") win.creator=self }
IN PERL I HAVE:
use CGI; $q = new CGI; $partNumber = $q->param('textBox'); print ($partNumber);

Thus, as you can see in Perl I am printin the result of what i have got. The result on page that I get is UNDEFINED.
What am I doing wrong?
Thanks Monks I am out of guesses!

In reply to Retrieving value from HTML->Javascript->Perl by peacemaker1820

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-26 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found