SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    URL variable and javascript

    Hi

    I want the alert box bewlow to pop up when the "badlogin" variable is set to 1, in a URL. For example http://www.domain.com?badlogin=1 .

    <script>
    if (document.location.search) alert("\nIncorrect password.\n\nPlease try again.");
    </script>


    Any ideas ?
    Marcel

  2. #2
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as I know, you can't do this with a client-side script alone. I think you might have to look into a simple server-side script.

    If your server supports ASP, I'll be happy to do it for you.


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
  •