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 3 4427
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/
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.
Heaps of thanks Martin.
Mozilla's JavaScript Console is a great help indeed. Totally new for me.
Problem solved.
All the best,
Eli This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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
|
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",...
|
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.
|
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...
| |
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.
|
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
|
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...
|
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...
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |