/    Sign up×
Community /Pin to ProfileBookmark

Single and double quotes

Hi there.. can someone explain me the difference between single and double quotes? this is the only reason why my code is not working, i realized that i CANT use single quotes all the way but im not sure how to fix it , any help is really appreciated ….

here is one of my lines

images = new Array(4);

images[0] = “<a href=’vd_lj.htm’ target=’I3′><img id=’tab55’src= ‘truehope_bipolar_disorder_hope_s1p.gif’ alt=’truehope bipolar disorder hope videos’ width=’150′ height=’113′ border=’0′ [B]onmouseover[/B]=’tab55.src=’truehope_bipolar_disorder_hope_rs1.gif’ ‘ [B]onmouseout[/B]=’tab55.src=’truehope_bipolar_disorder_hope_s1p.gif’ ‘ /></a>”;

my main problem is that the mouseover and mouseout are not working.. thanks in advance

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@MaydaySep 29.2008 — NVM, FourCourt had a better grasp of the error than I did. ?
Copy linkTweet thisAlerts:
@FourCourtJesterSep 29.2008 — You're encapsulating single quotes inside single quotes, which is screwing around with the string when it tries to render. You need to escape your quotes to make it work.

images[0] = "<a href='vd_lj.htm' target='I3'><img id='tab55' src='truehope_bipolar_disorder_hope_s1p.gif' alt='truehope bipolar disorder hope videos' width='150' height='113' border='0' onmouseover='tab55.src='truehope_bipolar_disorder_hope_rs1.gif'' onmouseout='tab55.src='truehope_bipolar_disorder_hope_s1p.gif'' /></a>";

or

images[0]="<a href="vd_lj.htm" target="I3"><img id="tab55" src="truehope_bipolar_disocrder_hope_s1p.gif" alt="truehope bipolar disorder hope videos" width="150" height="113" border="0" onmouseover="tab55.src='truehope_bipolar_disorder_hope_rs1.gif' onmouseout="tab55.src='truehope_bipolar_disorder_hope_s1p.gif' /></a>";
Copy linkTweet thisAlerts:
@TheBearMaySep 29.2008 — Could also try:

images = new Array(4);

images[0] = "&lt;a href='vd_lj.htm' target='I3'&gt;&lt;img id='tab55'src= 'truehope_bipolar_disorder_hope_s1p.gif' alt='truehope bipolar disorder hope videos' width='150' height='113' border='0' onmouseover='tab55.src=&amp;quot;truehope_bipolar_disorder_hope_rs1.gif&amp;quot; ' onmouseout='tab55.src=&amp;quot;truehope_bipolar_disorder_hope_s1p.gif&amp;quot; ' /&gt;&lt;/a&gt;";
Copy linkTweet thisAlerts:
@3drianauthorSep 29.2008 — thanks guys, i really apreciate your help my code is now working.. you have no idea how happy i am haha once again thanks a lot
×

Success!

Help @3drian spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...