Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Beginning JavaScript
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning JavaScript
This is the forum to discuss the Wrox book Beginning JavaScript by Paul Wilton; ISBN: 9780764544057
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript 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 Display Modes
  #1 (permalink)  
Old September 10th, 2003, 09:38 AM
Registered User
 
Join Date: Sep 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript "alert()" acts modeless, p14

Using the following Javascript code (on Linux) produces different results depending on the browser. This code is closely related to that on page 14 of "Beginning Javascript" by Paul Wilton.

<HTML>
<HEAD> </HEAD>

<BODY BGCOLOR="GREEN">

    <P>Paragraph 1</P>

    <SCRIPT LANGUAGE="JavaScript">
        alert ("First Script Block");
        document.bgColor="BLUE";
    </SCRIPT>

    <P>Paragraph 2</P>

    <SCRIPT LANGUAGE="JavaScript">
        alert ("Second Script Block");
        document.bgColor="RED";
    </SCRIPT>

    <P>Paragraph 3</P>

</BODY>

</HTML>

-----------------------------------------------
When using Netscape (Linux), it does not halt at the "alert()" as it should (alert() should invoke a MODAL message box), but instead rushes along until it completes all the Javascript code, leaving all of the messageboxes on the screen, waiting for dismissal.

When using Konqueror, it halts correctly at the "alert()", but never changes colors, staying the original GREEN.
-----------------------------------------------------------

If I change from "alert()" to "confirm()", the Netscape run works, but I want an "alert()", not a "confirm()",because this is a different user interface. The Konqueror version using "confirm()" still fails to change colors.

I would certainly appreciate some help if anyone is familiar with this. Thanks!
Reply With Quote
Reply


Thread Tools
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 07:03 AM
PURE asp upload problem ., alert from Javascript kasanar ASP.NET 1.0 and 1.1 Professional 0 February 19th, 2005 09:06 AM
Javascript alert error Ed7777 Javascript How-To 5 June 25th, 2004 02:23 PM
Javascript alert box Adam H-W Javascript How-To 13 March 4th, 2004 04:11 AM
Javascript "alert()" acts modeless cppman Javascript 2 September 16th, 2003 09:52 AM



All times are GMT -4. The time now is 02:19 AM.


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