Skip navigation
Currently Being Moderated

Open browser window behavior in Mac not working right

Jan 29, 2011 10:07 AM

I am simply selecting my text in my html document and then selecting "Open Browser Window" from the Behaviors panel.  I then put in the info for the file I want it to open along with the size, etc...

 

When I test it in the browser (Safari) the link works but the rollover features don't show ... it doesn't show as a link in the browser window.  I followed the tutorial exactly and the instructor's browser showed the link as a rollover.  It's driving me a bit crazy.

 

I'm using CS5 on the latest version on Mac OS (Snow Leopard).

 

I can put up an example if needed.

 

Thanks so much for any assistance.

 

BC

 
Replies
  • Currently Being Moderated
    Jan 29, 2011 10:39 AM   in reply to bernwa

    Safari can be stubborn. Clear the Cache, either from the Safari Menu or by pressing command + option + E.

     

    When using Safari as the preview browser, it's helpful to set check Disable Caches in the Develop Menu. If the Develop Menu does not show in the Menu Bar, open the Preferences, go to Advanced and check Show Develop menu in menu bar.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 29, 2011 12:15 PM   in reply to bernwa

    For best answers, we need to see a link to your page, or post your CSS and HTML code into the forum reply using >> Syntax highlighting, plain.

     

    Without seeing your code, I'm guessing you have applied the onClick behavior to something other than an anchor <a> tag.

     

    Your code should look something like this:

     

    <a href="javascript:()" onclick="MM_openBrWindow('some-link.html','','resizable=yes,width=400,height=400')">Some link</a>
    
    

     

     

     

    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 29, 2011 12:56 PM   in reply to bernwa

    The pound symbol is kind of a placeholder for hyperlinks. It makes links behave like links when you don't - yet - have a real link to put there. If DW would insert it by default, it may generate more confusion that not inserting it does.

     

    Yep, I was referring to the Safari Preferences. Sorry for not specifying that.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 29, 2011 1:01 PM   in reply to bernwa

    In any case I think it might be a flaw that Dreamweaver does not insert the "#" automatically for a open browser window behavior.  Any ideas on that?


    It's not a flaw in DW.

     

    There are several ways of creating a trigger point for an open window behavior and a null link (#) - a link that doesn't actually go anywhere but only exists to fire a Javascript behavior in browsers - is one of the least preferred.

     

    A real link plus a "return false" in the Javascript is more accessible.

     

    See

    http://apptools.com/rants/popups.php

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 29, 2011 1:32 PM   in reply to bernwa

    The video tutorial I watched


    Can you provide a link to the tutorial?

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 29, 2011 4:17 PM   in reply to bernwa

    The video tutorial I watched show the instructor add a open browser window behavior to a text link.  As soon as she did that it placed the "#" symbol in the link window of the property inspector by default.  Now, she was in Windows and I am in Mac.  But my system does not place that "#" in automatically like hers did.  I am trying to determine why hers would and mine wouldn't.  Is it Windows verses Mac?


    The null link must have been in place prior to the behavior being applied.

     

    The behavior inserts Javascript inside an existing HTML tag.

     

     

    If it's applied to text already wrapped with an <a> tag then you get

     

    <a href="#" onclick="MM_openBrWindow('','','')">hello</a>

     

     

    If there is no link (<a> tag), just plain text, then the Javascript is inserted inside the <p> tag (if there is one).

     

    <p onmouseover="MM_openBrWindow('','','')">click me</p>

     

     

    If there are no <p> or <a> tags, the Javascript is inserted into the <body> tag.

     

    <body onload="MM_openBrWindow('','','')">

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 30, 2011 11:35 AM   in reply to bernwa

    I understand completely the purpose of the # but is it possible that Windows automatically outs the "#" in automatically and Mac doesn't?  That's all I'm trying to determine.


    I'm using CS5 on Win 7 and, when I'm using the behavior, at no point does DW insert the "#" automatically.

     

    All the behavior does is insert the Javascript code.

     

    I have to manually select an existing HTML tag on the page to which the behavior is applied (<a>, <p> etc)

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 9:23 AM   in reply to bernwa

    I am having the same problem but it looks like Dreamweaver is inserting the pound sign.  If you go to apartmentanchor.com/clear-lake/park-at-armand-bayou.html and click on the floor plans tab, then click one of the floor plans, it works on this page.  But if you try to do the same on a different page in a different folder: apartmentanchor.com/katy-pages/residences-at-cinco-ranch.html, and click on the floor plans tab, and then click one of the floor plans, it redirects to my home page.  I don't understand why it works on one page and not the other and it is the same code???

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 9:40 AM   in reply to frankieb83

    The Katy page i trying to open these images (for example) -

     

    http://apartmentanchor.com/floorplan-pages/katy-floorplans/10124-floor plans/692-square-feet-10124.jpg

    http://apartmentanchor.com/floorplan-pages/katy-floorplans/10124-floor plans/720-square-feet-10124.jpg

     

    Click either and you will get your link page not the image.  Looks like those images are not in the location specified and the page that opens is your generic file not found page for the site.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 9:57 AM   in reply to MurraySummers

    I'm not sure what's going.  The files are all in the correct folders.  These links all worked at one point in time and then stopped working over time. the code looks like this:

    <td><a href="#" class="fpbutton" onclick="MM_openBrWindow('../floorplan-pages/spring/10145-floorplans/ 594-square-feet-10145.jpg','','width=414,height=376')">594 Square Feet</a></td>

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 10:03 AM   in reply to frankieb83

    All I can tell you is that when you browse to that link URL, you do not see a JPG image, you see this page -

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <title>Apartment Anchor - Free Apartment Locating Service | ApartmentAnchor.com</title>

    <style type="text/css">

    .content {

    width: 400px;

    }

    a {

    font-size: 20px;

    }

    </style>

      <script type="text/javascript">

     

      var _gaq = _gaq || [];

      _gaq.push(['_setAccount', 'UA-25512543-2']);

      _gaq.push(['_trackPageview']);

     

      (function() {

        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

      })();

     

    </script>

    </head>

     

    <body>

    <div class="content">

    <ol>

    <li><a href="http://apartmentanchor.com/blogs">Houston Apartment Blog</a></li>

    <li><a href="woodlands/woodlands-tx-apartments.html">Woodlands Texas Apartments</a></li>

    <li><a href="clear-lake/clear-lake-tx-apartments.html">Clear Lake Texas Apartments</a></li>

    <li><a href="cypress-texas/cypress-tx-apartments-for-rent.html">Cypress Texas Apartments</a></li>

    <li><a href="river-oaks/houston-river-oaks-apartments.html">Houston River Oaks Apartments</a></li>

    <li><a href="spring-texas/spring-apartments-for-rent.html">Spring Texas Apartments</a></li>

    <li><a href="league-city/league-city-tx-apartments.html">League City Texas Apartments</a></li>

    <li><a href="houston-texas-apartment-search-engine.html">Houston Apartment Search Engine</a></li>

    <li><a href="get-availability-information.html">Get Apartment Listing</a></li>

    </ol>

    </body>

    </html>

     

    Do you have that page on your site?  Is that your home page?

     

    Perhaps you have some hidden redirection going on via an htaccess file?  I dunno....

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 10:28 AM   in reply to MurraySummers

    Yes, This is my home page.  I called Go Daddy and they couldn't figure it out.  They were thinking it had something to do with my folder names but then recanted that idea.  I don't have any redirects so I don't know what's up....Guess I'll keep searching for a solution or get a professional to look at it.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 11:01 AM   in reply to frankieb83

    I'm pretty confident that something is happening to redirect you to the home page. I'd stick on with GD support.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 11:01 AM   in reply to MurraySummers

    And by the way, most of us *are* professionals!

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 11:04 AM   in reply to frankieb83

    When you go to your GoDaddy hosting admin area, under Settings > 404 Error Options do you by chance have the radio button checked for "Use Home Page"?

     

    That would cause a .jpg file to come up as your home page if it were not in the exact location specified by a link.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 28, 2012 11:30 AM   in reply to Jon Fritz II

    I don't think that's it because if you intentionally truncate the link to some parent directory of the image, you get a different 404 file.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points