Professional Web Applications Themes

what is the javascript for making a link go nowhere - Macromedia Dreamweaver

I know there is a javascript that you can use on a rollover or other decorativelink that doesn't make the browser do anything. What is it? If I put a # in the href tag it does the dance we all know and love....

  1. #1

    Default what is the javascript for making a link go nowhere

    I know there is a javascript that you can use on a rollover or other decorativelink that doesn't make the browser do anything. What is it? If I put a # in the href tag it does the dance we all know and love.


    7mary4 Guest

  2. #2

    Default Re: what is the javascript for making a link go nowhere

    "7mary4" com wrote:
     

    You can use "javascript:;" or "javascript:void(0);" if it makes you feel
    better.

    --
    Jerry Baker

    Automatic, configurable ALT text - Insert Image+ Extension
    Switch doctypes on the fly with a mouse click - Insert (x)HTML Doctypes
    http://www.dwfaq.com/store/merchants.asp?MerchID=Jerry+Baker

    Jerry Guest

  3. #3

    Default Re: what is the javascript for making a link go nowhere

    GeoBear wrote: 

    Linking to "#" tells the browser to look for an anchor, whereas
    "javascript:;" is just a link to execute javascript with no instructions.

    --
    Jerry Baker

    Automatic, configurable ALT text - Insert Image+ Extension
    Switch doctypes on the fly with a mouse click - Insert (x)HTML Doctypes
    http://www.dwfaq.com/store/merchants.asp?MerchID=Jerry+Baker

    Jerry Guest

  4. #4

    Default Re: what is the javascript for making a link go nowhere

    In the evolving scheme of things, we tend to use real links with returns
    false or # with returns false instead of Javascript null links. There are a
    number of reasons for this, all good. Download the sample chapter from our
    Foundations book. I believe we have a good discussion of this.

    --
    Al Sparber - PVII
    http://www.projectseven.com
    Dreamweaver Extensions - DesignPacks - Tutorials - Books
    ---------------------------------------------------------------------
    The PVII Newsgroup | news://forums.projectseven.com/pviiwebdev
    The CSS Newsgroup | news://forums.projectseven.com/css
    ---------------------------------------------------------------------



    "GeoBear" <com> wrote in message
    news:bgua7j$kp5$macromedia.com... 
    http://www.projectseven.com/tutorials/css_menus/list_01/index.htm, checked
    out the source code and found this: 
    Javascript links in source code I've worked with, and I'm searching for an
    example... 
    height="9" class="menuMarker" alt=""> <a href="javascript:;">Link 5</a></p> 
    height="9" class="menuMarker" alt=""> <a href="javascript:;">Link 6</a></p> 
    height="9" class="menuMarker" alt=""> <a href="javascript:;">Link 7</a></p> 
    height="9" class="menuMarker" alt=""> <a href="javascript:;">Link 8</a></p> 
    "javascript:;" ??? 


    Al Guest

  5. #5

    Default Re: what is the javascript for making a link go nowhere

    Al Sparber- PVII wrote: 

    What about people who have JavaScript disabled?

    --
    Jerry Baker

    Automatic, configurable ALT text - Insert Image+ Extension
    Switch doctypes on the fly with a mouse click - Insert (x)HTML Doctypes
    http://www.dwfaq.com/store/merchants.asp?MerchID=Jerry+Baker

    Jerry Guest

  6. #6

    Default Re: what is the javascript for making a link go nowhere

    On Thu, 07 Aug 2003 22:37:43 -0700, Jerry Baker
    <biz.nospam> wrote:
     

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


    Gary
    Gary Guest

  7. #7

    Default Re: what is the javascript for making a link go nowhere

    Gary White wrote: 
    >
    > See http://apptools.com/rants/popups.php.[/ref]

    You know, it wasn't always the case that return false would inactivate a
    link. For some light reading, check out:

    http://bugzilla.mozilla.org/show_bug.cgi?id=2219
    http://bugzilla.mozilla.org/show_bug.cgi?id=18693
    http://bugzilla.mozilla.org/show_bug.cgi?id=19201
    http://bugzilla.mozilla.org/show_bug.cgi?id=22832
    http://bugzilla.mozilla.org/show_bug.cgi?id=23373
    http://bugzilla.mozilla.org/show_bug.cgi?id=121052
    http://bugzilla.mozilla.org/show_bug.cgi?id=192170

    --
    Jerry Baker

    Automatic unique ALT & TITLE text for each image: Insert Image+
    Switch doctypes on the fly with a mouse click: Insert (X)HTML Doctypes
    http://www.dwfaq.com/store/merchants.asp?MerchID=Jerry+Baker

    Jerry Guest

  8. #8

    Default Re: what is the javascript for making a link go nowhere

    On Fri, 08 Aug 2003 06:54:18 -0700, Jerry Baker
    <biz.nospam> wrote:
     

    Browser bugs aside. ;-) From the dates on most of those, they look
    like they were when Moz was in beta.


    Gary
    Gary Guest

  9. #9

    Default Re: what is the javascript for making a link go nowhere

    Gary White wrote: 

    Moz is always in beta. I am using 1.5b as I type this.

    --
    Jerry Baker

    Automatic unique ALT & TITLE text for each image: Insert Image+
    Switch doctypes on the fly with a mouse click: Insert (X)HTML Doctypes
    http://www.dwfaq.com/store/merchants.asp?MerchID=Jerry+Baker

    Jerry Guest

  10. #10

    Default Re: what is the javascript for making a link go nowhere

    Well, Jerry, the idea is to not fire javascript events that are mission
    critical with null links. But that wasn't the question. If the event fires,
    let's say, a hidden menu showing pages in Section II, then this would be
    appropriate:

    <a href="SectionIIMainPage.html" onClick="ShowMenu('section2');return
    false">



    --
    Al Sparber - PVII
    http://www.projectseven.com
    Dreamweaver Extensions - DesignPacks - Tutorials - Books
    ---------------------------------------------------------------------
    The PVII Newsgroup | news://forums.projectseven.com/pviiwebdev
    The CSS Newsgroup | news://forums.projectseven.com/css
    ---------------------------------------------------------------------



    "Jerry Baker" <biz.nospam> wrote in message
    news:bgvd0m$aic$macromedia.com... 
    >
    > What about people who have JavaScript disabled?
    >
    > --
    > Jerry Baker
    >
    > Automatic, configurable ALT text - Insert Image+ Extension
    > Switch doctypes on the fly with a mouse click - Insert (x)HTML Doctypes
    > http://www.dwfaq.com/store/merchants.asp?MerchID=Jerry+Baker
    >[/ref]


    Al Guest

  11. #11

    Default Re: what is the javascript for making a link go nowhere

    > You know, it wasn't always the case that return false would inactivate a 

    #: 2219 alias:
    Resolution: FIXED


    Betas have lots of bugs. The pertinent one was fixed, it seems, rather
    quickly.

    -Al


    Al Guest

Similar Threads

  1. Replies: 2
    Last Post: February 17th, 07:49 AM
  2. Making image fields into a link
    By Mike1500 in forum Dreamweaver AppDev
    Replies: 1
    Last Post: March 22nd, 07:30 PM
  3. making a link active?
    By markhaldanephotography in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: June 1st, 04:48 AM
  4. Making text invisible using javascript
    By tim_thorne@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 4
    Last Post: April 30th, 09:21 PM
  5. Making a link to different websites
    By cavies79 webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 3
    Last Post: July 23rd, 09:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139