PDA

View Full Version : Opening Links, Always Use The Same Page



Livy
09-25-2003, 02:30 PM
hi, im currently redesignin my website, and i was wondering if its possible to always have the links on my page use the same new page, not keep opening new ones, coz i was gonna put a set of pictures up, and i wanted them to click open in a new page, but if u click the next picture, it would use the same page the other picture opened up in,
hope u understand, thanks

[B][O][T]
09-25-2003, 02:46 PM
Why not use frames?

BOT

Livy
09-25-2003, 02:48 PM
i nam going to be using framses.

if u check out http://www.freewebs.com/monkey_media/pictures.htm

the top bit will be a different frame, and then i want the pics to open in a new window, so as not to lose the current window.

shn
09-25-2003, 04:49 PM
lol :lol: Is that your monkey? Cute little fellow. :P

But like [B][O][T] said you may want to consider using frames.

I think it looks pretty good though.............monkey and all. :P

SniperInTheShadows
09-25-2003, 05:22 PM
If you mean that you want to enable people to be able to click on a picture and it to open in a seperate window, and from then on when they click on a different picture it'll open in that seperate window then this should work...

http://www.freewebs.com/monkey_media/monkey_0001.jpg (http://www.freewebs.com/monkey_media/monkey_0001.jpg)
http://www.freewebs.com/monkey_media/monkey_0002.jpg (http://www.freewebs.com/monkey_media/monkey_0002.jpg)

What this does is tell's the browser to open a new window called "_picture" and then that window will be used (providing you specify a target (target="_picture") for each picture) when another picture is clicked :-)

Sniper.

Livy
09-25-2003, 05:42 PM
thanks sniper, thats what i was looking for, i thought that woulda worked, but it sounded to simple, so its just the same code for opening in a new page, but i just call it a name instead of blank

Hellie
09-25-2003, 05:59 PM
Hey Livy where are the video´s?

[B][O][T]
09-25-2003, 06:00 PM
Livy check this (http://www.home.no/brand/livy.html) link. (Click the image)

Paste this in <HEAD> </HEAD>

&#60;script&#62;

PositionX = 100;
PositionY = 100;

defaultWidth = 500;
defaultHeight = 500;

var AutoClose = true;

// Do not edit below this line...
// ================================
if &#40;parseInt&#40;navigator.appVersion.charAt&#40;0&#41;&#41;&#62;=4&#41;{
var isNN=&#40;navigator.appName==&#34;Netscape&#34;&#41;?1&#58;0;
var isIE=&#40;navigator.appName.indexOf&#40;&#34;Microsoft&#34;&#41;&#33;=-1&#41;?1&#58;0;}
var optNN=&#39;scrollbars=no,width=&#39;+defaultWidth+&#39;,height=&#39;+defaultHeight+&#39;,left=&#39;+PositionX+&#39;,top=&#39;+PositionY;
var optIE=&#39;scrollbars=no,width=150,height=100,left=&#39;+PositionX+&#39;,top=&#39;+PositionY;
function popImage&#40;imageURL,imageTitle&#41;{
if &#40;isNN&#41;{imgWin=window.open&#40;&#39;about&#58;blank&#39;,&#39;&#39;,optNN&#41;;}
if &#40;isIE&#41;{imgWin=window.open&#40;&#39;about&#58;blank&#39;,&#39;&#39;,optIE&#41;;}
with &#40;imgWin.document&#41;{
writeln&#40;&#39;&#60;html&#62;&#60;head&#62;&#60;title&#62;Loading...&#60;/title&#62;&#60;style&#62;body{margin&#58;0px;}&#60;/style&#62;&#39;&#41;;writeln&#40;&#39;&#60;sc&#39;+&#39;ript&#62;&#39;&#41;;
writeln&#40;&#39;var isNN,isIE;&#39;&#41;;writeln&#40;&#39;if &#40;parseInt&#40;navigator.appVersion.charAt&#40;0&#41;&#41;&#62;=4&#41;{&#39;&#41;;
writeln&#40;&#39;isNN=&#40;navigator.appName==&#34;Netscape&#34;&#41;?1&#58;0;&#39;&#41;;writeln&#40;&#39;isIE=&#40;navigator.appName.indexOf&#40;&#34;Microsoft&#34;&#41;&#33;=-1&#41;?1&#58;0;}&#39;&#41;;
writeln&#40;&#39;function reSizeToImage&#40;&#41;{&#39;&#41;;writeln&#40;&#39;if &#40;isIE&#41;{&#39;&#41;;writeln&#40;&#39;window.resizeTo&#40;100,100&#41;;&#39;&#41;;
writeln&#40;&#39;width=100-&#40;document.body.clientWidth-document.images&#91;0&#93;.width&#41;;&#39;&#41;;
writeln&#40;&#39;height=100-&#40;document.body.clientHeight-document.images&#91;0&#93;.height&#41;;&#39;&#41;;
writeln&#40;&#39;window.resizeTo&#40;width,height&#41;;}&#39;&#41;;writeln&#40;&#39;if &#40;isNN&#41;{&#39;&#41;;
writeln&#40;&#39;window.innerWidth=document.images&#91;&#34;George&#34;&#93;.width;&#39;&#41;;writeln&#40;&#39;window.innerHeight=document.images&#91;&#34;George&#34;&#93;.height;}}&#39;&#41;;
writeln&#40;&#39;function doTitle&#40;&#41;{document.title=&#34;&#39;+imageTitle+&#39;&#34;;}&#39;&#41;;writeln&#40;&#39;&#60;/sc&#39;+&#39;ript&#62;&#39;&#41;;
if &#40;&#33;AutoClose&#41; writeln&#40;&#39;&#60;/head&#62;&#60;body bgcolor=000000 scroll=&#34;no&#34; onload=&#34;reSizeToImage&#40;&#41;;doTitle&#40;&#41;;self.focus&#40;&#41;&#34;&#62;&#39;&#41;
else writeln&#40;&#39;&#60;/head&#62;&#60;body bgcolor=000000 scroll=&#34;no&#34; onload=&#34;reSizeToImage&#40;&#41;;doTitle&#40;&#41;;self.focus&#40;&#41;&#34; onblur=&#34;self.close&#40;&#41;&#34;&#62;&#39;&#41;;
writeln&#40;&#39;&#60;img name=&#34;George&#34; src=&#39;+imageURL+&#39; style=&#34;display&#58;block&#34;&#62;&#60;/body&#62;&#60;/html&#62;&#39;&#41;;
close&#40;&#41;;
}}

&#60;/script&#62;

And this in <BODY> </BODY>

&#60;A HREF=&#34;javascript&#58;popImage&#40;&#39;wiggum7.gif&#39;,&#39;BOT&#39;&#41;&#34;style=&#34;cursor&#58;crosshair&#34;&#62;&#60;IMG SRC=&#34;wiggum7.gif&#34; WIDTH=&#34;400&#34; HEIGHT=&#34;352&#34; BORDER=0 ALT=&#34;&#34;&#62;&#60;/A&#62;

I think You understand what to change.

BOT

Livy
09-25-2003, 06:02 PM
Originally posted by Hellie@25 September 2003 - 17:59
Hey Livy where are the video´s?
i cant upload them yet, you cant upload things bigger than 750k in ur 1st week, if u click the link in my sig they are on my curretn site,

[B][O][T]
09-25-2003, 06:03 PM
I want a monkey too :) :D

BOT

Livy
09-25-2003, 06:05 PM
www.gadgetshop.com may be sold out though, mines was £25 pound, and iw as in the actual gadgetshop last week and i was tempted to buy another one for £20 it had a different tshirt, it said bad in red writing.

[B][O][T]
09-25-2003, 06:07 PM
Livy did You check http://www.home.no/brand/livy.html ?

BOT

Livy
09-25-2003, 06:12 PM
yeah, looks a bit more complicated, the way sniper posted will probably do, ill give it a go, im just trying to remove all the crap from the freewebs templates, and isolate the top bit to make it into frames

[B][O][T]
09-25-2003, 06:19 PM
Alrighty, I&#39;ll delete livy.html soon just so You know :)

BOT