1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Javascript within Javascript question

Discussion in 'XenForo Questions and Support' started by Ray, Sep 13, 2011.

  1. Ray

    Ray Active Member

    I created a form which I placed in a .js file. The form works fine, but I need to redirect users to another page once the submit button is clicked.

    as you can imagine, the two slashes comment out whatever comes next.

    My question is, how do I enter the url so that it isn't commented out?


    p.s. this forum has grown quite a bit, I'm not sure if this is the right section. Feel free to move this thread if necessary.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Do you just need to escape the slashes or have you tried just www. without the http:// ?
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Try escaping them with backslashes:

  4. Ray

    Ray Active Member

    I tried without http:// but it isn't working.

    Here is what I'm using now, maybe my code is wrong somewhere?
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is a relative location. You need at least "//" if not "http://" to specify that URL.

Share This Page