faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 14 people (64%) answered Yes
Recently 5 of 9 people (56%) answered Yes

Entry

How can I get a series of different sized images to load in a frame using a next/back button. The images are resized to the frame w/h as they load?

Apr 4th, 2008 20:37
ha mo, Colin Fraser, fritz,


If I am understanding just what you are asking then this should be what 
you are looking for. BTW, What you are asking to do is not impossible, 
just difficult.  For starters, you have to create a history for your 
browser to get into the correct pattern. To do that try 
<SCRIPT LANGUAGE="JavaScript"><!--
 function myhistory(url) {
     if (document.images)
         location.replace(url);
     else
         location.href = url;
 }
 //--></SCRIPT>
in your header and 
<A 
HREF="javascript:myhistory('http://thisurl.com/secondimage.htm')">Next 
Image</A> 
In that page use 
<A HREF="javascript:myhistory('http://thisurl.com/thirdimage.htm')">Next 
Image</A> 
Targeting the frame of course. 
Or you may want to try a Switch statement to target the frame.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com