General discussion

Locked

pop up windows

By sparky_132 ·
here's my problem.
<head>
<script language="JavaScript">
<!--

function launch(url) {

self.name = "opener";

remote = open(url, "remote","scrollbars,resizable,width=800,height=600,left=0,top=0");

}

// -->
</script>
</head>
<body>
<a href="javascript:launch('01.jpg')"><img src="01s.jpg" border=0 width="100" height="75"></a>
</body>


when using those two pieces of script to create a pop up window in which my pictures for my website are displayed there is no problem. the problem arises however when i then click a link on the original page (from which the window was launched). instead of it changing what page is displayed it opens up a new window. this only happens however once the window has been clicked to viewpictures. the links i am clicking are in a different frame so why does this happen and how can i stop it?

i have not explained my self very well so please go to:
1) http://www.goecities.com/sparky_132/
2) click gallery on the links at the bottom of the page (in a different frame you'll notice)
3) click wallpapers
4)if you then click home for example it will display it in the correct frame.
5) if however you click on a thumbnail and open up the window displaying the picture, close it and then click 'home' it opens up a new window instead of displaying it in the correct frame.

how do i stop this happening?

also on the main page 'home' the background will be tiled (if u use a big resolution like me) how do i stop it tiling?

thanks

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

pop up windows

by xinger In reply to pop up windows

Not that I know much about JavaScript, but it appears to me that the
self.name = "opener"
line may be renaming the current window from "main" to "opener". Once it is renamed to "opener", the 4 links in the bottom frame which target "main" necessarily open a new window because the current window has been renamed to "opener". I can see what your intentions are, but I don't know how to achieve this. But maybe this will help you know where to start looking for an answer. Very nice pics BTW.

Collapse -

pop up windows

by sparky_132 In reply to pop up windows

thanks for ur help, i needed to delete that line in the end.

Collapse -

pop up windows

by Bojidar Alexandrov In reply to pop up windows

Yes, you must remove this line:

self.name = "opener";

Also for tiling
Your style tag is incorrect. Now it is
style="background-image: "wallpapers/02.jpg"; background-repeat: no-repeat;"
Must become:
style="background-image: url(wallpapers/02.jpg); background-repeat: no-repeat;"

Collapse -

pop up windows

by sparky_132 In reply to pop up windows

thnkas mate, it works a treat now!

Collapse -

pop up windows

by sparky_132 In reply to pop up windows

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums