LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 04-18-2005, 06:51 PM   #1
swatward
Member
 
Registered: Jan 2005
Distribution: slackware
Posts: 83

Rep: Reputation: 15
Javascript Code doesnt work w/ firefox?


Simply, this code works with IE, and not with firefox, any opinions?
The Bank .JS file is here...
http://www.rooksweb.com/bank.js
Code:
<html>
<head>
<script language="javascript" src="bank.js"></script><script language="javascript">
function onee(name, passwo)
{
//Checking if it starts at one or zero
count = 0
if (first[0] == undefined)
count = 1
//Listing the names
document.write("<table bgcolor='aliceblue' border = 1><tr><td>First</td><td>Last</td><td>Pass</td><td>Balance</td></tr><tr>")
while(first[count] != undefined)
{
document.write("<tr><td>"+first[count] + "</td><td>" + last[count] + "</td><td>" + ID[count] + "</td><td>" + balance[count] + "</td></tr>")
count ++
}
document.write("</tr></table>")
//Prompt

name = name.toLowerCase()
//Checking if it starts at one or zero
count = 0
if (first[0] == undefined)
count = 1
//Finding which person they are talking about
while(name != first[count] && first[count] != undefined)
{count ++}


if (passwo == ID[count])
{alert("correct, your balance is $" + balance[count]);}
}
</script>
</head>
<body bgcolor="#000000">
<font color="#FFFFFF">
<center><h2>Bank&copy</h2>
<img src="pirate.jpg"></center>
<br>User Name:<br>
<input type="text" name="user"><br>Password:<br>
<input type="password" name="pass"><br><br>
<input type="submit" value="submit" onclick="onee(user.value, pass.value)">
</font></body></html>
 
Old 04-18-2005, 06:54 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mandriva 2011 / Mageia 1 / Linux Mint 12 / CrunchBang Linux 10 Statler / Easy Peasy
Posts: 4,274

Rep: Reputation: 201Reputation: 201Reputation: 201
Have you enabled java in firefox?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why doesnt my USB mouse doesnt work? barkha Linux - Hardware 2 08-16-2005 11:31 AM
firefox doesnt work on SUSE !!! speedemonV12 Linux - Newbie 10 07-21-2005 04:16 PM
FireFox Doesnt Work John_Emad Linux - Software 3 06-26-2005 12:01 AM
Javascript code, what do you think? swatward General 2 05-18-2005 09:43 AM
javascript for firefox? mohapi Fedora 4 06-20-2004 03:22 PM


All times are GMT -5. The time now is 04:45 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration