Web Analytics Made Easy -
StatCounter Javascript Firefox Issue - CodingForum


No announcement yet.

Javascript Firefox Issue

  • Filter
  • Time
  • Show
Clear All
new posts

  • Javascript Firefox Issue

    Hello Everyone,

    I have problem. Who would a thunk it.....a person in a forum and having a problem, HOW UNIQUE???!!!! Anyways, seriousley...I do.

    I am building a web page and trying to use the javascript onchange event to call a few javascript functions to play a flash movie, submit a form and change the property on a page. The way it is set up it works in IE, but not in Firefox. Can anyone tell me why and more importantly help me find a specific solution.

    Basically the form has three differnt select menus that are dynamically populated with a some PHP code. When they change values the on change event fires in EI, but not in Firefox. For reference, below I have posted the javascript functions in BLUE and the actual form elements in RED..........Any and all help or suggestions will be greatley apprecaited

    <script type="text/javascript">

    function MM_reloadPage(init) { //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;

    function MM_setTextOfLayer(objName,x,newText) { //v4.01
    if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);

    function MM_changeProp(objName,x,theProp,theValue) { //v6.0
    var obj = MM_findObj(objName);
    if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
    else eval("obj."+theProp+"='"+theValue+"'");

    function submitit(form1){
    var form = document.form1;


    function MM_showHideLayers() { //v6.0
    var i,p,v,obj,args=MM_showHideLayers.arguments;
    for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible'v=='hide')?'hidden':v; }
    obj.visibility=v; }

    function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0
    var obj=MM_findObj(objStr);
    if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');

    <form id="form1" method="post" action="selectdate.php">
    <span id="Layer1" style="position:absolute; width:650px; height:150px; z-index:4; left: 200px; top: 352px;">
    <div id="lyrAdv" style="position:absolute; width:150px; height:14px; z-index:1; left: 52px; top: 50px;">
    <select name="select" id="select" onChange="MM_showHideLayers('lyrLoc','','show','lyrDate','','show');MM_controlShockwave('EatNose','' ,'Play')">
    <option value="">SELECT ADVENTURE</option>
    do {
    <option value="<?php echo $row_rsGetAdvName['advID']?>"><?php echo $row_rsGetAdvName['advName']?></option>
    } while ($row_rsGetAdvName = mysql_fetch_assoc($rsGetAdvName));
    $rows = mysql_num_rows($rsGetAdvName);
    if($rows > 0) {
    mysql_data_seek($rsGetAdvName, 0);
    $row_rsGetAdvName = mysql_fetch_assoc($rsGetAdvName);
    <div id="lyrLoc" style="position:absolute; width:150px; height:24px; z-index:2; left: 252px; top: 50px; visibility: visible;">
    <select name="lstlocations" id="lstlocations" onChange="MM_changeProp('form1','','action','selectdate.php','FORM');form1.submit()" wdg:subtype="DependentDropdown" wdg:type="widget" wdg:recordset="rsGetlocationsByAdv" wdg:displayfield="LocName" wdg:valuefield="LocName" wdg:fkey="AdvID" wdg:triggerobject="select">
    <option value="-1">SELECT LOCATION</option>
    <div id="lyrDate" style="position:absolute; width:150px; height:13px; z-index:3; left: 450px; top: 50px; visibility: visible;">
    <select name="lstDates" id="lstDates" onChange="MM_changeProp('form1','','action','selectLocation.php','FORM');form1.submit()" wdg:subtype="DependentDropdown" wdg:type="widget" wdg:recordset="rsGetDatesByAdv" wdg:displayfield="dates" wdg:valuefield="dates" wdg:fkey="AdvID" wdg:triggerobject="select">
    <option value="-1">SELECT DATE</option>
    <div id="Layer2" style="position:absolute; width:100px; height:49px; z-index:5; left: 250px; top: 100px;">
    <noscript><input name="Submit" type="submit" value="SUBMIT LOCATION"></noscript>
    <div id="Layer3" style="position:absolute; width:100px; height:48px; z-index:5; left: 450px; top: 100px;">
    <input name="Submit" type="submit" value="SUBMIT DATE">


  • #2
    Please use the [ code][/code] tags (without the space in the first one) to format your code. It will readable if you indent your code properly and wrap it in tags. And don't colorize entire things, colorize problem spots or important lines. I can't read that.