SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,338
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    onClick event does not open URL

    The Wink toolkit (http://www.winktoolkit.org/previews/59/) has a JS Coverflow implementation, which works in the Safari browser. I'm trying to change the code that produces an alert to code that brings up an HTML page, but it's not working. Two lines follow, the first is the original code. The second is the modified code - the HTML page it's to open is in the same folder as the HTML page that contains this code. ("fbItem" merely describes the display colors in CSS.) The alert works fine when clicking. But clicking on the second line shows no change.

    HTML Code:
    <div class="bfItem" onclick="alert(this.innerHTML);">Clickable text goes here</div>
    <div class="bfItem" onclick="open(test_coverflow.html);">Tap to display wallpaper.</div>
    What's the correct code to open an HTML page that's in the same folder?

    Thanks!
    Steve H

  2. #2
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,338
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I found the answer: onclick="document.location='url';"


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
  •