473,385 Members | 1,872 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,385 software developers and data experts.

Calculation not working in Firefox

I am trying to create a simple calculation script to result in how many boxes of tiles are required for certain square metre coverage.

You enter 2.5 square metres - click calculation and then you get you will need x amount of boxes with 7 tiles spare. All works perfectly in all browsers except Firefox I get the error in the firebug console "wallarea not defined" (I do not understand this) I am not a coder I am trying to learn so if you can help please be as detailed as you can and help explain why this is an issue. Thanks :D

The code:
Expand|Select|Wrap|Line Numbers
  1.                 <p>To calculate how many boxes of these tiles you can use our handy calculator</p>
  2.                 <p>
  3.                     I need to cover<input type="text" id="wallarea" size="6" /> square metres.
  4.                     <input type="button" onclick="calcTiles(<?php echo $product_width ?>, <?php echo $product_height ?>, <?php echo $product_packaging_unitsinbox ?>, wallarea.value, 'total_boxes'); return false;" value="Calculate" class="addtocart_button" />
  5.                 </p>
  6.                 <p><span id="total_boxes"></span></p>
  7.         </div>
  8.  
Oct 28 '11 #1
1 1536
Dormilich
8,658 Expert Mod 8TB
to access a form value via document.form_name.element_name.value you need to give the element a name attribute. only IE silently maps IDs and NAMEs to global variables.
Oct 28 '11 #2

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

Similar topics

7
by: Tony LaPaso | last post by:
Hi All, I have a simple style sheet example below and I'm seeing different results in IE 6 vs. Firefox 1.0.3. I'm not sure which browser is rendering it correctly but I'm tending to think it's...
4
by: sonic_soul | last post by:
Hi, I was curious if I could make my webservice work with firefox client webservice functionality. (i got it to work with webservice.htc) I am able to get firefox to see my serverside web...
4
by: Kim14 | last post by:
I have a table that works fine in IE, but doesn't work in Netscape or Firefox. It should automatically come up with numbers in some of the fields and depending what is entered, it should calculate...
23
by: Markus | last post by:
Hi, i have this problem: Sometimes, i can't reproduce, if i click on an small image on the website, the popup _AND_ an other Tab in firefox open. Here are the linkcode: <div...
3
by: | last post by:
Hello, I am hoping someone else has thought about a date time calculation i need to perform. I would like to be able to calculate the number of "working minutes" between 2 dates, given my...
3
by: TJS | last post by:
I am finding that the serverside requiredvalidator doesn't fire in the firefox browser, and user request proceeds through to my updateProfile method. Validation is working correctly in the IE...
1
by: Pavan | last post by:
Hi, I have developed script library for dispalying calendar for my web pages. To display calendar, i am using div tag and with in div tag, i am defining the dates. This div tag is wrapped...
3
by: geetha v | last post by:
Hi All, I need a scrolling DIV is a to display my dynamic tree in left frame. In my jsp , Div overflow is set to "auto" <DIV id=divScroller style="overflow:auto;height:200px"> <!--...
6
by: Lara1 | last post by:
I'm trying to get certain cells to show a hovering alert message when I click on them. (I don't want an error-message style box to pop up, because I'll eventually want it to show for lots of cells...
5
by: madhanrajesh210002 | last post by:
hi I'm trying to calculate string's integer value with the help java script, i write java script in a function and i call it when ever i need to do that calculation, but it seems not working ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...

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.