Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 24, 2008, 05:53:41 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: DW4 - open in new browser window command  (Read 965 times)
mxgirl
Spaceship Captain
*****
Offline Offline

Posts: 106


« on: February 19, 2007, 01:21:29 PM »

Hey all-
I'm using DW4 and I want to make it so when someone clicks on an image, the same image only larger comes up in another window. 

I can get it to work with 'behaviors', but only 'onmouseover', not 'onmouseclick', which means as soon as the mouse goes over the small image, the large image pops up in a separate window.  How can I get it to do that only if they click on the image? Confused  Thanks.
Logged
fstjohn
Intergalactic Superstar
*****
Offline Offline

Posts: 169



WWW
« Reply #1 on: March 22, 2007, 02:31:01 PM »

wish i had a copy of DW4 around so I could try and duplicate what you're seeing but let me take a few stabs and I apologize in advance if I'm suggesting obvious stuff you already did:

1. Does the "onClick" not appear in your behaviors menu? If not, give your desired graphic or text a hyperlink of "javascript:;" (minus the quotes) and see if onClick shows

2. If you're typing the behavior in html, I dont know if "onClick" is different than "onMouseClick", but it's worth a try

like this:
<a href="javascript:;"><span onClick="MM_openBrWindow('http://neutralground.com/img/items/114687367790328300.jpg','','scrollbars=yes,resizable=yes,width=200,height=275')"> test </span></a>
Logged

mxgirl
Spaceship Captain
*****
Offline Offline

Posts: 106


« Reply #2 on: March 23, 2007, 03:03:46 PM »

Hi fstjohn-
There doesn't appear to be an 'onMouseClick' behavior in DW4, just 'onMouseOver'.  I tried simply changing the wording in the script, but it didn't work (hey- ya never know!).  I think I'm going to change the design so I don't need to open the pics in another window.  Thanks for the reply tho! Thumbs Up
Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3104



« Reply #3 on: March 23, 2007, 03:15:16 PM »

Intrinsic events:

onblur leave this element
onclick single click on element
ondblclick double click on element
onfocus move focus to this element

onkeydown press a key
onkeypress press and release a key
onkeyup release a key

onload when page loaded
onunload page unloaded (load another page)
onreset click on "reset" button
onsubmit click on "submit" button

onmousedown press mouse button over element
onmousemove move mouse
onmouseout mouse leaves element
onmouseover mouse moves over element
onmouseup release mouse button over element

onselect selection list pick
onchange change contents of element
Logged

SteveW
Master Jedi
*****
Offline Offline

Posts: 1394


WWW
« Reply #4 on: March 24, 2007, 01:50:52 AM »

I think this will do it, unless I'm misunderstanding what you want to do.  It doesn't require JavaScript.  It's the part in bold that forces a new window.

The first line is the full-sized image that will open in the new window.  The second line is the thumbnail of it.  Create the thumbnail in any image editor, such as MS Picture Manager.

<a href="imagebig.jpg" target="_blank">
<img src="imagesmall.jpg" border="0" alt="Click for full size image in a new window."></a>

I believe the target property can be used in any <a> anchor tag.
Logged





Mt. Shasta
photo gallery.


Don't forget Lunarpages 24/7/365 support documentation:
Flash Tutorials, Knowledge Base FAQ Articles, cPanel Manual, Glossary/Dictionary, Support Tickets,
and
Forum Search.

Drilldown
Galactic Royalty
*****
Offline Offline

Posts: 306


« Reply #5 on: March 24, 2007, 06:26:24 AM »

Could someone elucidate the reasoning behind forcing a new window to open versus linking to another page in the same window?
Logged
philvis
Master Jedi
*****
Offline Offline

Posts: 1063


« Reply #6 on: March 24, 2007, 06:37:45 AM »

Generally, people think the visitor won't return to their site if another site opens in the same window.

In this case, I don't know the reason. Seems a hassle to me to close a window after seeing a picture.

For those who don't mind using javascript, here's a great way to display pictures without leaving the page or opening a new window: http://vikjavev.no/highslide/

There's a thread about it somewhere in these forums if you search for it.
Logged

Drilldown
Galactic Royalty
*****
Offline Offline

Posts: 306


« Reply #7 on: March 24, 2007, 06:53:12 AM »

Interesting. It's possible that once in the new window the user will try to click the back arrow. Since it won't work, they would logically surf away. An hour later they might notice they had two windows open and wonder when that happened. Confused
Logged
SteveW
Master Jedi
*****
Offline Offline

Posts: 1394


WWW
« Reply #8 on: March 24, 2007, 08:50:19 AM »

When browsing, I use Ctrl+Click to open links in a new window (tab) most of the time.  It allows clicking links to load a whole bunch of pages at once from the same start page. It also avoids using the Back button, which causes the previous page to reload. That's a waste of at least several seconds on dialup, to view the same page that was there just a short time ago and probably hasn't changed.   

However, using target="_blank" on a website isn't such a good idea, because it takes the choice away from the user.  Anyone who habitually opens pages in a new window already knows how to do it, so it doesn't help them.  And for the people who don't want it to open in a new window, they have no way to make that choice. And as Drilldown mentioned, some people find it confusing.   
Logged





Mt. Shasta
photo gallery.


Don't forget Lunarpages 24/7/365 support documentation:
Flash Tutorials, Knowledge Base FAQ Articles, cPanel Manual, Glossary/Dictionary, Support Tickets,
and
Forum Search.

mxgirl
Spaceship Captain
*****
Offline Offline

Posts: 106


« Reply #9 on: March 24, 2007, 01:02:52 PM »

Quote
Could someone elucidate the reasoning behind forcing a new window to open versus linking to another page in the same window?
  The thumbnails are pics of t-shirts and I want the customer to be able to view a close-up image of the tee, but only if s/he clicks on a particular thumbnail.  The pop-up window would be about 500 x 600, not full size.

I haven't had a chance to try your suggestions but I will.  Thanks for taking the time to answer. Thumbs Up
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM