Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2003
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Select browser for specific code?

    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.

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeĺ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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?
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    New Coder
    Join Date
    Aug 2003
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •