+ Reply to Thread
Results 1 to 2 of 2

Thread: use div to redirect to another page

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    45

    use div to redirect to another page

    I have a div that acts like a button , i use it to redirect to another page.
    But this time i want it to run some PHP code and then redirect to the page
    Here is some code :
    Code:
    <div class="MyDiv" onclick="location.href="checkid.php";"></div>

  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    7
    Inside HTML
    Code:
    <a class="MyDiv" href="checkid.php"></a>
    Inside CSS
    Code:
    a.MyDiv {
        text-decoration: none;
        color: inherit;
        display: block;
    }

+ Reply to Thread

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