...

View Full Version : Select browser for specific code?



JACOBKELL
03-08-2005, 09:42 PM
I know there is script for detecting browser,can be that script modifided for following options:
1:If is firefox choose index1.html
2.If is internet explorer choose index2.html
3.If is other choose other.html
My web site is in java script 1.2 code so firefox doesnt show it at all.
It's mouse over images when you go to image you see other text in middle of page beyond first and second block of images.
So i will must use different javascript code for firefox.
Unless someone know how to make compabitle mouse over script for firefox.

liorean
03-08-2005, 10:32 PM
Mozilla is perfectly capable of using JavaScript 1.2 and in most cases you don't have to write anything specific to cater to any specific browser when handling mouseover events.

Why don't you post your code or link to a place where we can see it in action?

JACOBKELL
03-13-2005, 01:12 PM
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-2" />
<meta name="Description" content="Frajkt paket usluga:novo i inovativno rješenje za potrebe smještaja i dizajna stranica,programiranja dinamičkih programa i programa za manipuliranje baza podatakaza vaše potrebe, registriranjecom,net,org,tv,cc,eu,hr,hr.com domena,Marketinški dizajn,servis računala i računalnih komponenti" />
<meta name="Author" content="Luka Horvatić" />
<meta name="Generator" content="EdHTML" />
<meta name="Keywords" content="Web design,Web hosting,Free domain,Free domain,Translation,Translations,Croatian-english,English-German,English,German,Deutsch,Refernces,Database,Databases." />
<title>Frajkt</title>
</head>
<body bgcolor="#0f0060">

<center><IMG onmouseover=showit(0) height=44 src="webdizajn.jpg" width=149 border=0><IMG onmouseover=showit(1) height=44 src="webhosting.jpg" width=149 border=0><IMG onmouseover=showit(2) height=44 src="programming.jpg" width=149 border=0><IMG onmouseover=showit(3) height=44 src="references.jpg" width=149 border=0><IMG onmouseover=showit(4) height=44 src="domains.jpg" width=149 border=0><ilayer width="400" height="32" name="dep1" bgcolor="#E6E6FF"><layer name="dep2" width="400" height="32"></layer></ilayer><div id="describe" style="WIDTH: 600px; HEIGHT: 400px; BACKGROUND-COLOR: #e6e6ff" onmouseover="clear_delayhide()" onmouseout="resetit(event)"></div>
<DIV id=describe style="WIDTH: 745px; HEIGHT: 400px" onmouseout=resetit(event)
clear_delayhide()?></DIV><IMG onmouseover=showit(5) height=44 src="order.jpg"
width=149 border=0><IMG onmouseover=showit(6) height=44 src="downloads.jpg"
width=149 border=0><IMG onmouseover=showit(7) height=44 src="dbprograms.jpg"
width=149 border=0><IMG onmouseover=showit(8) height=44 src="translations.jpg"
width=149 border=0><IMG onmouseover=showit(9) height=44 src="aboutus.jpg"
width=149 border=0>
<SCRIPT language=JavaScript1.2>
var submenu=new Array()
submenu[1]='aaaa'
submenu[0]='aaaaaaaaaa'
submenu[2]='BLA BLA BLA BLA BLA BLA'
submenu[3]='TEST TEST TERS TES TER'
submenu[4]='TEST TEST TERS TES TER'
submenu[5]='TEST TEST TERS TES TER'
submenu[6]='TEST TEST TERS TES TER'
submenu[7]='TEST TEST TERS TES TER'
submenu[8]='TEST TEST TERS TES TER'
submenu[9]='TEST TEST TERS TES TER'
//Set delay before submenu disappears after mouse moves out of it (in milliseconds)
var delay_hide=500

/////No need to edit beyond here

var menuobj=document.getElementById? document.getElementById("describe") : document.all? document.all.describe : document.layers? document.dep1.document.dep2 : ""

function showit(which){
clear_delayhide()
thecontent=(which==-1)? "" : submenu[which]
if (document.getElementById||document.all)
menuobj.innerHTML=thecontent
else if (document.layers){
menuobj.document.write(thecontent)
menuobj.document.close()
}
}

function resetit(e){
if (document.all&&!menuobj.contains(e.toElement))
delayhide=setTimeout("showit(-1)",delay_hide)
else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhide=setTimeout("showit(-1)",delay_hide)
}

function clear_delayhide(){
if (window.delayhide)
clearTimeout(delayhide)
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

</SCRIPT>
<center>Copyright <sup>TM</sup>
FRAJKT <br>Luka Horvatic </center></SUB><br>
<center>Optimized for internet explorer 6</center></center>

</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum