a single page..

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
corillo181
Forum Commoner
Posts: 76
Joined: Wed Apr 26, 2006 3:02 pm

a single page..

Post by corillo181 »

this is wha ti'm trying to do..

i got a picture gallery..

so i want to design a single page for when ppl click on the thumbnail the picture is viewed in the same page.. no matter wich picture they click on i want the picture to be viewed in the same page..

can this be done?
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

Javascript Solution:

http://www.huddletogether.com/projects/lightbox2/

[Lokesh is god]
corillo181
Forum Commoner
Posts: 76
Joined: Wed Apr 26, 2006 3:02 pm

Post by corillo181 »

mm if i realy wanted to use other ppl product i wouldn't be asking this kind of questions..

i want to learn for my self.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Moved to Client Side.

Todd_Z gave you a perfectly acceptbale answer. You did not stipulate you wanted to write your own.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Pimptastic wrote:Moved to Client Side.

Todd_Z gave you a perfectly acceptbale answer. You did not stipulate you wanted to write your own.
And even if you do want to write your own why not look at that code to get you started?
corillo181
Forum Commoner
Posts: 76
Joined: Wed Apr 26, 2006 3:02 pm

Post by corillo181 »

d11wtq wrote:
Pimptastic wrote:Moved to Client Side.

Todd_Z gave you a perfectly acceptbale answer. You did not stipulate you wanted to write your own.
And even if you do want to write your own why not look at that code to get you started?
becuase when you "know php " and someone ask for something.. you know they getting stared why not try to give then the easier way to start?

some one knew enuff to tell me that by putting the get method to the page and the <a href> to the picture it would work.. see how easy that was :idea: ..thank anyways..
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

You could also use DOM to avoid even reloading the page.

Code: Select all

<html>
<head>
<title>mypage</title>
<script type="text/javascript">
function showPic(picName){
    document.getElementById('myDiv').innerHTML = '<img src="'+picName+'">';
}
</script>
</head>
<body>

<!-- div layer for showing pictures -->
<div id="myDiv"></div>

<!-- actual pictures -->
<a href="javascript: void(0);"><img src="thumbs/this_picture.jpg" onClick="showPic('this_picture.jpg');" style="cursor: hand;"></a>

</body>
</html>
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply