/    Sign up×
Community /Pin to ProfileBookmark

enlarge an image

Hello, I have just joined in my desperation to find the answer to this question.

I want to be able to enlarge an image on my site by clicking on it. I have come accross this code on a javascript site (which then linked me to this forum) and it tells me to paste in into the BODY of my code. I am clueless when it comes to html, can someone please tell me exactly where it goes and is it an addition to the current html or do I need to replace something, I have already changed to image name to mine.

<img src=”juta.jpg” width=”150″ height=”200″ onclick=”this.src=’juta.jpg’;this.height=400;this.width=300″ ondblclick=”this.src=’juta.jpg’;this.height=200;this.width=150″>

[B]This is the html code currently on my test page for the image i want to enlarge[/B]

<p><img style=”width: 118px; height: 166px” border=”0″ alt=”” src=”/usersitesv21/mariasweddingfavours.co.uk/wwwroot/userimages/juta.jpg” width=”118″ height=”166″ />&nbsp;</p>
<p>
<p>&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

If someone can help I would really appreciate it.

Thank you ?

to post a comment
HTML

8 Comments(s)

Copy linkTweet thisAlerts:
@StelarOct 14.2010 — <p><img src="/usersitesv21/mariasweddingfavours.co.uk/wwwroot/userimages/juta.jpg" width="118" 166="200" border="0"><p>

I think that should do it

Hope that helps

Altough I believe you should incorporate the full name(including let's say www.whatever.eva)
Copy linkTweet thisAlerts:
@StelarOct 14.2010 — Oh forgot add the onclick="this.height=400;this.width=300"
Copy linkTweet thisAlerts:
@flower2authorOct 14.2010 — Ok thanks, nearly there, I have applied the html in place of the original for the thumbnail, but the image actually dissapears and i'm left with a white box with a red cross in the top left hand side, if i click on it it does enlarge but no image, what have i done wrong?
Copy linkTweet thisAlerts:
@StelarOct 14.2010 — can you upload the entire code so can I can get a better look? and maybe a full link to the image. The red cross in the top right hand side in the white box means the image doesn't exist/is broken. You should put the ENTIRE link to the image if you want to have a working code for anything.( I HOPE YOU DIDN'T SAY www.whatever.eva/usersitesv21/mariasweddingfavours.co.uk/wwwroot/userimages/juta.jpg

lol because I said www.whatever.eva just as a rough example)
Copy linkTweet thisAlerts:
@flower2authorOct 14.2010 — [B]This is the original code for the image as it appears when I look at the html view in my webpage.[/B]

<p><img border="0" alt="" src="http://www.mariasweddingfavours.co.uk/userimages/juta.jpg" width="200" height="279" />&nbsp; &nbsp;</p>


[B]This is the code you gave me changing the necessary words to my webname etc.[/B]

<p><img src="/usersitesv21/www.mariasweddingfavours.co.uk/wwwroot/userimages/juta.jpg" width="118" 166="200" border="0"onclick="this.src='juta.jpg';this.height=500;this.width=400" onclick="this.src='juta.jpg';this.height=200;this.width=150">


What I would like to know is if this code is ok and where exactly do I put it, do I substitute the orginal code above?

i really appreciate your help in this, I am new to web design and html is something I really can't get my head around, but I have to to get my site looking good.

i look foward to hearing from you.

Thanks ?
Copy linkTweet thisAlerts:
@StelarOct 14.2010 — <p><img src="/usersitesv21/www.mariasweddingfavours.co.uk/wwwroot/userimages/juta.jpg" width="118" 166="200" border="0"onclick="this.src='juta.jpg';this.height=500;this.width=400" onclick="[b]this.src='juta.jpg'[/b];this.height=200;this.width=150">

I bolded the place where the error is... it changes to an unexisting image. Try either replacing or deleting that part.
Copy linkTweet thisAlerts:
@flower2authorOct 14.2010 — i deleted it and it does not work, what do I replace it with?

Also, do I take the new code and substitute it for the old one?
Copy linkTweet thisAlerts:
@StelarOct 15.2010 — check the link... first of all I don't think usersitesv21 exists so I tried www.mariasweddingfavours.co.uk/wwwroot/userimages/juta.jpg and it proved to be nonexistent

I think you should try some other link
×

Success!

Help @flower2 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.20,
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,
)...