Very Basic Javascript Popup window question

  • The Apostle of God
  • Beginner
  • Beginner
  • User avatar
  • Posts: 54
  • Loc: SDSU, SD, USA

Post 3+ Months Ago

I'm copying this directly from one of my thumbnail links I'm trying to create on my site... I can't figure out how to:
a) give it a black background
b) make it pop back on top when another identical (save for the image) link is clicked aht the window's image changes!
Code: [ Select ]
<A HREF="/ent/s3/exile/exile000001.jpg" TARGET="fullsize" ONCLICK="window.open('/ent/s3/exile/exile000001.jpg', 'fullsize', 'width=370,height=200'); return false"><img src="/ent/s3/exile/exile000001t.jpg"></A>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9072
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

To give it a black background, instead of opening up the picture directly as:

/ent/s3/exile/exile000001.jpg

You need to create a html page such as

/ent/s3/exile/exile000001.html

On this html page you can show your image and make your background black.
  • The Apostle of God
  • Beginner
  • Beginner
  • User avatar
  • Posts: 54
  • Loc: SDSU, SD, USA

Post 3+ Months Ago

Thanks. I'll do that. I guess I thought there might be some magic you could whip up ;)

But still, how do I make the window come back on top instead of droping behind?
  • The Apostle of God
  • Beginner
  • Beginner
  • User avatar
  • Posts: 54
  • Loc: SDSU, SD, USA

Post 3+ Months Ago

To answer my b question, in case someone in the future has a similar question:
Code: [ Select ]
<p><a href="/ent/s3/exile/exile000049.jpg" target="fullsize" onclick="var w = window.open(this.href, 'fullsize', 'width=370,height=200');w.focus();return false;"><img src="/ent/s3/exile/exile000049t.jpg" style="border: 0px;" alt="" /></a></p>
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

Pop ups r like soooo evil man please dont do it!! :roll:
  • The Apostle of God
  • Beginner
  • Beginner
  • User avatar
  • Posts: 54
  • Loc: SDSU, SD, USA

Post 3+ Months Ago

How is it evil to be able to look over a group of 40 images, click on one, and it pop up? And then you click on another one, and it pops up in the same window? How is that evil?
  • sexay_hamster
  • Born
  • Born
  • User avatar
  • Posts: 1

Post 3+ Months Ago

i think that he thought you were making advertisement popups :wink:
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

Hey sexay_hamster. Welcome to Ozzu. I think that is what Musik thought he meant, and a small FYI, Musik is a she.

For The Apostle...I have never in seven years seen "fullsize" as a valid target attribute, and I can positively guarantee you that you won't see that listed anywhere in the W3C HTML specifications. Some proprietary program probably *cough - Microsoft) did that one up.

Try target="_blank". For starters. However, I'm still not sure that will do what you want in every case depending on the browser that's being used. The only valid target attributes that I'm aware of are:

target="_blank"
target="_self"
target="_main"
target="_parent"
target="_top"

Try blank or top. Those should both open a new Window. Top, may accomplish your goal. If neither do, you may have to look into a javascript of some sort to get the new window to pop back up when the next image is selected.
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

I agree with musik, even if your intentions ARE good, pop-ups === lesser evil

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 67 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.