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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error with Prompt box displaying in status bar

Status
Not open for further replies.

abienz

Programmer
Aug 13, 2001
53
GB
Hi there,

I have a really curious error that I can't quite figure out, the basics are I have web page with some ASP scripting to display database information in textboxes, above one of these boxes I have buttons that allow the user to insert HTML code to make text <B>Bold</b> <I>Italic</I> and also to add a URL and email link.

The Bold and italic buttons work they just simply write the code to the text box, but the URL and Email buttons are supposed to display a prompt box which allows the user write their URL or Email and then this gets inserted into the textbox inside href or mailto tags.

My problem starts here, simply when these two buttons are used, instead of the above happening, the text for the prompt gets written in the status bar like I had written..

window.status=Please enter email address

Here's my code for the prompt though

onClick=prompt(&quot;Please enter email address&quot;), &quot;mailto:&quot;);

can anyone help me?
 
well you have one too many closing brackets -

try
prompt( &quot;Please enter email address&quot;, &quot;mailto:&quot;);

This works for me on IE 5.0

Lesley
 
oh yeah sorry that was a typo,

I managed to find the solution and it was a silly mistake to say the least.

It turned out that I had a function called prompt which simply had the code window.status=Input
This function was in an include file though so when I browsed through the code on the problem page I never saw what could be wrong.

How foolish is that!
 
Ooooh painful, it really shouldn't let you call a function &quot;prompt&quot; as it should be a reserved word.

never mind, you live and learn.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top