473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

easy syntax question....

Hi,

why is it ok to have:

function home_mouseover(){
document.getElementById("hom").src = home_night.src;
}

<a href="./home.shtml" onmouseover="home_mouseover();">

but not ok (results in a syntax error) to have:

<a href="./home.shtml" onmouseover="document.getElementById("hom").src =
home_night.src;">

aren't these the same?

Thanks for your help.

Michael
Oct 1 '06 #1
2 1123
Michael wrote:
Hi,

why is it ok to have:

function home_mouseover(){
document.getElementById("hom").src = home_night.src;
}

<a href="./home.shtml" onmouseover="home_mouseover();">

but not ok (results in a syntax error) to have:

<a href="./home.shtml" onmouseover="document.getElementById("hom").src =
home_night.src;">

aren't these the same?
Both HTML and JavaScript use " to quote. You have to straighten that out.
--
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"
Oct 1 '06 #2

"John W. Kennedy" <jw*****@attglobal.netwrote in message
news:DW*************@newsfe10.lga...
Michael wrote:
>Hi,

why is it ok to have:

function home_mouseover(){
document.getElementById("hom").src = home_night.src;
}

<a href="./home.shtml" onmouseover="home_mouseover();">

but not ok (results in a syntax error) to have:

<a href="./home.shtml" onmouseover="document.getElementById("hom").src =
home_night.src;">

aren't these the same?

Both HTML and JavaScript use " to quote. You have to straighten that out.
--
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"
Thanks for that :-)
Oct 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
33
by: Jim Hill | last post by:
I've done some Googling around on this and it seems like creating a here document is a bit tricky with Python. Trivial via triple-quoted strings if there's no need for variable interpolation but...
3
by: Iain | last post by:
I am attempting to run the folliwing update: update rx set startdate = date_sub(startdate, INTERVAL 14 DAY) where rowid in ( select rx.rowid from rx, episode where rx.rxbatch=0 and...
8
by: Perre Van Wilrijk | last post by:
Hello, I have 2 ways of updating data I'm using often 1) via a cursor on TABLE1 update fields in TABLE2 2) via an some of variables ... SELECT @var1=FLD1, @var2=FLD2 FROM TABLE1 WHERE...
16
by: Terry McNamee | last post by:
return arr.Length == 0 ? null : arr.ToString(); Can anyone tell me what this syntax means? Does it basically mean if arr.Length is equal to 0 then return null, else return the item in the...
9
by: Mark Walsh | last post by:
The following is an explanation of a bug that exists in the VB.NET compiler. I've tried to report it to Microsoft, but they've made it so difficult I've given up: MSDN help states that variables...
1
by: Ryan Smith | last post by:
I can't get past this - I am inserting a record into a db and I keep getting the same SQL SYNTAX ERROR MESSAGE. Below is the statement i am using with test data. All fields in the database are...
7
by: SteveM | last post by:
I am sure this is an easy question, but being relatively new to ASP.NET programming, I can not quite grasp what I need to accomplish what I need to do. What I have is a word document that is...
20
by: raylopez99 | last post by:
Inspired by Chapter 8 of Albahari's excellent C#3.0 in a Nutshell (this book is amazing, you must get it if you have to buy but one C# book) as well as Appendix A of Jon Skeet's book, I am going...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.