[Javascript] Help please on passing a parameter value

Ben Curtis Quixote at LaMancha.org
Thu Aug 16 18:29:34 CDT 2001


> onclick="javascript:Start(\'http://ctintranet.mysite.com/EmployeeSearchForm.
> asp?employee="\+document.all.empsrchPrm.value\')"

Your quotes are mixed up: you terminate the onclick code with a premature ",
and thus your string in the javascript is unterminated. Also, everything
inside an onclick handler is javascript, so you don't need to declare the
protocol. Try this:

onclick="Start('http://ctintranet.mysite.com/EmployeeSearchForm.asp?employee
='+document.all.empsrchPrm.value);"

This is IE-only, right? Your use of document.all pretty much makes it so. If
empsrchPrm is a form element, try this instead:

document.formName.empsrchPrm.value

--
+Ben Curtis

Two guys walk into a bar.
The third guy ducks and goes around it.








More information about the Javascript mailing list