p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 4 24-Hour Trainer (http://p2p.wrox.com/forumdisplay.php?f=591)
-   -   Chapter 1 javascript won't work (http://p2p.wrox.com/showthread.php?t=80794)

Bob Sulewski September 2nd, 2010 06:32 PM

Chapter 1 javascript won't work
I entered the code exactly as in the book and on the dvd but when I press the SelectColor button, I get no result. What gives?[:confused:]

Toi B Wright September 3rd, 2010 09:48 AM

Have you downloaded the solution file for that lesson? - http://www.wrox.com/WileyCDA/WroxTit...-DOWNLOAD.html

I hope this helps.


Toi B Wright

Bob Sulewski September 4th, 2010 09:03 AM

Don't work in Firefox
I got it working in IE but it still don't work in firefox. [:confused:]

7hamlet September 17th, 2010 11:28 PM


GBPhilip January 17th, 2011 12:55 PM

I have the same problem - what is the workaround? If with a simple program there are browser problems what chances of getting something more complex to work

Toi B Wright January 17th, 2011 03:54 PM

Chapter 1 for FireFox
This is the corrected code that will work on all of the non-Microsoft browsers:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <title>Hello World</title>
    <style type="text/css">
            color: Blue;
    <script type="text/javascript">
        function ShowSelection() {
            alert('You have selected ' + document.getElementById("SelectColor").value);
            document.getElementById("BodyContent").style.backgroundColor = document.getElementById("SelectColor").value;
    <div id="BodyContent">
            Hello World</h1>
        This is my first web page.
        <hr />
        Please select a color:
        <select id="SelectColor">
            <option value="white">white</option>
            <option value="silver">silver</option>
            <option value="yellow">yellow</option>
        <input id="ButtonSelect" type="button" value="Select" onclick="ShowSelection();" />

Sirajee January 31st, 2012 08:18 AM

Best way to books shopping deals
The Nook Color Tablet from Barnes and Noble is one such e-reader that was one of the first in bringing technology to the world of books. This device has many features that make it a great buy, at a very competitive price.


All times are GMT -4. The time now is 03:51 PM.

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