Web Analytics Made Easy -
StatCounter Forms Alerts and Redirection - CodingForum

Announcement

Collapse
No announcement yet.

Forms Alerts and Redirection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Forms Alerts and Redirection

    <form name=GoTo>
    <form action= // I don't know what to put here
    method= // I don't know what to put here
    >
    <input type=text size=25 value=http://>
    <input type= // button or submit.. hmmm
    // onClick or onSubmit.. hmmm
    // =window.confirm(" Go To : "+ url +" ");

    I am unsure where to set the

    var url= // the input from the text box

    I want the address that the user enters into the text box to be entered as a var so that it can be set on confimation to be opened..

    let's say that I type in http://geocities.com
    the confirmation opens and asks me, Go To : http://geocities.com ?.. I click ok

    then a new widnow opens and http://geocities.com is opened in that second window


    Any help would be appreciated
    Younger is better, I think. Sometimes.

  • #2
    <form name="GoTo">
    <input name="url" type="text" size="25" value="http://">
    <input type="button" onClick="goto();">
    </form>

    <script>
    function goto() {
    var url = document.GoTo.url.value;
    if (window.confirm("Go to" + url + "?")) {
    window.open(url);
    }
    }
    </script>
    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.

    Comment


    • #3
      Thank You

      If I have any problems with that, I will post again, but thank you for your help.
      Younger is better, I think. Sometimes.

      Comment

      Working...
      X