Skip navigation
hobittual
Currently Being Moderated

<A> onclick not in behaviors menu?

Aug 3, 2012 1:35 AM

I have used this little tutorial for opening a new browser window before:

 

http://alt-web.blogspot.co.uk/2012/03/create-pop-up-window-in-dreamwea ver.html

 

It worked a charm. So I found it out again to do the same job, only this time <A> onclick and all its <A> buddies are not in the menu. They were there the last time I did this, and the tut expects them to be there,

I have checked on my previous use of this behavior and the only difference I can see is that I clicked on an image and not text to trigger it all off.

I have just managed it again by using a logo in the sentence, but what is going wrong when I try text?

 

Cheers

 
Replies
  • Currently Being Moderated
    Aug 3, 2012 2:01 AM   in reply to hobittual

    Just choose 'onClick' from the list

     

     

    When you select an image the 'A onClick' appears in the list BUT does not if you just use text as a link. Both are the same and do the same job. What DW is really saying is - apply the link to the 'anchor' tag which surrounds the image. When no image is present it doesnt need to as the link will be attached to the selected element, which is the anchor tag.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 10:01 AM   in reply to hobittual

    What does your link look like (similar to the below)?

     

     

    <a href="Javascript:()" onclick="MM_openBrWindow('http://www.bbc.co.uk','','width=500,height=500')">link</a>

     

     

    and the <script> at the top of your page (similar to below)?

     

     

    <script type="text/javascript">

    <!--

    function MM_openBrWindow(theURL,winName,features) { //v2.0

      window.open(theURL,winName,features);

    }

    //-->

    </script>

     

     

    I don't get any new browser tabs opening, just a pop up window.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 10:29 AM   in reply to hobittual

    <a href="javascript:;" onclick="MM_openBrWindow('vinvid.htm','vinvid','width=660,height=500' )">Vinny</a>

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 10:35 AM   in reply to hobittual

    Your link should be as below: swap the first instance of vinvid.htm for Javascript();

     

     

    <a href="Javascript:()" onclick="MM_openBrWindow('vinvid.htm','vinvid','width=660,height=500' )">Vinny</a>

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 11:38 AM   in reply to hobittual

    Thanks I can see now, but my tut did not tell me that.

    It does in step #10:

    • Go back to the Properties Panel (Fig. 4) and replace the first URL in the link field with javascript:()  This makes the primary link into a null link so the page doesn't open twice.

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 3, 2012 11:58 AM   in reply to Nancy O.

    Just so you'll know, there is no difference between the syntax versions posted here -

     

    <a href="javascript:;"

     

    vs

     

    <a href="javascript:()"

     
    |
    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