By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,964 Members | 1,810 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,964 IT Pros & Developers. It's quick & easy.

Firefox problem

P: 30
Hi all,
i'm testing a javascript code that allow me to see a timer(just minutes and seconds) when a start button is clicked:
<script language="javascript">
var TimerID;
var min,sec;
function Start(min,sec)
<form name="form1">
<input type="text" id="Timer">
<input type="button" value="start" onClick="Start(0,0)">

my problem is when i'm trying to run this script in firefox or other browsers than IE, it wont work.
So what should i do to make it work in mozilla?

Nov 21 '07 #1
Share this Question
Share on Google+
2 Replies

P: 210

So what should i do to make it work in mozilla?
Enable JavaScript in Mozilla.
Nov 22 '07 #2

Expert Mod 15k+
P: 16,027
Your input tag has an id "Timer", but you're trying to access it by its name. IE may allow you to do this (which doesn't make it clever because it's wrong).

Use document.getElementById("Timer") instead.

PS. please use code tags when posting code.
Nov 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.