473,725 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript "Pause" button working in IE, but not in Firefox

Greetings everyone.

See
http://www.spiceisle.com/cgi-bin/sli...mages&type=jpg

The "Pause" button works in IE, but not in Firefox. Any ideas why?

If you have any other ideas on how the javascript can be improved, please
let me know.
Thanks and regards,
Brian Steele
Jul 31 '05 #1
5 4141
Brian.Steele wrote:
Greetings everyone.

See
http://www.spiceisle.com/cgi-bin/sli...mages&type=jpg

The "Pause" button works in IE, but not in Firefox. Any ideas why?

If you have any other ideas on how the javascript can be improved, please
let me know.
Thanks and regards,
Brian Steele

var e = document.getEle mentById('Pause Button');
e.value = "Play";

shorten to:
document.getEle mentById('Pause Button').value = "Play";;
this may not be the root of the problem however
Jul 31 '05 #2
Brian.Steele wrote:
http://www.spiceisle.com/cgi-bin/sli...mages&type=jpg

The "Pause" button works in IE, but not in Firefox. Any ideas why?
The answer is the Firefox Javascript Console (Tools > Javascript
Console) which when you click the pause buttons says

Error: e has no properties
Source File:
http://www.spiceisle.com/cgi-bin/sli...mages&type=jpg
Line: 325

Look at line 325 which says

e.value = "Play";

e is defined at 324

var e = document.getEle mentById('Pause Button');

and you have no element in the page with an id of 'PauseButton'. At
line 453 use id instead of name.
If you have any other ideas on how the javascript can be improved, please
let me know.


A slightly flippant suggestion perhaps - don't use Microsoft Frontpage.

hth

mike

Jul 31 '05 #3
Thanks Mike:

I combined your response with the assistance from another response, and came
up with the following:

1. "PauseShow" subroutine changed to the following:

function PauseShow() {

if (play == true) {

document.getEle mentById('Pause Button').value = "Play";
play = false;
}
else {

document.getEle mentById('Pause Button').value = "Pause";
play = true;
pictimer = timer + delta;
SlideShow('slid epic');
}
}

2. Modified the HTML definition for the "Pause" button as follows:

<input type="button" value="Pause" name="PauseButt on" id="PauseButton "
onclick="PauseS how()" style="font-family: sans-serif; font-size: 8pt">

That seems to have fixed the problem. Thanks!
Brian

<in************ ********@hotmai l.com> wrote in message nd
news:11******** *************@g 14g2000cwa.goog legroups.com...
Brian.Steele wrote:
http://www.spiceisle.com/cgi-bin/sli...mages&type=jpg

The "Pause" button works in IE, but not in Firefox. Any ideas why?


The answer is the Firefox Javascript Console (Tools > Javascript
Console) which when you click the pause buttons says

Error: e has no properties
Source File:
http://www.spiceisle.com/cgi-bin/sli...mages&type=jpg
Line: 325

Look at line 325 which says

e.value = "Play";

e is defined at 324

var e = document.getEle mentById('Pause Button');

and you have no element in the page with an id of 'PauseButton'. At
line 453 use id instead of name.
If you have any other ideas on how the javascript can be improved, please
let me know.


A slightly flippant suggestion perhaps - don't use Microsoft Frontpage.

hth

mike

Jul 31 '05 #4
Jedi Fans escribió:
Thanks and regards,
Brian Steele

var e = document.getEle mentById('Pause Button');
e.value = "Play";

shorten to:
document.getEle mentById('Pause Button').value = "Play";;
this may not be the root of the problem however


Why do you use ";;" instead of ";"?

Thanks in advance,

knocte

--
Aug 2 '05 #5
knocte wrote:
Jedi Fans escribió:
Thanks and regards,
Brian Steele

var e = document.getEle mentById('Pause Button');
e.value = "Play";

shorten to:
document.getEle mentById('Pause Button').value = "Play";;
this may not be the root of the problem however


Why do you use ";;" instead of ";"?

Thanks in advance,

knocte

typo
Aug 2 '05 #6

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

Similar topics

11
39895
by: Paminu | last post by:
Is there something like system("PAUSE") for linux?
4
30368
by: Kerwin Cabrera | last post by:
I am writing a console application and I would like to put a "Press any key..." message once the program is done executing. Currently, when it executes it returns to the prompt. I have tried console.read and console.readline but they both require an <Enter> key to be hit. Any suggestions Thanks -KC
3
2758
by: RR | last post by:
I have a button on a form (form A) that opens another form. The form that opens (form B) has a listbox that is populated with a call to a function in the "on current" event. When form B with the listbox has a query listed as the data source, it works fine. In this case, the button on form A sets the record source for form B to one of several queries, depending on what is selected in a combobox on form A. When Form B first opens, an...
5
6490
by: CoderMarc | last post by:
Hi, I can not get the system pause to work in a simple program. Here is my program below: // i/o example #include <iostream> using namespace std; int main ()
3
3236
by: nma | last post by:
Hi This code goes well with play, stop and fullscreen button, the only thing is the pause button is not there. How to make pause button? I try to make pause button but when it streams video, when I click pause, it stop but it work play again when i click at play button. Please help. <?php function printInstructions() { ?>
1
1713
by: Wazza | last post by:
G'Day, I have a re-occurring problem and wish to design a framework or pattern to address it. I have some Ideas but I would like to do some brainstorming with my peers before commencing. The problem: Several computational tasks I am running for my PhD work require several weeks to complete and I will to be able to pause these tasks
4
1486
by: Curious | last post by:
I have two buttons on a form, "Pause" and "Continue". When "Pause" button is clicked, it should: 1) Stop the background worker; and, 2) Enable the "Continue" button. I have the code below to explicitly enable the "Continue" button. However, it's still not enabled. Anyone can tell me why? Thanks.
2
2334
by: Charles Zhang | last post by:
For Win32 application, I could use "__asm pause". However, for X64 platform, the inline assembler is not supported. Is there a compiler intrinsics for "__asm pause"? Thanks Charles Zhang
1
2013
by: =?ISO-8859-1?Q?Andr=E9?= | last post by:
Hi everyone, I'd be interested in hearing suggestions as to the "best" way to drive a Python program step by step from another application. Details: --------- I have implemented a "Robot" that can be programmed by a user to perform certain actions. (see Reeborg below for a simple javascript-
0
8752
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
9401
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
8097
agi2029
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...
1
6702
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
4519
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...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
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.