Why won't this javascript work on Mac OSX?

Discussion in 'Java' started by KZ8RT3, Feb 28, 2007.

  1. KZ8RT3

    KZ8RT3 Guest

    Hey all,

    There is some javascript on a website that will not work on Mac OSX
    using Safari, Firefox, Camino, or Explorer and I was wondering if anyone
    here knew if there was a fix. It is a floating button. It is visible but
    it is supposed to move with the window when you scroll down and when I
    click on a menu item does nothing. See the code below. Let me know if
    there is another function or script you need to see.

    PS: I know verrry little about javascript.


    //code for floating buttons
    var offSet = 15,tab=1;

    window.onScroll = timeButtons();


    function showButtons(){
    if(top.name == "new"){
    document.all('floatB').style.visibility = 'visible';
    } else{
    document.all('floatB').style.visibility = 'hidden';
    }

    timeButtons();
    }


    function timeButtons(){
    window.setInterval("moveButtons()",20);
    }


    function moveButtons(){
    try {
    var dif = parseInt((document.body.scrollTop+offSet -
    document.all.floatB.offsetTop)*.1);
    document.all.floatB.style.pixelTop += dif;

    document.all("search").style.visibility = "visible";
    document.all("download").style.visibility = "visible";
    } catch (e) {
    // do nothing, just prevent error message
    }
    }



    function Map() {
    document.SmallSub.action = "/Search/MapSql.asp";
    document.SmallSub.target ="asp";
    GenSql();
    document.SmallSub.target ="_self";
    top.main.SearchFrame.document.FormOne.Search1.value="Search"; //
    enable searching
    }



    function GenSqlDownload(){
    document.SmallSub.action = GetDownloadAction();
    GenSql();
    }


    function GenSqlCount(){
    document.SmallSub.action = "Scripts/Count/Count.asp";
    GenSql();
    }


    function Srh(){
    document.SmallSub.action = "/"+GetSearchPath() + "Scripts/Srh.asp";
    GenSql();
    }

    function clearMapBB() {
    top.main.SearchFrame.document.all("LongitudeMin").value = "";
    top.main.SearchFrame.document.all("LongitudeMax").value = "";
    top.main.SearchFrame.document.all("LatitudeMin").value = "";
    top.main.SearchFrame.document.all("LatitudeMax").value = "";
    parent.SearchFrame.document.all("MapShapeSearch").value = "";
    //Polygon/Circle Search VI# 89013 RAP
    ButtonInit();
    }

    function ClearAll() { //clear form AND clear advanced search

    ////////////////////////////////////////////////////////
    ////This code clears the advanced search
    for(var b=0; b<document.FormOne.Area.length;b++){
    document.FormOne.Area.options.selected=false;
    }
    for(var i=0; i<document.FormOne.SubArea.length;i++){
    document.FormOne.SubArea.options.selected=false;
    }

    document.FormOne.AdvancedSearch.value = '';
    document.FormOne.Area.value='all';
    document.FormOne.SubArea.value='all';


    ////////////////////////////////////////////////////////
    /////This code clears the rest of the form
    document.FormOne.reset();
    document.FormOne.ListStatus.options[1].selected = true;
    }

    function ButtonInit(newTab) {
    var clearMap = ''

    if (typeof(newTab)!='undefined') {tab = newTab;}

    if (top.main.SearchFrame.document.all("LongitudeMin").value != "") {
    clearMap = '<tr>'
    +'<td bgcolor="#d6c6bd"><font face="arial">'
    +'<a ONCLICK="clearMapBB()" style="cursor: hand;"
    align="absbottom">Map Clear</a></font></td></tr>'
    }

    top.main.SearchFrame.document.all("floatB").innerHTML = '<table
    border="0" cellpadding="2" cellspacing="0" bgcolor="#996666">'
    +'<tr height="10">'
    +' <td height="10"></td></tr>'
    +'<tr>'
    +' <td bgcolor="#d6c6bd"><font face="arial">'
    +' <a ONCLICK="Srh();" NAME="Search1" style="cursor: hand;"
    align="absbottom" border="0">Search</a></font></td></tr>'
    +'<tr>'
    +' <td bgcolor="#d6c6bd"><font face="arial">'
    +' <a ONCLICK="GenSqlCount();" style="cursor: hand;"
    align="absbottom">Statistics</a></font></td></tr>'
    +'<tr>'
    +' <td bgcolor="#d6c6bd"><font face="arial">'
    +' <a ONCLICK="GenSqlDownload()" style="cursor: hand;"
    align="absbottom">Download</a></font></td></tr>'
    +'<tr>'
    +' <td bgcolor="#d6c6bd"><font face="arial">'
    +' <a ONCLICK="DoMap()" style="cursor: hand;"
    align="absbottom">Map</a></font></td></tr>'
    +clearMap
    +'<tr>'
    +' <td bgcolor="#d6c6bd"><font face="arial">'
    +' <a ONCLICK="SaveAsCustom()" style="cursor: hand;"
    align="absbottom">Save as <br>Custom</a></font></td></tr>'
    +'<tr>'
    +' <td bgcolor="#d6c6bd"><font face="arial">'
    +' <a ONCLICK="ClearAll();" style="cursor: hand;"
    align="absbottom">Clear</a></font></td></tr>'
    +'<tr height="10">'
    +' <td></td></tr>'
    +'</table>'

    top.menu.tabsready=true;
    top.menu.changeVariable('QSearch');
    top.menu.activateCell(tab);
    window.setInterval("moveButtons()", 20);
    }
    KZ8RT3, Feb 28, 2007
    #1
    1. Advertising

  2. Right subect, but still wrong newsgroup.
    Mike Schilling, Feb 28, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marina

    Re: WHY, WHY WON'T IT WORK???

    Marina, Jun 29, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    344
    Marina
    Jun 29, 2004
  2. Chad
    Replies:
    4
    Views:
    8,314
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,769
    Smokey Grindel
    Dec 2, 2006
  4. KZ8RT3
    Replies:
    3
    Views:
    299
    KZ8RT3
    Feb 28, 2007
  5. Chris Rebert

    Re: IDLE won't start on Mac OSX

    Chris Rebert, Jul 16, 2010, in forum: Python
    Replies:
    0
    Views:
    480
    Chris Rebert
    Jul 16, 2010
Loading...

Share This Page