Why Won't This Work on Mac OSX?

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

  1. KZ8RT3

    KZ8RT3 Guest

    Hey all,

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

    //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. KZ8RT3

    Daniel Dyer Guest

    On Wed, 28 Feb 2007 21:59:23 -0000, KZ8RT3 <> wrote:

    > Hey all,
    >
    > There is some java code on a website that will not work on Mac OSX using
    > Safari, Firefox, Camino, and Explorer and was wondering if anyone here
    > knew if there was a fix. It is a floating button. It shows up but it is
    > supposed to move with the window when you scroll down and I clicking on
    > the menu item does not work. See the code below. Let me know if there is
    > another function or script you need to see.
    >
    > //code for floating buttons
    > var offSet = 15,tab=1;
    >
    > window.onScroll = timeButtons();


    Despite the confusing similarity in names, Java and Javascript are two
    very different things. You'll have more success posting this on
    comp.lang.javascript.

    Dan.

    --
    Daniel Dyer
    https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java
    Daniel Dyer, Feb 28, 2007
    #2
    1. Advertising

  3. KZ8RT3

    Paul Tomblin Guest

    In a previous article, KZ8RT3 <> said:
    >Hey all,
    >
    >There is some java code on a website that will not work on Mac OSX using
    >Safari, Firefox, Camino, and Explorer and was wondering if anyone here


    What you posted was Javascript, not Java. Wrong newsgroup.


    --
    Paul Tomblin <> http://blog.xcski.com/
    Did you know that "Gullible" is not in the dictionary?
    Paul Tomblin, Feb 28, 2007
    #3
  4. KZ8RT3

    KZ8RT3 Guest

    In article <>,
    "Daniel Dyer" <"You don't need it"> wrote:

    > On Wed, 28 Feb 2007 21:59:23 -0000, KZ8RT3 <> wrote:
    >
    > > Hey all,
    > >
    > > There is some java code on a website that will not work on Mac OSX using
    > > Safari, Firefox, Camino, and Explorer and was wondering if anyone here
    > > knew if there was a fix. It is a floating button. It shows up but it is
    > > supposed to move with the window when you scroll down and I clicking on
    > > the menu item does not work. See the code below. Let me know if there is
    > > another function or script you need to see.
    > >
    > > //code for floating buttons
    > > var offSet = 15,tab=1;
    > >
    > > window.onScroll = timeButtons();

    >
    > Despite the confusing similarity in names, Java and Javascript are two
    > very different things. You'll have more success posting this on
    > comp.lang.javascript.
    >
    > Dan.


    Whoops! See, I have no idea. Thanks!
    KZ8RT3, Feb 28, 2007
    #4
    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:
    349
    Marina
    Jun 29, 2004
  2. Chad
    Replies:
    4
    Views:
    8,324
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,839
    Smokey Grindel
    Dec 2, 2006
  4. KZ8RT3
    Replies:
    1
    Views:
    791
    Mike Schilling
    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:
    486
    Chris Rebert
    Jul 16, 2010
Loading...

Share This Page