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

Does anybody have any ideas?

P: n/a
I have a bunch of thumb nails on my site that open up a jpg in a new
window if you click on it. I would like to know if there is a way that
I can make it so that if you click on a particular thumb nail that the
link that is associated with it will open up in a pop up that is 700
X500. I know how to do this by defining each link (thumb nail) but
since I have about 100 thumb nail links that would be too much work.
Is there something that I can put into the <head> that will make ALL
my links in the body open up in a pop up?

The page I want to do this with is at
www.eriksworld.org
The thumb nail frame.

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


P: n/a
Erik <st*************@hotmail.com> wrote in message
news:b7*************************@posting.google.co m...
I have a bunch of thumb nails on my site that open up a jpg in a new
window if you click on it. I would like to know if there is a way that
I can make it so that if you click on a particular thumb nail that the
link that is associated with it will open up in a pop up that is 700
X500. I know how to do this by defining each link (thumb nail) but
since I have about 100 thumb nail links that would be too much work.
Is there something that I can put into the <head> that will make ALL
my links in the body open up in a pop up?

The page I want to do this with is at
www.eriksworld.org
The thumb nail frame.

All the best
Erik
Sweden

The following can be improved on or done differently, but
it is one possibility...

<HTML>
<HEAD>
<TITLE>POPUP PHOTOS</TITLE>
</HEAD>

<SCRIPT LANGUAGE=JAVASCRIPT>
<!--hide script from old browsers
var win1=null;

function newwin(pname, palt)
{
win1 = window.open( '', '',

'toolbar=no,location=yes,scrollbars=no,status=no,r esizable=no,width=233,heig
ht=300,location=no');
win1.document.writeln( "<IMG SRC='" + pname + "' width=233 height=300
alt='" + palt + "' >");
}
// end hiding script from old browsers -->
</SCRIPT>

<BODY>
<img src="tn_photo.jpg" alt="tn alt text" onClick="newwin('big_photo.jpg',
'alt text');" />
</BODY>
</HTML>

Jul 20 '05 #2

P: n/a
Erik wrote:
<SNIP>


Yes, my idea is come up with a more descriptive subject title

Jul 20 '05 #3

P: n/a
DU
Erik wrote:
I have a bunch of thumb nails on my site that open up a jpg in a new
window if you click on it. I would like to know if there is a way that
I can make it so that if you click on a particular thumb nail that the
link that is associated with it will open up in a pop up that is 700
X500. I know how to do this by defining each link (thumb nail) but
since I have about 100 thumb nail links that would be too much work.
Is there something that I can put into the <head> that will make ALL
my links in the body open up in a pop up?

The page I want to do this with is at
www.eriksworld.org
The thumb nail frame.

All the best
Erik
Sweden


My idea is to tell people to write descriptive, meaningful but short
subject line so that if someone ever search in the newsgroup archives
for some ideas on some explicitly defined subject line, then it will be
a lot more easier for him and others as well.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #4

P: n/a
Ivo
st*************@hotmail.com (Erik) wrote in message news:<b7*************************@posting.google.c om>...
I have a bunch of thumb nails on my site that open up a jpg in ...
www.eriksworld.org
The thumb nail frame.

Yes, like has been said before: better subject lines. I tried not to
be pissed off immediately and loaded your page. However, you have
disabled my contextmenu. How do you expect help if we can't even see
your code???
Like has been said before: anti-rightclick scripts are *not necessary*
for people that never right-click, and are *annoying* and nothing but
annoying for people that do. You see, I have a marvellous 'restore
right-click' bookmarklet, that even works in frames:
javascript:for(i=0;i<document.frames.length;i++)wi th(document.frames[i]){void(document.onmousedown='return%20true');void( document.oncontextmenu='return%20true');void(docum ent.onmouseup='return%20true');void(document.body. onmousedown='return%20true');void(document.body.on contextmenu='return%20true');void(document.body.on mouseup='return%20true');}

but it only works if all frames are from the same domain, which is not
the case with your pages. That 's where I stopped. I hope you read up
on window.open method meanwhile.
HTH
Ivo
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.