permaculture playing cards
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript Code Help Required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JavaScript Code Help Required" Watch "JavaScript Code Help Required" New topic

JavaScript Code Help Required

V K Gupta
Ranch Hand

Joined: Aug 07, 2008
Posts: 56
1 window.onload = function()
2 {
3 var browser=navigator.appName; // browser name
4 var b_version=navigator.appVersion; //browser version
5 var version=parseFloat(b_version); //
6 if(browser == "Microsoft Internet Explorer")
7 {
8 $('registerU').href='/userpackage/index.action'; // What is happening Here
9 $('fogotPass').href='/userpackage/forgetPassword.action'; // What is happening Here
10 }
11 }

Please explain me what does Line no 8 and 9 do.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
It sets the href for two links on the page.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

It might help if you let us know which library you are using. I'd guess Prototype?

Also, please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

Using a title of "JavaScript Code Help Required" in a forum completely dedicated to questions on JavaScript isn't very helpful.

Please go back and change your post to add a more meaningful subject by clicking the

[Asking smart questions] [About Bear] [Books by Bear]
jQuery in Action, 3rd edition
subject: JavaScript Code Help Required
jQuery in Action, 3rd edition