Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript firing in IE, but not Mozilla, and Netscape 1

Status
Not open for further replies.

PaulTEG

Technical User
Sep 26, 2002
4,469
IE
Could anyone shed light on what might be the issue here. The code works in IE6, but doesn't appear to fire in Mozilla, and Netscape

Code:
function PT_update_height() {
 var a=["38","40", "42", "44", "46", "48", "50", "52", "54"];
    for (var i=0; i < order.height.length; i++) {
      if (order.height[i].checked) {
        order.height_details.value=a[i];
      }
    }
  }
Code:
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr);
}
Code:
<input type="hidden" name="dress_details" value="notset" />
Code:
              <tr>
                <td width="11%"><div align="center"><input type="radio" name="height" onClick="MM_callJS('PT_update_height()')"></div></td>
                <td width="11%"><center><input type="radio" name="height" onClick="MM_callJS('PT_update_height()')"></center></td>
                <td width="11%"><center><input type="radio" name="height" onClick="MM_callJS('PT_update_height()')"></center></td>

                <td width="11%"><center><input type="radio" name="height" onClick="MM_callJS('PT_update_height()')"></center></td>
                <td width="11%"> <center><input type="radio" name="height" onClick="MM_callJS('PT_update_height()')"></center></td>
                <td width="11%"> <center><input type="radio" name="height" onClick="MM_callJS('PT_update_height()')"></center></td>
                <td width="11%"> <center><input type="radio" name="height" onClick="MM_callJS('PT_update_height()')"></center></td>
                <td width="11%"> <center><input type="radio" name="height" onClick="MM_callJS('PT_update_height()')"></center></td>
                <td width="11%"> <center><input type="radio" name="height" onClick="MM_callJS('PT_update_height()')"></center></td>

              </tr>


Many thanks
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Where is "order" defined? Do you have a URL we could have a look at? Or try posting your complete page...

One thing I've noticed, is that you have a hidden field called "dress_details", however, in your PT_update_height function, you are updating a field called "height_details".

Pete.


Web Developer & Aptrix / IBM Lotus Workplace Web Content Management (LWWCM) Specialist
w: e: Pete.Raleigh(at)lclimited.co.uk
 

It's the second page, with the radio buttons for height, select UCL, college award

dress/height that was a typo on my part

The pages are being generated by Perl, though that shouldn't make a difference

Thanks for your time
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
>>It's the second page, with the radio buttons for height, select UCL, college award

can u give me a straight link? i dont see any checkboxes...

Known is handfull, Unknown is worldfull
 
Kris, thanks for your time

If you select the University College London on the link above and click continue

This has my head wreecked

--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 

How would we recognise the fact that the event isn't firing in Moz / NS? The JS console shows no errors, and nothing noticable happens when you click the radio buttons.

My only suggestion is to change this:

Code:
var order=document.order;

to this:

Code:
var order=document.forms['order'];

which is far more compliant with most browsers, and AFAIK, more correct DOM-wise.

Hope this helps,
Dan

 
I got away with the first option, thanks for your time, have a *
--Paul


It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top