Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 25th, 2004, 10:09 AM
Registered User
 
Join Date: Jun 2004
Location: bellingham, wa, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript alert error

I am relatively new to Javascript, and I am pulling my hair out (lolololoooooo....). I have a situation that I am testing to make sure that a function is operating when an onLoad is being used. The code wasn't happening, so I removed the code and put an alert in to the function to be sure tthe function was happening. I do not see the alert on my system, although my Colleagues do see this alert when they look at my app. Could someone please explain why this would happen. The code is very straight forward, but I have attached.
Thanks
Ed

function checkPage()
{
alert('in check page');
}

</script>




</HEAD>

<BODY onLoad="checkPage()">


Reply With Quote
  #2 (permalink)  
Old June 25th, 2004, 10:25 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Ed,

Have you checked that you browser supports & has javascript enabled?

HTH,

Chris

Reply With Quote
  #3 (permalink)  
Old June 25th, 2004, 12:07 PM
Registered User
 
Join Date: Jun 2004
Location: bellingham, wa, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How do I check for that ? My Javascripts are running, but the "alert" doesn't seem to be popping up. I have code that is conditional for what my web page displays, and that functions. But when I put an alert at the top of that function (the one I know is executing the display control) the alert doesn't pop up. does that make sense ?
Thanks
Ed

Reply With Quote
  #4 (permalink)  
Old June 25th, 2004, 12:21 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

OK, write this *exact* page and run it:

<html>
<script language="javascript" type="text/javascript">
alert("it works");
</script>
</html>

Does this work?

If not, view the source of the page. It may be a caching issue. If the source is not exactly what you wrote, refresh the page. If that doesn't work, try closing the browser and starting over.

Internet Explorer, if that is what you are using, has some really nasty caching problems, sometimes....

Hope this message helps,

Snib

<><
Reply With Quote
  #5 (permalink)  
Old June 25th, 2004, 01:07 PM
Registered User
 
Join Date: Jun 2004
Location: bellingham, wa, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the help everyone, it seems there was a search engine tool bar on my IE that was causing the problems. When I removed the tool bar the alerts started coming up
Thanks again

Reply With Quote
  #6 (permalink)  
Old June 25th, 2004, 02:23 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Yeah... I would get rid of any installed toolbar, were I you. 99% of them are spyware, malware, adware, etc.

Glad your problem is solved.

Snib

<><
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
change text colors in an javascript Alert? larry Javascript How-To 5 February 12th, 2007 08:03 AM
PURE asp upload problem ., alert from Javascript kasanar ASP.NET 1.0 and 1.1 Professional 0 February 19th, 2005 10:06 AM
Javascript alert box Adam H-W Javascript How-To 13 March 4th, 2004 05:11 AM
Javascript "alert()" acts modeless cppman Javascript 2 September 16th, 2003 09:52 AM



All times are GMT -4. The time now is 07:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.