/    Sign up×
Community /Pin to ProfileBookmark

Konqueror does not undestand this simple html. Why?

[CODE]<html><head></head>
<body>
<p align=center><img src=”1.jpg” name=”main_img” height=”480″></p>
<table>
<tr>
<td><img src=”1.jpg” name=img0 width=”48″ onClick=document.images[“main_img”].src=”1.jpg”></td>
<td><img src=”2.jpg” name=img1 width=”48″ onClick=document.images[“main_img”].src=”2.jpg”></td>
</tr>
</table>
</body></html>[/CODE]

Save the code as index.html, place two jpg files (1.jpg and 2.jpg) in the same directory, open html-file with IE/Mozilla/Firefox and click on the small images at bottom. The upper image will be replaced with the clicked image. Now, try it with Konqueror unhappy
Is the code wrong? How should i impove it?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceApr 05.2006 — Both of these:

onClick=document.images["main_img"].src="1.jpg"

should be coded as follows (note change of all quotes, too):

onClick="document.images['main_img'].src='1.jpg'; return true;"
Copy linkTweet thisAlerts:
@yozhauthorApr 05.2006 — It is a bug in konqueror (possibly): http://bugs.kde.org/show_bug.cgi?id=124979 . This topic can be closed.
×

Success!

Help @yozh 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.12,
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,
)...