HighDots Forums  

open new browser window

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss open new browser window in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
fatpad
 
Posts: n/a

Default open new browser window - 07-05-2004 , 05:58 AM






I recently used the open browser window in a page and found out that if the
image with the behavoiur attachted sits far down the page, the new window will
open up right at the top of the page, forcing the user to scroll down to carry
on viewing the page where he clicked on the images. In other words I don't
know how to tell the new browser window to open just above the image. I tried
entering x and y values into the code but no luck.

Any suggestions?

Karin from South Africa

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>


<h3 align="center"><font color="#006699"> <a href="#"
onClick="MM_openBrWindow('features_three.htm','',' width=300,height=300')"><img
src="images/small.jpg" alt="click her for larger view" width="100" height="100"
border="0"></a> </a>
<a href="#"
onClick="MM_openBrWindow('features_four.htm','','w idth=300,height=300')"><img
src="images/sm3.gif" alt="click her for larger view" width="100" height="100"
border="0"></a>
</font></h3>


Reply With Quote
  #2  
Old   
Osgood
 
Posts: n/a

Default Re: open new browser window - 07-05-2004 , 06:18 AM






Try using a named anchor. Insert>Named Anchor. Position one just above
the image and name it something. I've called mine 'marker'.

Then in the code below include this, #marker after the htm file.

<h3 align="center"><font color="#006699"> <a href="#"
onClick="MM_openBrWindow('features_three.htm#marke r','','width=300,height=300')">



fatpad wrote:

In other words I don't
Quote:
know how to tell the new browser window to open just above the image. I tried
entering x and y values into the code but no luck.




Reply With Quote
  #3  
Old   
Singularity.co.uk
 
Posts: n/a

Default Re: open new browser window - 07-05-2004 , 07:47 AM



fatpad

Try replacing the '#' with 'javascript:;' as follows:

<a href="javascript:;"
onClick="MM_openBrWindow('features_three.htm','',' width=300,height=300')"><i
mg src="images/small.jpg" alt="click her for larger view" width="100"
height="100" border="0"></a>

Hope that helps.

Brendan

--
___________________________________
Brendan.Collins (AT) NOSPAMSingularity (DOT) co.uk
Remove the NOSPAM
http://www.singularity.co.uk
___________________________________


"fatpad" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I recently used the open browser window in a page and found out that if
the
image with the behavoiur attachted sits far down the page, the new window
will
open up right at the top of the page, forcing the user to scroll down to
carry
on viewing the page where he clicked on the images. In other words I
don't
know how to tell the new browser window to open just above the image. I
tried
entering x and y values into the code but no luck.

Any suggestions?

Karin from South Africa

script language="JavaScript" type="text/JavaScript"
!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//--
/script


h3 align="center"><font color="#006699"> <a href="#"

onClick="MM_openBrWindow('features_three.htm','',' width=300,height=300')"><i
mg
Quote:
src="images/small.jpg" alt="click her for larger view" width="100"
height="100"
border="0"></a> </a
a href="#"

onClick="MM_openBrWindow('features_four.htm','','w idth=300,height=300')"><im
g
Quote:
src="images/sm3.gif" alt="click her for larger view" width="100"
height="100"
border="0"></a
/font></h3




Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.