Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    loading a .html document

    I was wondering how to load a new html file in the same window using onClick, as if I were clicking a link....

    Code:
    onClick="window.document.open('mypage.html')"
    in the TD tag didn't get me very far... nothing happens

    So let's say I do this...

    Code:
    <TABLE>
      <TR>
          <TD onMouseOver="this.style.background='#0000cc'" onMouseOut="this.style.background='#000080'"><A HREF="mypage.html">my link</a>
      </TR>
    </table>
    but I don't want the <A> tag... I want to make the whole<TD> linkable using onClick... any help is appreciated, thanks!

    Yardgnome

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    onclick="location.href='mypage.html';"
    I am the luckiest man in the world

  • #3
    New Coder
    Join Date
    May 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks, next question

    First of all, thanks... that was easier then I thought

    Ok, I did that.. and it worked great when I incorporated on my main page, but when I did on some other pages (I pasted the code) it will tell me permission denied on some of the links.... but only on the other pages I pasted it to. Does this make sense? Im using it in the same manner (basically as a menu) on all the pages. If more information is needed, let me know. But if someone knows reasons why location.href="myfile.html" would yeild a permission denied alert, please let me know. Thanks!

    Yardgnome

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts

    Re: thanks, next question

    Originally posted by Yardgnome
    Does this make sense?
    no
    I am the luckiest man in the world


  •  

    Posting Permissions

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