944,031 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Mar 6th, 2005
0

How do i load a image on the same page ?

Expand Post »
I want to load an image on the same page.. Hmm

Check this site out and how the screenshots work and you know what i mean.
http://www.eve-online.com/screenshot...=24112004&n=10

I want t5o have small thumbnails belove a larger image. When i klick one of the smaller thumbnails i want it to load over them..

Im guessing some java script or something ?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
croft is offline Offline
35 posts
since Nov 2004
Mar 7th, 2005
0

Re: How do i load a image on the same page ?

JS files...external....2......
1) x-core....cross platform browser JS.
2) minmax....makes IE accept the min/max height properties JS.

JS script....internal......lots....

the one you want.....(2 parts)

(part1_____the JS that does all the work!)
<script language="javascript">
function screenup(n){
screenow = window.open('/screenshots/up.asp?col=24112004&n='+n,'screenow','width=790,height=574,resizable=no,scrollbars=no,menubar=no,toolbar=no,directories=no,location=no,status=no');
}
function fcnDisplay(n){
xGetElementById('displayImg').src = '/screenshots/24112004/'+n+'n.jpg';
}
function EVE_preloadImages() {
var d=document; if(d.images){ if(!d.EVE_p) d.EVE_p=new Array();
var i,j=d.EVE_p.length,a=EVE_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.EVE_p[j]=new Image; d.EVE_p[j++].src=a[i];}}
}
document.onload = EVE_preloadImages('02n.jpg,03n.jpg,04n.jpg,05n.jpg,06n.jpg,07n.jpg,08n.jpg,09n.jpg,10n.jpg');
</script>

(part 2_____The code to call the JS... note the '##' for fcnDisplay + screenup !!!)
<td align="center"><a href="#sh" onclick="fcnDisplay('01')"><img src="24112004/01m.jpg" class="thumbs"></a><br><a href="#sh" onclick="screenup('01')"><img src="/bitmaps/img/fullscreen.gif" border="0"></a></td>


Is that any help ?

PLEASE NOTE...code is pasted as an example!
It is by no means meant asa breach of Copyright, nor to be copied.
Reputation Points: 63
Solved Threads: 12
Posting Pro in Training
autocrat is offline Offline
427 posts
since Feb 2005
Mar 7th, 2005
0

Re: How do i load a image on the same page ?

or you can use my simple accessible iframe implementation
http://www.emdevelopments.co.uk/demo/iframe/

Replace the numbers with your pictures.
Reputation Points: 54
Solved Threads: 20
Master Poster
DaveSW is offline Offline
765 posts
since Jul 2004
Mar 15th, 2005
0

Re: How do i load a image on the same page ?

Quote originally posted by croft ...
I want to load an image on the same page.. Hmm

Check this site out and how the screenshots work and you know what i mean.
http://www.eve-online.com/screenshot...=24112004&n=10

I want t5o have small thumbnails belove a larger image. When i klick one of the smaller thumbnails i want it to load over them..

Im guessing some java script or something ?
that would be javascript such as


<script language="javascript">
function ChangeImage1(){
	document.getElementById("image1").src= "location of the first thumbnail";
}
		</script>

will work.


so your code might be

<img src="location of image" id="image1"> <!--this is the main image that you want swapped with other images

and below it would be the images you want in thumb view

<img src="loaction of the thumbnail" onClick="ChangeImage1();">

or

<img src="location of the thumbnail" onmousover="ChangeImage1();">


this can easily be added to add more functions for more pictures

IE:
<script language="javascript">
function ChangeImage1(){
document.getElementById("image1").src= "location of the first thumbnail";
}
function ChangeImage2(){
document.getElementById("image1").src= "locatoin of the second thumbnail";
}
</script>

then for subsequent loads for different images you would do

<img src="location of the image" onmouseover or onclick ="changeimageX();>

where X is the number of the corresponding thumbnail.

if thats confusing i can give you some sample code i have at home to look at.

I currently dont have any on me as i am at school.
Reputation Points: 152
Solved Threads: 39
Master Poster
Killer_Typo is offline Offline
778 posts
since Apr 2004
Jun 29th, 2005
0

Re: How do i load a image on the same page ?

Quote originally posted by Killer_Typo ...
this can easily be added to add more functions for more pictures
I followed this thread and I believe there is just a tiny bit to add to the script to let me do what I'm trying to do.
http://www.cartabianca.com/test/progetto-web.gif
Basically, I'd like to click on one of the yellow buttons at the bottom to load a new image on the grey area. The button should also change into red, so to let people know which of the available images is being displayed.

Any help would be greatly appreciated!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Nightjar is offline Offline
1 posts
since Jun 2005
Feb 14th, 2007
0

Re: How do i load a image on the same page ?

that would be javascript such as


<script language="javascript">
function ChangeImage1(){
    document.getElementById("image1").src= "location of the first thumbnail";
}
        </script>
will work.


so your code might be

<img src="location of image" id="image1"> <!--this is the main image that you want swapped with other images

and below it would be the images you want in thumb view

<img src="loaction of the thumbnail" onClick="ChangeImage1();">

or

<img src="location of the thumbnail" onmousover="ChangeImage1();">


this can easily be added to add more functions for more pictures

IE:
<script language="javascript">
function ChangeImage1(){
document.getElementById("image1").src= "location of the first thumbnail";
}
function ChangeImage2(){
document.getElementById("image1").src= "locatoin of the second thumbnail";
}
</script>
then for subsequent loads for different images you would do

<img src="location of the image" onmouseover or onclick ="changeimageX();>

where X is the number of the corresponding thumbnail.

if thats confusing i can give you some sample code i have at home to look at.

I currently dont have any on me as i am at school.
this actually is a bit confusing. can you show me an example please?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
korigirl is offline Offline
3 posts
since Feb 2007
Apr 28th, 2007
0

Re: How do i load a image on the same page ?

Why bother with that?

Just make identical pages, with the color changes and the large picture coded differently, and with links to each other.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Apr 28th, 2007
0

Re: How do i load a image on the same page ?

Click to Expand / Collapse  Quote originally posted by MidiMagic ...
Why bother with that?

Just make identical pages, with the color changes and the large picture coded differently, and with links to each other.
well I'm not sure exactly what you're talking about but I have a LOT of pictures to show (http://www.korigirl.com). Its my photography.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
korigirl is offline Offline
3 posts
since Feb 2007
Apr 29th, 2007
0

Re: How do i load a image on the same page ?

Ok....This thread is almost 2 years out folks.


...Korigirl...
So you want to generate some sort of smart, clever, pretty gallery?
It's actually easier than you think - and for most things you can use CSS instead of JavaScript.
That said, do try to consider things such as Accessibility.
If you would like assistance, just PM or post here.


...MildMagic... Not particularly helpful? If I ask for directiosn to a library, what you gonna do, tell me to go to a books store and buy one instead ?
Not repremanding you (hell, I'm hardly ever here now adays), but please think first, type second.
Reputation Points: 63
Solved Threads: 12
Posting Pro in Training
autocrat is offline Offline
427 posts
since Feb 2005
Apr 29th, 2007
0

Re: How do i load a image on the same page ?

Thanks for offering but i think i'm happy with what I have right now.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
korigirl is offline Offline
3 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Site Layout and Usability Forum Timeline: FTP error in Dreamweaver
Next Thread in Site Layout and Usability Forum Timeline: Need a contact form for my web site





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC