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

Alert function does not work in IE6

Status
Not open for further replies.

stralkin

Technical User
Jun 1, 2005
21
0
0
US
I am new to java but right away found that the alert function works fine with Firefox and not with IE6. Any ideas?
 
The alert function SHOULD work with IE! Show us what you got.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Here is the html:

<html>
<head>
<title>Alert in Javascript</title>
<script type= "text/javascript" src = "hello-alert.js">
</head>
</html>

and here is the javascript file that is called in the html file:


alert("This is an alert");

It works fine in FF but not in IE6
 
Put a closing script tag after the script tag and see if that helps.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Thank You! That did the trick - interesting thing is, i was following instructions in an introductory text on Javascript ("Javascript in easy steps") by Mike McGrath.
 
Guess he skipped a step, huh?

Isn't it surprising that in this case it was FF that was allowing bad practice, and IE that was disallowing it>


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top