473,785 Members | 3,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

window.setInter val() not working in Mozilla 1.7.1

Eli
Hello all,
I have just added a small piece of JavaScript code to a basic HTML
page of mine. At the end of the page (after the closing </HTML>) I
added:

<SCRIPT LANGUAGE="JavaS cript">
window.setInter val ("myFunc()", 1000);
</SCRIPT>

The function myFunc is as easy as you might expect, to update a text
field with the current time.
Things go fine under IE6 but not working under Mozilla 1.7.1, both
under Win XP. For Mozilla 1.7.1:
1. navigator.appNa me is showing Netscape
2. navigator.userA gent is showing Mozilla/5.0
My book references say window.setInter val () is avail from Netscape 4.
Any ideas? TIA.

Eli
Jul 23 '05 #1
3 4425


Eli wrote:
At the end of the page (after the closing </HTML>) I
added:

<SCRIPT LANGUAGE="JavaS cript">
window.setInter val ("myFunc()", 1000);
</SCRIPT>

The function myFunc is as easy as you might expect, to update a text
field with the current time.
Things go fine under IE6 but not working under Mozilla 1.7.1, both
under Win XP.


Check Mozilla's JavaScript console, I suspect the myFunc throws an error.
If you can't correct it yourself post the relevant code.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
Lee
Eli said:

Hello all,
I have just added a small piece of JavaScript code to a basic HTML
page of mine. At the end of the page (after the closing </HTML>) I
added:

<SCRIPT LANGUAGE="JavaS cript">
window.setInter val ("myFunc()", 1000);
</SCRIPT>

The function myFunc is as easy as you might expect, to update a text
field with the current time.
Things go fine under IE6 but not working under Mozilla 1.7.1, both
under Win XP. For Mozilla 1.7.1:
1. navigator.appNa me is showing Netscape
2. navigator.userA gent is showing Mozilla/5.0
My book references say window.setInter val () is avail from Netscape 4.
Any ideas? TIA.


I would bet that you're trying to update the text field using
something like:

myFormName.myFi eldName.value = "whatever";

which is using an unsafe shortcut that IE supports, but many
other browsers do not. Use the full reference:

document.myForm Name.myFieldNam e.value = "whatever";

The following are not responsible for your problem, but may
indicate that you should find a better book:

1. You should not place <script> blocks after the closing </html>
They should be within the <head> or <body> blocks.

2. The <script> tag should be:

<script type="text/javascript">

The "language" attribute is out-dated.

Jul 23 '05 #3
Eli
Heaps of thanks Martin.
Mozilla's JavaScript Console is a great help indeed. Totally new for me.
Problem solved.
All the best,
Eli
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
7795
by: Richard A. DeVenezia | last post by:
At line this.timerId = setInterval (function(){this.step()}, 100) I get error dialog Error:Object doesn't support this property or method. If I change it to this.timerId = setInterval (function(){this==window}, 100) I see true, the sad fact that 'this' is window and not an anim. What are some proper ways ? I would like to avoid
5
8894
by: Richard A. DeVenezia | last post by:
Is some future Mozilla going to support setInterval ( <function:function>, <interval:number> ) ? Right now it seems to be simply setInterval ( <function-text:string>, <interval:number> ) -- Richard A. DeVenezia
1
8929
by: John | last post by:
Michael Winter <M.Winter@blueyonder.co.invalid> wrote in message news:<opr3wd8yvj5vklcq@news-text.blueyonder.co.uk>... > On 24 Feb 2004 14:13:47 -0800, John <johnmark@fastermail.com> wrote: > > > I would like to use setTimeout and window.open methods to pop up > > window every 5 minutes. I can only manage to make the window to pop up > > only twice. > > > > function openWindow() { > > window.open("popupwindow.htm",...
5
7545
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and IE. I link within a page and display individual divisions of that page, manipulating their visibility and display styles with an onClick function. As long as I explicitly click a link to progress, it works with browsers I've tried.
4
3261
by: barry | last post by:
If The script below is exeuted from the onload="startit()" in the body tag everything works fine but when I remove the onload and try to execute by using the attributes.add from within the Page_Load the window.setInterval will not execute - there is no message but the timer never takes off. I put an alert in the startit() and it did appear so the attributes.add is working ok. Would appreciate any help thanks Private Sub...
3
5813
by: shawn | last post by:
Hi All Was trying to get this bit of code working (simplified of course) for (i=0;i<uuid_num;i++) { window.setInterval(InitMap(uuidValues), timePeriod); } Where uuid_num, uuidValues, timePeriod are defined above, along with function InitMap.
2
1591
by: Frederik Vanderstraeten | last post by:
I'm calling `setInterval(myfunc, 100);`. That function receives one parameter which seems to be -3, 0, 3, 6 or 9. This isn't a problem, but I'm wondering what it is. Does someone know? Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
2
5419
by: RobG | last post by:
There has been a bit of work done to get an init() function to run when the DOM is complete but before all the images have been downloaded. The idea is to kickoff init() scripts when all the elements are there but not wait for large images. Below is a script which uses 3 different techniques, one each for IE, Safari and Mozill/Opera 9. The Safari version uses browser sniffing, but I think with a little work that could be removed - the...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.