Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-30-2002, 07:26 PM   PM User | #1
Have1abanana
Guest

 
Posts: n/a
Popups with an image map?

Hi all!

Can anyone help me do this right?
I've been trying trial and error so far.

I'm trying to make my pages popup to a specific height and specifications within an image map.

Heres the html so far (the first bit is due to my fiddling!)

<map name="wam.jpg">
<area shape="rect" coords="54,231,110,247" href="about.html" target="popup", "interlock", "width="350", height="400", location=0,
menubar=0, resizable=0, scrollbars="auto", status=0, titlebar=1, toolbar=0,
screenx=0, left=0, screeny=0, top=0">
<area shape="rect" coords="126,229,197,245" href="gallery.html" target="">
<area shape="rect" coords="216,230,324,247" href="contribute.html" target="">
<area shape="rect" coords="7,263,66,281" href="words.html" target="">
<area shape="rect" coords="79,262,135,279" href="games.html" target="">
<area shape="rect" coords="155,263,230,279" href="penpals.html" target="">
<area shape="rect" coords="251,262,355,279" href="contact.html" target="">
</map>

Thanks for any advice!

Last edited by masmedia; 12-27-2012 at 08:22 PM..
  Reply With Quote
Old 07-01-2002, 02:57 AM   PM User | #2
ACJavascript
Regular Coder

 
Join Date: Jun 2002
Location: FL, USA
Posts: 734
Thanks: 0
Thanked 0 Times in 0 Posts
ACJavascript is on a distinguished road
well what you could do is creat a function that handles the windows inquires.

Like so
-----

<script language="javascript">

function popup(url,width,height){

window.open(url,"def",width,height,location=0,menubar=0,resizeable=0,scrollbars="auto",status=0,titl ebar=0,toolbar=0)

}
</script>


--------

then you take your area and call the funtion

<area shape="rect" coords="251,262,355,279" href="javascript:popup('Whatever.html','150','160')" target="">


------

This should work(but never does hehehehe j/k)
__________________
CYWebmaster.com - See why we dot com!!
ACJavascripts.com - Cut & Paste Javascripts!
SimplyProgram.com - Personal Blog
ACJavascript is offline   Reply With Quote
Old 07-01-2002, 09:45 AM   PM User | #3
Have1abanana
Guest

 
Posts: n/a
Thanks!
I'll give it a go now.

It looks like it makes sense!
  Reply With Quote
Old 07-01-2002, 10:09 AM   PM User | #4
Have1abanana
Guest

 
Posts: n/a
AAArgghh!

It didn't work!

Any other ways to do it?

When in doubt ask the experts, I find trial and error only works if you have the know-how in the first place!

Thanks again!
  Reply With Quote
Old 07-01-2002, 04:47 PM   PM User | #5
ACJavascript
Regular Coder

 
Join Date: Jun 2002
Location: FL, USA
Posts: 734
Thanks: 0
Thanked 0 Times in 0 Posts
ACJavascript is on a distinguished road
Okay i saw where i made the error sorry.

------

<script language="javascript">

function popup(url,width,height){

window.open(url,"def","width="+width+",height="+height)

}
</script>

----------


the you call the function in the area(like before - but no errors this time hehe)

--------


<area shape="rect" coords="251,262,355,279" href="javascript:popup('Whatever.html','550','360')">



------

This should work hehe
__________________
CYWebmaster.com - See why we dot com!!
ACJavascripts.com - Cut & Paste Javascripts!
SimplyProgram.com - Personal Blog
ACJavascript is offline   Reply With Quote
Old 07-01-2002, 05:54 PM   PM User | #6
Have1abanana
Guest

 
Posts: n/a
Brilliant!
Thanks for all your help ACJ, it works like a dream!
  Reply With Quote
Old 07-01-2002, 09:08 PM   PM User | #7
ACJavascript
Regular Coder

 
Join Date: Jun 2002
Location: FL, USA
Posts: 734
Thanks: 0
Thanked 0 Times in 0 Posts
ACJavascript is on a distinguished road
It was my pleasure


HappyScripting
__________________
CYWebmaster.com - See why we dot com!!
ACJavascripts.com - Cut & Paste Javascripts!
SimplyProgram.com - Personal Blog
ACJavascript is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:42 AM.


Advertisement
Log in to turn off these ads.