[Javascript] Help please on passing a parameter value

Peter Brunone peter at brunone.com
Thu Aug 16 17:38:45 CDT 2001


    You don't have to escape characters unless they're inside a string.
Since you're using the single quotes to delimit the URL, you should remove
the slash (\) before each one.
    Also, enable your error messages in the browser.  In Netscape, you can
get to the good stuff by typing javascript: in the URL window, and in IE you
can double-click the little problem icon down in the status bar when
something goes wrong (which is definitely happening here).

Cheers,

Peter

----- Original Message -----
From: "Herzner, Daniel" <DHerzner at andorcap.com>
To: <Javascript at LaTech.edu>
Sent: Thursday, August 16, 2001 5:28 PM
Subject: [Javascript] Help please on passing a parameter value


| Hi all, I have a situation where I need to pass a value (it's for a
database
| search) through to an .asp page which loads into a pop-up window. When
| testing I would hard code the search value and it gets passed through
| correctly:
|
|
onclick="javascript:Start(\'http://ctintranet.mysite.com/EmployeeSearchForm.
| asp?employee=fred\')"
|
| However, when I try to pass the value dynamically, nothing happens. The
| window doesn't even pop-up:
|
|
onclick="javascript:Start(\'http://ctintranet.mysite.com/EmployeeSearchForm.
| asp?employee="\+document.all.empsrchPrm.value\')"
|
| Can someone please tell me where I'm going wrong. Thanx everyone.
|
|
| Daniel Herzner
| 203-429-2294
| dherzner at pequotcap.com
| pickledpunk at usa.com
|
| _______________________________________________
| Javascript mailing list
| Javascript at LaTech.edu
| http://www.LaTech.edu/mailman/listinfo/javascript
|




More information about the Javascript mailing list