Print Page | Close Window

Javascript alert function

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=14925
Printed Date: 29 March 2026 at 10:15am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Javascript alert function
Posted By: ub3rl337ch3ch
Subject: Javascript alert function
Date Posted: 03 May 2005 at 12:21am

this really stupid i know, but here goes:

I have the following image:

<img border="0" src="images/question.bmp" width="15" height="15" onclick="busy()">

which has the busy() function associated with it:
 
function busy(){
alert ("From your AVT Communicator window, transfer the BUSY amount from the WORKING TOTAL section")
}
 
I have the alert in a function as it seems to have issues with me doing onclick="alert ("the message")" directly in the image tag, and throws a syntax error at me when i load the page. With the alert, i initially had function busy() just alert("hello"), which it had problems with. Now that I have the fill message in there, it's complaining about "Object does not support this property or method"
 
does anyone have any ideas as to why this could be so?



Replies:
Posted By: Phat
Date Posted: 03 May 2005 at 2:38am
you need to do

<img src="../_img/xml.gif" width="36" height="14" border="0" onClick="alert('the message')">

use ' instead of "



Posted By: ub3rl337ch3ch
Date Posted: 03 May 2005 at 3:18am
many, many thanks...Clap i was too tired to pick up on that one, and now i can slam a big red 'finished' stamp on this job... *joy*Big smile



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net