/    Sign up×
Community /Pin to ProfileBookmark

fairly simple but troubling me…

Okay, to most of you this will be no problem, but its like 1am and I can’t think clearly. What I want to do is when a user clicks on a thumbnail that picture is displayed on the same page, NOT a page by itself and NOT a pop up. If anyone can help that would be great! Thanks! ?

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@AschMay 22.2003 — You can do that with div's :


gad a put her a browser check with something like that :
----------------------


function show(sw,obj)

etc...
----------


style sheet

.myLayersClass { position: relative; visibility: hidden; }

---ad as many div's as you like----

<div id = "div" class = "myLayersClass" align="center">

<br>ANY IMAGE<br>

<img src="ANYIMAGE.JPG" height=189 border=0 alt="" width=287>

</div>


---two buttons ..appears image and hides...---

<div id="div2" align="center">

<form action="" method="post" name="myForm">

<input type=button value="Show Div" onClick="show(true,'div');"> <input type=button value="Hide Div" onClick="show(false,'div');">

</form>

</div>


cheers

Asch

?
Copy linkTweet thisAlerts:
@messenjahauthorMay 22.2003 — Sorry that made NO sense to me, can anyone else put it in simpler terms or help me out in a different way? Thanks!
Copy linkTweet thisAlerts:
@pyroMay 22.2003 — Try this out:

&lt;script language="javascript" type="text/javascript"&gt;
function showPic(img) {
document.getElementById("mydiv").innerHTML='&lt;img src="'+img+'"&gt;';
}
&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;a href="yourimage.png" onclick="showPic(this.href); return false;"&gt;&lt;img src="yourthumbnail.png" border="0"&gt;&lt;/a&gt;

&lt;div id="mydiv"&gt;&lt;/div&gt;
Copy linkTweet thisAlerts:
@messenjahauthorMay 22.2003 — thanks that worked out great!
Copy linkTweet thisAlerts:
@CharlesMay 22.2003 — [font=georgia]Pyro,

Gollum (http://forums.webdeveloper.com/member.php?s=&action=getinfo&userid=6428 has, in a recent posting, brought to our attention the fact that the [font=monospace]Element.innerHTML[/font] object[?] is non-standard and he or she does appear to be correct. (See http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html).[/font]
Copy linkTweet thisAlerts:
@VladdyMay 22.2003 — or if you want to do it right:

function showPic(img,description)

{ bigImg = document.getElementById("mydiv").appendChild(document.createElement('img'));

bigImg.src = img;

bigImg.alt = description;

}
Copy linkTweet thisAlerts:
@AschMay 23.2003 — well seems to that my mind is to complicated lol...:o)


asch
×

Success!

Help @messenjah 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 6.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...