Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old April 2nd, 2004, 04:04 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Madison, Wisconsin, USA.
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default Javascript Syntax Error

Hi all,

I'm having yet another syntax error with a page I'm working on.

Here's the code

<HTML>
<HEAD>
<TITLE>Sandhills Regional Public Transit</TITLE>

<LINK REL="stylesheet HREF="HTML J-17.css" TYPE="text/css">

<SCRIPT LANGUAGE="javascript">
<!--
Nav4=(document.layers) ? 1:0;
IE4=(document.all) ? 1:0;

function changeText(whichTitle) {
    if(Nav4) {return}
    whichTitle.style.fontSize="24pt";
    whichTitle.style.color="#FF6347"
}

function changeTextBack(whichTitle)
    if(Nav4) (return)
    whichTitle.style.fontSize="16pt";
    whichTitle.style.color="#000000"
}

//-->
</SCRIPT

></HEAD>

<BODY BACKGROUND="Sand.gif">
<DIV ALIGN="center">
<IMG SRC="bus.jpg" ALIGN=right>
<BR><H1>Sandhills Regional Public Transit</H1>
<BR>
<H2>Rider tips</H2></DIV>
<BR><BR>
<H3>Observing the following guidelines will help to make your travel on SRPT as enjoyable as possible.</H3>
<BR>
<UL TYPE="disk">
<LI><DIV onMouseOver="changeText(this)" onMouseOut="changeTextBack(this)">Arrive at your bus stop early</DIV><BR>
<LI><DIV onMouseOver="changeText(this)" onMouseOut="changeTextBack(this)">Carry correct change</DIV><BR>
<LI><DIV onMouseOver="changeText(this)" onMouseOut="changeTextBack(this)">Press the strip to call your stop</DIV><BR>
<LI><DIV onMouseOver="changeText(this)" onMouseOut="changeTextBack(this)">Front seats are for elderly and disabled passengers</DIV><BR>
<LI><DIV onMouseOver="changeText(this)" onMouseOut="changeTextBack(this)">Hold on to rail while standing</DIV>
</UL>
<BR>

</BODY>
</HTML>


I'm getting errors for lines 18 and 40 (which I've highlighted in red). Does anyone know what the problem is?

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

"A Person Who Claims To Be A Flash Junkie Isn't Really A Flash Junkie Unless He Can Prove It"
__________________
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
  #2 (permalink)  
Old April 2nd, 2004, 07:08 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You don't have a { for function changeTextBack.

----------
---Snib---
----------

<><
  #3 (permalink)  
Old April 5th, 2004, 09:38 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Madison, Wisconsin, USA.
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

Thanks for this. I had to redo the entire code to see if I would get the same error. Fortunately, I didn't

Thanks again

Quote:
quote:Originally posted by Snib
 You don't have a { for function changeTextBack.
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

"A Person Who Claims To Be A Flash Junkie Isn't Really A Flash Junkie Unless He Can Prove It"


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
javascript "stop" syntax - needs declared? crmpicco Javascript 5 September 14th, 2005 06:01 AM





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