SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard rctneil's Avatar
    Join Date
    Jun 2005
    Posts
    1,891
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is this written ok?

    Can you please check if this is ok:

    Code:
    <a href="onclick:'zp_onload()'">Add Content To This Page</a>
    Thanks

    Neil

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do it like this:

    Code:
    <a href="javascript:zp_onload()">blah blah blah</a>

  3. #3
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rctneil
    Can you please check if this is ok:

    Code:
    <a href="onclick:'zp_onload()'">Add Content To This Page</a>
    Thanks

    Neil
    No.

    <a href='#' onclick='zp_onload();return false'>.......

    href can be set to an alternative url for browsers without JS enabled.

    Use of the JavaScript pseudo protocol
    Code:
    javascript:
    is not recommended for several reasons:

    Google: javascript +pseudo protocol

  4. #4
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    190
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <a href="onclick:'zp_onload()'">Add Content To This Page<a/>

    right?
    Failure: Failure is the dress rehearsal for success.

    Statistics: The only science that enables different
    experts using the same figures to draw different conclusions.


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
  •