Pointer Appearance in Open Browser window Behavior

G

Guest

I wish to use an image on a page to link to another page that will open in a
separate window. Thus I use the "Open Browser Window" behavior (Event:
onclick). When previewing in IE, I get the desired result when I click the
image except that when the pointer is over the image, it does not change its
appearance to the usual hand with the forefinger pointing upwards.

Any help will be greatly appreciated.
 
M

Murray

Make sure that your triggering event is applied to an anchor tag around the
image, rather than the image tag itself, e.g.,

This -

<a href="page.html" onClick="yourbehavior;return false"
target="_blank"><img...></a>

rather than this -

<img onClick="yourbehavior"...>

Always applying behaviors to anchor tags like that will always give you the
proper pointer for a cursor. Plus, when you do it the way I show, you will
have a link that works (more or less) even when javascript is disabled.
 
J

Jon Spivey

Hi,
Sounds like you have the behaviour attached to the image itself. Put a link
around the image <a href="javascript:;">..your image tag...</a> then attach
the behaviour to the link rather than the image. If you wanted to make it a
bit better you can link to the page then add return false to the javascript
code so it ends up like this
<a href="YourPage.htm" target="_blank" onclick="FP_openNewWindow(...);
return false;">

This will make it accesible for anyone with javascript turned off.
 
G

Guest

Thanks Steve,

I omitted to mention that I wanted to control the size for the new window so
that it will appear to hover over the current page. There is no provision in
the target frame approach to do this, and other customizations that the Open
Browser Window Behavior allow.
 
G

Guest

Trevor,
Jimco's Spawn works like a charm. I am most grateful for your tip.

Trevor L. said:
Birdseye said:
Thanks Steve,

I omitted to mention that I wanted to control the size for the new
window so that it will appear to hover over the current page. There
is no provision in the target frame approach to do this, and other
customizations that the Open Browser Window Behavior allow.

Try Jimco's Spawn
http://www.jimcosoftware.com/addins.aspx
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
 
T

TunnelRat

I got the same problem with FrontPage behaviors...I want to add a new page with a size of 360x300, so I use FP behaviors....everyting works from size to on click (link to new page) but when I got IE I dont see the hand point. I hope I explain it right...

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
J

Jon Spivey

Hi,
Best to apply the behavior to a link, eg
<a href="YourPage.htm" target="_blank" onclick="FP_openNewWindow(.....);
return false;">link text</a>

This way you get the hand cursor and the link will work for anyone with
script turned off.

Cheers,
Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top