Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Why won't this javascript work on Mac OSX?

Thread view: 
KZ8RT3 - 28 Feb 2007 22:45 GMT
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[b].selected=false;
        }
for(var i=0; i<document.FormOne.SubArea.length;i++){
        document.FormOne.SubArea.options[i].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);
}
Mike Schilling - 28 Feb 2007 23:15 GMT
Right subect, but still wrong newsgroup.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.