The Daily Click ::. Forums ::. General Chat ::. just a quick HTML question
 

Post Reply  Post Oekaki 
 

Posted By Message

:JULI@N:



Registered
  14/07/2002
Points
  664
12th April, 2004 at 15:16:14 -

i know how to make a link open in a different window, but how do i define the properties of the new window, like the background, and stuff.
i knew how to, but suddenly i dunno anymore

 
n/a

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
12th April, 2004 at 15:48:18 -

You'll need javascript (window.open) for that. Here's a handy wizard for it:

http://www.wizardscc.com/wizards/newwindow.asp

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
12th April, 2004 at 15:54:19 -

javascript!

please don't copy and paste, it won't work (i'm not very experienced with js), but try something along the lines of:

<script language="JavaScript">
function new_win(url, bg){
window.open(url,"newwindow");
newwindow.background = bg;
}
</script>

you'll have to look up the exact syntax for the background bit.

edit: damn kris you beat me to it

Image Edited by the Author.

 
www.thenatflap.co.uk

:JULI@N:



Registered
  14/07/2002
Points
  664
12th April, 2004 at 16:07:56 -

mm ok thanks.
but im so sure the last time i did that i didnt use javascript

 
n/a

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
12th April, 2004 at 16:09:48 -

haha, i beat you by about 10 minutes

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Mr Icekirby



Registered
  18/12/2003
Points
  846
12th April, 2004 at 16:57:09 -

maybe petes computer was slow, maybe a random peice of toast ate him and spit him back out?

 
Mr Icekirby says so!
OBEY ME!

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
12th April, 2004 at 17:01:28 -

well you could use php (or asp) conceivably:

in the new window:

<?php
$bgcolor = $_GET['bgcolor'];
echo "<HTML><BODY bgcolor=\"$bgcolor\">";
?>

in the linking page:

newpage.php?bgcolor=#FF00FF

 
www.thenatflap.co.uk

:JULI@N:



Registered
  14/07/2002
Points
  664
12th April, 2004 at 21:57:44 -

well, in fact, my problem is that i want to make a kinda gallery page, where people can see my drawings. but i dont wanna make a separate html page for each drawing
what would you suggest me?

 
n/a

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
13th April, 2004 at 06:11:34 -

If you want to avoid using ASP/PHP/whatever, just use Javascript to:

1. Set a cookie on the main page holding the picture info
2. Open a new window
3. Read the cookie and show the corresponding picture

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

:JULI@N:



Registered
  14/07/2002
Points
  664
13th April, 2004 at 12:08:44 -

well, what i wanted is an image that changed. that you clicked something and the imaged changed to the thing you chose.
i remember asking this before and shen said something like that.
the only thing i find searching is google, are scripts like the one Kramy sent me, that are for images that you want to show in a certain order, but i dont find anyone that lets you choose from many, an specific one, instead of having just two buttons, next and prev

 
n/a

Long John Kickbag



Registered
  26/08/2002
Points
  148
13th April, 2004 at 14:15:57 -

Just put some javascript instead of the url of a page as well. Like: window.open("javascript: document.write(\'<html><body>< img src="+imageurl+"></body></html>\')");.

Image Edited by the Author.

 
Resize! - www.clicksplat.com/comparison.html
   

Post Reply



 



Advertisement

Worth A Click