Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a string to a function

Status
Not open for further replies.

link9

Programmer
Nov 28, 2000
3,387
US
Morning --

I need to pass a string with spaces to a javascript function. The call to the function is being written out in asp, but I can't seem to get it to work properly.

Here's an example of the call I'm trying to use (gives me an error each time, but a non-descript 'error on page' message on the status bar)

<a href=&quot;javascript:showAccount('Allen & O'Hara, Inc.');&quot;>

What am I missing here?

thx
Paul Prewett
 
Looks like it was the single tick up there in the name...

don't ya hate that? :)
 
Hi link9,

Will work better like that but i'm sure you know it ;-)

<a href=&quot;javascript:showAccount('Allen & O\'Hara, Inc.');&quot;>

Hope this helps ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top