> It relates because it is java coding. The script i'm
> looking for is something like "if _ = firefox
> then..", but I'm very new to java so I need help.
but you don't understand. you are talking about javascript which has little if anything to do with java. they are vastly different. you need to move on.
to quote wikipedia on javascript:
Despite the name, JavaScript is unrelated to the Java programming language; though both have a common debt to C syntax.
Message was edited by:
petes1234
JavaRanch has a javascript forum here: http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=forum&f=20
Rather than stringing together bits of hearsay and random forum posters' code in the hope of creating a functional web page, you might want to consider working through the basics of that language. w3schools have a good tutorial: http://www.w3schools.com/js/default.asp (and they deal with browser detection here: http://www.w3schools.com/js/js_browser.asp)
I agree with the previous posts. I think it would be better to learn the fundamentals rather than spend time tweeking a web page for different browsers.
A java web site is made up of several technologies in addition to java such as javascript, xhml, sql, tomcat, etc, etc in addition to java specialties such as JSP and Servlets that you should learn before tweeking a web page. I suggest reading whole books on these topics such as starting with 'Thinking in Java' (I wonder if I can get a commission from the authors for recommending their book so often in these posts?)