 |
| Javascript General Javascript discussions. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 9th, 2004, 05:09 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Syntax Error. HELP!
Hi all,
I just started the Dynamic HTML online course. For the most part, I am doing ok except for one problem. I am working on a page titled Event Handler.htm. I have this Javascript code in the page:
onMouseOver="window.status='We will reply to your inquiry within 24 hours!';return true" onMouseOut="window.status=";return true" >
What that code snippet is supposed to do is display a message in the Internet Explorer status bar when the e-mail address is rolled over. Problem is, Visual Interdev is giving me a message saying that there is a syntax error. I tried retyping the code twice but I can't seem to find the problem. Can anyone help?
Thanks in advance,
Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114
Go there. I have a lot of awesome photos that I rendered myself
__________________
Ben Horne
-------------------------
I don\'t want to sound like I haven\'t made any mistakes. I\'m confident I have.
Most likely using FireFox and concocting my next Macromedia Flash project
Snibworks Forums Moderator
Welcome to the New Age
|
|

March 9th, 2004, 05:16 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Usually, I wouldn't trust Interdev too much when it comes to validation. It's an ancient product, not really designed to work with modern, standards based languages. (Don't get me wrong, it's relatively useful tool, but IMO it has had its time)
Anyway, this time it may be right:
onMouseOver="window.status='We will reply to your inquiry within 24 hours!';return true" onMouseOut="window.status=";return true" >
I think you are trying to reset the status bar. To do that, you need '' (an empty string), not " (a single double quote).
Did you ever chill down and get your picture in your profile?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 9th, 2004, 05:20 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
The textbook I'm using ( Dynamic HTML by Sasha Vodnik says to use two apostrophes following the onMouseOut statement. I'm still getting errors though. Any ideas?
Quote:
quote:Originally posted by Imar
Usually, I wouldn't trust Interdev too much when it comes to validation. It's an ancient product, not really designed to work with modern, standards based languages. (Don't get me wrong, it's relatively useful tool, but IMO it has had its time)
Anyway, this time it may be right:
onMouseOver="window.status='We will reply to your inquiry within 24 hours!';return true" onMouseOut="window.status=";return true" >
I think you are trying to reset the status bar. To do that, you need '' (an empty string), not " (a single double quote).
Did you ever chill down and get your picture in your profile?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114
Go there. I have a lot of awesome photos that I rendered myself
|
|

March 9th, 2004, 05:26 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
But you posted a single double quote, right?
Does it work in the browser?
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 9th, 2004, 05:30 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
AHHH HA!
I made the changes in Notepad and the page works fine now. I guess I should never trust Interdev except for maybe simple stuff.
Would you recommend using Dreamweaver from now on? All I would have to do is go into Code View and insert the Javascript code
Quote:
quote:Originally posted by Imar
But you posted a single double quote, right?
Does it work in the browser?
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114
Go there. I have a lot of awesome photos that I rendered myself
|
|

March 9th, 2004, 05:46 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Well, Interdev is great for coding; features like Intelli Sense are very useful.
However, I don't think it is able to validate HTML, and JavaScript very well. Then again, it did point you in the right direction, didn't it?
I prefer Dreamweaver MX (2004) over Interdev, especially when it comes to doing site design (Vs real coding). It's Code Hints feature is by far not as advanced as Intelli Sense, but the zillion other useful features it has make it an excellent tool for Web development.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 10th, 2004, 05:46 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Quote:
quote:Originally posted by majora
onMouseOver="window.status='We will reply to your inquiry within 24 hours!';return true" onMouseOut="window.status=";return true" >
|
The middle quote in this should be two single quotes.
Code:
onMouseOut="window.status=";return true"
=>
Code:
onMouseOut="window.status='';return true"
--
Joe
|
|

March 10th, 2004, 03:39 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Joe,
Thanks for this:D. I have posted the correct code to the Discussion Board for the Online DHTML course so everybody knows. I gave you credit for the help:D
Quote:
quote:Originally posted by joefawcett
Quote:
|
quote:Originally posted by majora
|
Quote:
onMouseOver="window.status='We will reply to your inquiry within 24 hours!';return true" onMouseOut="window.status=";return true" >
|
The middle quote in this should be two single quotes.
Code:
onMouseOut="window.status=";return true"
=>
Code:
onMouseOut="window.status='';return true"
--
Joe
|
Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114
Go there. I have a lot of awesome photos that I rendered myself
|
|

March 11th, 2004, 06:00 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Quote:
quote:Originally posted by majora
Joe,
Thanks for this:D. I have posted the correct code to the Discussion Board for the Online DHTML course so everybody knows. I gave you credit for the help:D
|
Fame at last :)
--
Joe
|
|

March 11th, 2004, 02:31 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
PUH-LEEZ:D
When did you need fame to survive?:D
Quote:
quote:Originally posted by joefawcett
Quote:
|
quote:Originally posted by majora
|
Quote:
Joe,
Thanks for this:D. I have posted the correct code to the Discussion Board for the Online DHTML course so everybody knows. I gave you credit for the help:D
|
Fame at last :)
--
Joe
|
Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114
Go there. I have a lot of awesome photos that I rendered myself
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Parse error: syntax error, unexpected T_ELSE in /h |
vipin k varghese |
BOOK: XSLT Programmer's Reference, 2nd Edition |
4 |
September 29th, 2011 01:19 AM |
| Ch 4: Parse error: syntax error, unexpected T_SL |
hanizar77 |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 |
0 |
June 23rd, 2008 09:17 PM |
| Parse error: syntax error, unexpected T_STRING |
ginost7 |
Beginning PHP |
1 |
November 9th, 2007 02:51 AM |
| VB Error: Syntax Error or Access Violation |
codehappy |
VB How-To |
7 |
October 3rd, 2007 05:41 PM |
| Compile error: Syntax error: & Else without HELP |
Corey |
VB How-To |
2 |
April 21st, 2006 03:25 PM |
|
 |