By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,934 Members | 1,528 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,934 IT Pros & Developers. It's quick & easy.

Really need some help

P: n/a
I have a page with about 100 thumb nails that each shows a small page.
I would like to have a global command in the page with all the thumbs
that would make it so that when I push on the thumb nail on that page
the link is show in a pop up.

Something similar to this would be nice but as a global command as it
is not feasible to rewrite all the links.

<a href='http://eriksworld.altervista.org/pages/ghost_jpg.php'
target='_blank' onClick='window.open("http://eriksworld.altervista.org/pages/ghost_jpg.php","","width=700,height=600,resizable= no,scrollbars=no");
return false;'>Next</a>

All the best Erik
Sweden
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I hope i understrood correctly...

<script language=javascript>
<!--
function openPopUp(image) {
popup = window.open(image,"","width=500, height=500");
popup.setTitle("Image preview");
}
-->
</script>

<a href="image.jpg" onClick="openPopUp(image = this.href); return
false;">link1</a>
<a href="image2.jpg" onClick="openPopUp(image = this.href); return
false;">link2</a>

something like that

--
Janne
http://trax.to/thx/
"Erik" <st*************@hotmail.com> kirjoitti viestissä
news:b7**************************@posting.google.c om...
I have a page with about 100 thumb nails that each shows a small page.
I would like to have a global command in the page with all the thumbs
that would make it so that when I push on the thumb nail on that page
the link is show in a pop up.

Something similar to this would be nice but as a global command as it
is not feasible to rewrite all the links.

<a href='http://eriksworld.altervista.org/pages/ghost_jpg.php'
target='_blank' onClick='window.open("http://eriksworld.altervista.org/pages/ghost_jpg.php",
"","width=700,height=600,resizable=no,scrollbars=n o"); return false;'>Next</a>

All the best Erik
Sweden

Jul 20 '05 #2

P: n/a
"Janne Raiskila" <ol***@par.as> writes:
I hope i understrood correctly...

<script language=javascript>
This should be
<script type="text/javascript">
The type attribute is required in HTML 4.
<!--
HTML comments are not necessary in Javascript.
function openPopUp(image) {
popup = window.open(image,"","width=500, height=500");
I would make popup a local variable, i.e., start with "var popup =".

There should be no spaces in the configuation string. Some browsers
refuse to work with that.
popup.setTitle("Image preview");
I don't believe window objects have a setTitle method. The page in the
new window has (most likely) not been loaded yet when this statement
is executed, so functions on the page will not be loaded yet.
<a href="image.jpg" onClick="openPopUp(image = this.href); return
Drop "image = ", unless you need to put the href into a global
variable on this page.
something like that


Something like it :)

--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #3

P: n/a
I was not too concise with my question. What I am asking is how I make
all the links on my page open up in a pop-up with out having to change
each of the links I have on my page.
All the best Erik

www.eriksworld.org

--
There are only 10 kinds of people. The ones who understand binary and
the ones who dont.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.