HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Script: Is it valid?
Post new topic   Reply to topic    HTML Help Forum -> Javascript
View previous topic :: View next topic  
Author Message
Snot



Joined: 29 Nov 2007
Posts: 5

PostPosted: Thu Nov 29, 2007 4:46 pm     Script: Is it valid? Reply with quote

Thanks for looking at this.



Code:
<script type="javascript"><!--

browserName = navigator.appName;

browserVer = parseInt ( navigator.appVersion );



version = "n2";

if ( browserName == "Netscape" && browserVer >= 3 ) version = "n3";

if ( browserName == "Microsoft Internet Explorer" && browserVer >=4 ) version = "e4";



if ( version == "n3" || version == "e4" )

{



        about_on = new Image ( 134, 94 );

        about_on.src = "menuimages/about_on.gif";

        products_on = new Image ( 72, 69 );

        products_on.src = "menuimages/products_on.gif";

        news_on = new Image ( 134, 70 );

        news_on.src = "menuimages/news_on.gif";

        links_on = new Image ( 134, 94 );

        links_on.src = "menuimages/links_on.gif";

        guestbook_on = new Image ( 134, 94 );

        guestbook_on.src = "menuimages/guestbook_on.gif";

            email_on = new Image ( 134, 70);

        email_on.src = "menuimages/email_on.gif";





        about_off = new Image ( 134, 94 );

        about_off.src = "menuimages/about_off.gif";

        products_off = new Image ( 134, 108 );

        products_off.src = "menuimages/products_off.gif";

        news_off = new Image ( 134, 70 );

        news_off.src = "menuimages/news_off.gif";

        links_off = new Image ( 134, 94 );

        links_off.src = "menuimages/links_off.gif";


        guestbook_off = new Image ( 134, 108 );

        guestbook_off.src = "menuimages/guestbook_off.gif";

            email_off = new Image ( 134, 70 );

        email_off.src = "menuimages/email_off.gif";






}



function button_on ( imgName )

{

        if ( version == "n3" || version == "e4" )

        {

                butOn = eval ( imgName + "_on.src" );

                document [imgName].src = butOn;

        }

}



function button_off ( imgName )

{

        if ( version == "n3" || version == "e4" )

        {

                butOff = eval ( imgName + "_off.src" );

                document [imgName].src = butOff;

        }

}

// --></script>
camoman666



Joined: 24 Jun 2006
Posts: 373
Location: Fort Walton Beach, FL, USA

PostPosted: Sun Dec 02, 2007 10:39 am     Reply with quote

Nothing looks wrong to me.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> Javascript All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial