#1
  1. No Profile Picture
    viper4
    Guest
    Devshed Newbie (0 - 499 posts)
    This code works fine with IE 4.x but will not work with Navigator. Can someone please tell me what I am doing wrong?

    Thanks in advance...


    <HTML>
    <TITLE></TITLE>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    </HEAD>
    <BODY>

    <script language=javaScript>

    function GetFtp(name, pass) {

    switch(name)
    {
    case "PACCAR":
    if (pass == "paccar") {
    return "ftp://usernameassword@hostname";
    }
    else {
    return "Invalid.htm";
    }
    break;

    default:
    return "default.htm";
    break;
    }

    } // End function
    </SCRIPT>

    <SPAN ID="sUserName" TITLE="<%=Request("txtUserName")%>" STYLE='width:0;padding-left:0;padding-bottom:0;display:none;position:absolute;background-color:#29526B;z-index:0;'>
    </SPAN>

    <SPAN ID="sPassword" TITLE="<%=Request("txtPassword")%>" STYLE='width:0;padding-left:0;padding-bottom:0;display:none;position:absolute;background-color:#29526B;z-index:0;'>
    </SPAN>


    <SCRIPT language=javascript>

    var UserName
    var Password
    var sLocation

    UserName = sUserName;
    Password = sPassword;

    sLocation = GetFtp(UserName.title, Password.title);

    if (sLocation == "default.htm") {
    document.write("You have entered the wrong User Name. ");
    document.write("Please <a href=default.htm> try again. <P></A>");
    }
    else {
    // Go to ftp site using login information
    window.location.href = sLocation;
    }

    </SCRIPT>

    </BODY>
    </HTML>
  2. #2
  3. No Profile Picture
    dave
    Guest
    Devshed Newbie (0 - 499 posts)
    its should be working
    try window.location(url) instead for Netscape

Similar Threads

  1. javascript problems and <nobr> tag trouble
    By WorldBuilder in forum JavaScript Development
    Replies: 5
    Last Post: October 29th, 2003, 09:43 AM
  2. delimiting javascript
    By scream in forum JavaScript Development
    Replies: 3
    Last Post: August 15th, 2003, 04:03 PM
  3. JavaScript and CSS TROUBLE....NUBIE
    By boulder in forum JavaScript Development
    Replies: 1
    Last Post: July 30th, 2003, 11:15 AM
  4. Replies: 0
    Last Post: July 25th, 2003, 09:19 PM
  5. getting javascript error when using PHP and javascript
    By Dalamar in forum JavaScript Development
    Replies: 8
    Last Post: December 17th, 2001, 07:41 AM

IMN logo majestic logo threadwatch logo seochat tools logo