Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > javascript popup using html "map" tag?

Reply
Thread Tools

javascript popup using html "map" tag?

 
 
Mosher
Guest
Posts: n/a
 
      03-25-2005
Hi all, is there a good way to have a popup window appear using Javascript
and the html "map" tag? Here is my code:

<map name="navigation">
<area shape="rect" coords="5,57,45,70" href="index.php" alt="Home">
</map>

I would like to have this link be a Javascript "onclick" type popup function
with no scrollbar, etc.

Thanks,

Mosher


 
Reply With Quote
 
 
 
 
kaeli
Guest
Posts: n/a
 
      03-28-2005
In article <(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed)
enlightened us with...
> Hi all, is there a good way to have a popup window appear using Javascript
> and the html "map" tag? Here is my code:
>
> <map name="navigation">
> <area shape="rect" coords="5,57,45,70" href="index.php" alt="Home">
> </map>
>
> I would like to have this link be a Javascript "onclick" type popup function
> with no scrollbar, etc.
>


Not the best solution in the world by any means, but it should work for most
people:

<area shape="rect" coords="5,57,45,70" href="javascript:window.open
('index.php','','height=400,width=
400,toolbar=no,scrollbar=no,resizable=yes'" alt="Home">

Note that people who use tabbed browsers and prefer to middle-click to open
links in tabs will hate you.

I'm not sure if the area element supports onClick, but this would be a better
solution if it does: (I'm too lazy right now to go look; I just woke up
*LOL*)

<area shape="rect" coords="5,57,45,70" href="index.php" onClick="window.open
('index.php','','height=400,width=
400,toolbar=no,scrollbar=no,resizable=yes';return false;" alt="Home">

That way, clicking on the link would open in a new window for left-clicks,
but people middle-clicking or right-clicking or people without script enabled
could still use it as they desired.

--
--
~kaeli~
You can't have everything. Where would you put it?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Watir Javascript popup handler: How to handle the popup dialog? Rajesh Ruby 0 07-31-2007 04:36 AM
ASP.NET JavaScript Popup, No Popup Using Back Button dapkniht ASP .Net 1 03-08-2006 08:49 AM
Popup Window Popup Timing =?Utf-8?B?Sm9obiBXYWxrZXI=?= ASP .Net 3 11-04-2005 07:33 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM
trigger event on opener from popup when closing it or run opener script from popup Urs Gubler Javascript 0 07-02-2003 02:08 PM



Advertisments