Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<map> tag and controlled popups...

Status
Not open for further replies.

karmic

Technical User
Jul 20, 2001
973
CA
Got a problem that just escapes me...

I'm doing some test work on a simple site that uses a full jpg for every different page. Using the map tag for button coordinates. I want to put in a site search thru a popup window... Is there a way to have a new controlled popup window within the map tag?
No problem to get a new window

area shape="rect" coords="0, 58, 141, 88" href="search/form.html" target="_blank"

but I need to control the actual size and position. Remove the search buttons and what not to gain a clean popup window on the click of a button.

Been toying with javascripting but I can't seem to get it to work within the <area> and <map> tag.

Thanks...


~ The day I think I know it all, i'm changing careers ~
 
Check this FAQ from the JavaScript Forum: faq216-329

I used a function on a site to open a window from a click on an image map, here is a snippet:

Function:
Code:
<script language=javascript type=&quot;text/javascript&quot;>
	<!-- Hide script from old browsers
        function newWindow(portgif) {
	portWindow = window.open(portgif, 'portWin', 'width=285,height=450,scrollbars=yes, right='+rightPos+' ,top=0')
	portWindow.focus()
	}
	rightPos=0
	if (screen) {
		rightPos=screen.width-225
		}
	//End hiding script fom old browsers -->
	</script>
Map Code:
<map name=&quot;faceMap&quot;>
<area href=&quot;javascript:newWindow('bios.htm#joann')&quot; title=&quot;JoAnn&quot; shape=&quot;circle&quot; coords=&quot;131, 32, 23&quot;>
<area href=&quot;javascript:newWindow('bios.htm#charlie')&quot; title=&quot;Charlie&quot; shape=&quot;circle&quot; coords=&quot;168, 70, 23&quot;>
<area href=&quot;javascript:newWindow('bios.htm#christa')&quot; title=&quot;Christa&quot; shape=&quot;circle&quot; coords=&quot;52, 113, 26&quot;>

DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top