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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.