Results 1 to 6 of 6

Thread: Do not Agree – If this is clicked the person should be sent back to homepage

  1. #1
    Join Date
    Dec 2006
    Location
    Conshohocken, PA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Do not Agree – If this is clicked the person should be sent back to homepage

    Do not Agree – If this is clicked the person should be sent back to the home page so that they wouldn’t be able to go on and enter any more information on this page.

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Yes. Or redirected to nickkids.com

    Was there a question here?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Dec 2006
    Location
    Conshohocken, PA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    How do i make "do Not Agree" or a "cancel" button send viewer back to index page when they click these buttons above in a website page?

    ;-)

  4. #4
    Join Date
    Apr 2006
    Location
    London
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by geldesigns View Post
    How do i make "do Not Agree" or a "cancel" button send viewer back to index page when they click these buttons above in a website page?

    ;-)

    Is this what you mean?

    Code:
    <INPUT onclick="self.location.href=('http://google.com')" type=button value="I do not Agree">
    Last edited by VatsaL; 12-21-2006 at 05:24 PM.

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    There are a few ways to do it, the first option would be if you wanted a confirm box to pop up when a JS function is called (ie: doAgree() ). Take a look at the following snippet:

    Code:
    function doAgree() {
    
       if (confirm("Click 'OK' to agree!") {
         window.location='agree.html'; /*proceed to agree.html*/
       }
    
       else {
         window.location='index.html'; /*send to index.html*/
       }
    }
    This pops up a confirm box (like the one on here when you click "Log Out"), if the user clicks "OK" then it redirects to the next page (edit as you like), if they hit "Cancel", then it redirects to the index.html page.

    The next option would be if you wanted it somewhere on you page in a form. (ie: a list of Terms and Agreements that they must agree to before continuing.)

    Below would be the submit ("Agree") and cancel ("Cancel") buttons at the end of the form.

    Code:
    <input type="submit" value="Agree">  <input type="button" value="Cancel" onclick="window.location='index.html';">
    Hope this helps out.

    EDIT: Sorry VatsaL, posted at the same time.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Apr 2006
    Location
    London
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by thetestingsite View Post

    EDIT: Sorry VatsaL, posted at the same time.
    That happened with me the 4th time this week.

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
  •