Basic question - HELP!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James

    Basic question - HELP!

    I am looking to add the domain name into the login url to access
    webmail via a link. Example:

    location.href = "https://" + "domain_name%5C " + LOGINNAME + ":" +
    password +
    "@test.test1.co m"

    I am assuming the output should be:

    domain_name\use r_name:password @test.test1.com

    Is this correct of should the %5c be outside the "" - "domain_nam e" +
    %5c +
    ??

    Not real familiar with scripting so any help is appreciated.

    Thanks,

    James
  • Jukka K. Korpela

    #2
    Re: Basic question - HELP!

    james.c.craig@c omcast.net (James) wrote:
    [color=blue]
    > I am looking to add the domain name into the login url to access
    > webmail via a link.[/color]

    You really constructed a Subject line that most adequately reflects the
    content of your message. More hints available at bargain price at

    [color=blue]
    > location.href = "https://" + "domain_name%5C " + LOGINNAME + ":" +
    > password +
    > "@test.test1.co m"[/color]

    That's JavaScipt. Hint: JavaScript is not HTML. Nowhere near.
    [color=blue]
    > I am assuming[/color]

    Stop assuming. RTFM.
    [color=blue]
    > the output should be:
    >
    > domain_name\use r_name:password @test.test1.com[/color]

    No, it shouldn't.

    You might consider studying the URL syntax specifications, and would
    learn that they _strongly_ advice against including passwords into
    URLs, and then they _strongly_ say the same again. Besides, the syntax
    with username:passwo rd was never part of approved http (or https) URL
    syntax. Some browsers still decided to implement it.

    But don't bother. Microsoft just decided to drop it for security
    reasons. This was tragicomic, but at least it confirms the idea of not
    putting a password into a URL.
    [color=blue]
    > Not real familiar with scripting[/color]

    So don't do scripting (at least not here), mm'kay?

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

    Comment

    Working...