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!

Message Boxes

Status
Not open for further replies.

davman2002

Programmer
Nov 4, 2002
75
US
Is there an easy way to show a message box using Javascript? I would like to be able to prompt the user on an event such as a text box lost focus.
 
<textarea cols=&quot;30&quot; rows=&quot;10&quot; onBlur=&quot;javaScript: alert('you lost focus');&quot;></textarea> DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
remember: do NOT use the &quot;javascript:&quot; pseudo-protocol in an event handler. ONLY use it in an href attribute.

correct:
onblur=&quot;doSomething();&quot;
href=&quot;javascript:doSomething();&quot;

wrong:
onblur=&quot;javascript:doSomething();&quot;
href=&quot;doSomething();&quot;
=========================================================
if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top