JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 16th, 1999, 05:06 PM
viper4
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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>

Reply With Quote
  #2  
Old August 31st, 1999, 12:23 PM
dave
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
its should be working
try window.location(url) instead for Netscape

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Trouble with location.href and javascript


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway