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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Yes or no alert with the next code.

    <script language="JavaScript" type="text/javascript">
    if (confirm("will you go to next.html?"))
    {
    self.location = 'next.html?';
    } else {
    history.go(-1);
    }
    </script>

    The above code will give "yes" or "no" alert.
    If a user clicks "yes", it will go to next.html.
    If the user clicks "no", it will go to the previous page.

    Now It's turn to tell what I want.

    I like to make a "yes" or "no" alert like the following.
    If a user clicks "yes", the next code in the page will be read.
    If the user clicks "no", it will go to the previous page without reading the next code in the page.


    Can I do it?
    Last edited by joonstar; 03-12-2004 at 01:10 AM.

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    if (!confirm("will you go to next.html?"))
    {
    history.go(-1);
    } else {
    /* do whatever; */
    }
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    Regular Coder
    Join Date
    Oct 2002
    Location
    Milwaukee, Wisconsin
    Posts
    123
    Thanks
    1
    Thanked 0 Times in 0 Posts
    okay so basically you want to inclu a page right? liek make it so it liek shows the code or soething of the page lik eby opening it,, well the onl possible way i wul dknow of is the by creatign an activeX file stream then opening the file that way but im unsure if thta would even work

    the best i can offer is that you have the locotion go and have somehting like ?page=hello.php at the end of the addess(make sur eyou change the page to something with a php enabled address) and then have php include the page, like: <? include($page); ?>

    and that shoudl work


  •  

    Posting Permissions

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