Can someone explain what's happening in this code?
Why does first alert return a blank, the second returns the path of the html file with "l" appended, the third one returns the url of the page with the parameter appended, the third returns the page url with ? appended. I'm trying to understand whats in in__obj_This.href.
Thanks.
<html>
<head>
<script type="text/javascript">
function _fnc_Build_Link(in__obj_This, selectvalue) {
var selecttype;
alert(in__obj_This.href );
in__obj_This.href = "l";
alert(in__obj_This.href );
in__obj_This.href = "?LocationFilter=" + selectvalue;
alert(in__obj_This.href);
in__obj_This.href = "?";
alert(in__obj_This.href);
}
</script>
</head>
<body>
<div >
<a onmouseover ="return _fnc_Build_Link(this,'WFD')">test_new_link</a>
</div>
</body>
</html>
Why does first alert return a blank, the second returns the path of the html file with "l" appended, the third one returns the url of the page with the parameter appended, the third returns the page url with ? appended. I'm trying to understand whats in in__obj_This.href.
Thanks.
<html>
<head>
<script type="text/javascript">
function _fnc_Build_Link(in__obj_This, selectvalue) {
var selecttype;
alert(in__obj_This.href );
in__obj_This.href = "l";
alert(in__obj_This.href );
in__obj_This.href = "?LocationFilter=" + selectvalue;
alert(in__obj_This.href);
in__obj_This.href = "?";
alert(in__obj_This.href);
}
</script>
</head>
<body>
<div >
<a onmouseover ="return _fnc_Build_Link(this,'WFD')">test_new_link</a>
</div>
</body>
</html>