473,320 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

My page doesn't work in firefox

I have made a page, and got it to work in IE, but when i tried to open it in firefox it didnt work. I managed to find out the problem, it goes something like this:

Expand|Select|Wrap|Line Numbers
  1. <body onLoad="a();b();c()">
  2. </body>
  3. <script language="javascript">
  4. function a(){
  5. alert("a")
  6. }
  7. function b(){
  8. alert("b")
  9. }
  10. function c(){
  11. alert("c")
  12. }
  13. </script>
  14.  
if this was my code, i would only get one alert saying "a". I tried putting one function in the onLoad embed, and the other functions in it, i.e.

Expand|Select|Wrap|Line Numbers
  1. <body onLoad="d()">
  2. </body>
  3. <script language="javascript">
  4. function d(){
  5. a()
  6. b()
  7. c()
  8. }
  9. </script>
however, this did not work either and i still only got one alert.

any help with this problem would be appreciated.
Oct 31 '07 #1
5 1731
dmjpro
2,476 2GB
look ..... instead of alerting put some another code then see what happens..

and one more thing use [code=language] instead of <code>.

debasis
Nov 1 '07 #2
acoder
16,027 Expert Mod 8TB
Put your JavaScript in the head section rather than after the body.
Nov 1 '07 #3
my code wasn't alerting, i put in alerts to test it, and i used them in the example because it was simpler.

sorry about the code thing, im new to the forum


ill try putting my javascript in the head, thanks.
Nov 1 '07 #4
drhowarddrfine
7,435 Expert 4TB
Just as a note:
There is no such thing as <script language="javascript">

Change it to:
<script type="text/javascript">
Nov 1 '07 #5
I have made a page, and got it to work in IE, but when i tried to open it in firefox it didnt work. I managed to find out the problem, it goes something like this:

Expand|Select|Wrap|Line Numbers
  1. <body onLoad="a();b();c()">
  2. </body>
  3. <script language="javascript">
  4. function a(){
  5. alert("a")
  6. }
  7. function b(){
  8. alert("b")
  9. }
  10. function c(){
  11. alert("c")
  12. }
  13. </script>
  14.  
if this was my code, i would only get one alert saying "a". I tried putting one function in the onLoad embed, and the other functions in it, i.e.

Expand|Select|Wrap|Line Numbers
  1. <body onLoad="d()">
  2. </body>
  3. <script language="javascript">
  4. function d(){
  5. a()
  6. b()
  7. c()
  8. }
  9. </script>
however, this did not work either and i still only got one alert.

any help with this problem would be appreciated.
Hi,

Your first code is working fine in both IE and Firefox.
I have run it on my system.

Thanks
Nov 2 '07 #6

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

Similar topics

2
by: Keyser | last post by:
On most my pages, I use Javascript to play a sound. It works fine in Netscape 4.7, Netscape 7.2, Firefox 1.0, IE5 and IE6 using Windows98 as the operating system. However, using WindowsXP as the...
25
by: Steal | last post by:
Hi at all I try to validate this page using the link: http://validator.w3.org/ but it return that this is not a valid HTML 4.01 page please where is it error? Steil <!DOCTYPE HTML PUBLIC...
3
by: Rhino | last post by:
Yesterday, I reworked the index on my site - http://sfl.london.on.ca - so that they used list markup and I'm quite pleased with them. However, I'm having a problem with one small aspect of the menu...
3
by: lofty00 | last post by:
hello, sorry about the repost - I've been posting to several groups and I've decided it's better to make a single repost to all of them rather than an extra post in each. I've been trying to...
1
by: mathewda | last post by:
Hey, I'm having a problem that I consider kinda weird that is alluding me at the moment. I've wrote some code that will set up an XMLHttpRequest, it then makes a call to open and send and sets the...
4
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
2
by: Dav | last post by:
In my ASP.NET codebehind I have the following code to jump to a certain section of the page: --- Dim strAnchorScript As String = "<script language='javascript'>" & _ "window.location.hash='#" &...
9
by: =?Utf-8?B?Sm9obiBCYWlsZXk=?= | last post by:
I have a ASP .Net page that allows moving around items on the page through javascript. This page works fine in IE. In FireFox however, I have found that if the page is using XHTML 1.0...
5
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... Have another thread going on in scripting.jscript trying to work around some deficiencies in the way IE and IIS interact. The nub of it is this: ASP.Net explicitly sets an output...
8
by: Harvey Schmidlapp | last post by:
I have a fairly complex form (generated by means of an ASP 3 page). The form is used to define a query against a database. After running a query, the user hits their browser's back button and goes...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.