B
Burak Gunay
Hello,
In my asp.net 2.0 page, I have a hyperlink with an arrow image
<a id="imgtest" href="#"onclick="return hideColumn()">
<img id="imgArrow" src="App_Themes/Trmis/WebResource3.gif"
alt="Click" />
</a>
WebResource3.gif is an arrow pointing left and when I click on it I
want to replace it with WebResource4.gif which is an arrow pointing
right, but for some reason the code below is not working.
<script language="javascript" type="text/javascript" >
var testVar = 1;
var aDOM = 0, ieDOM = 0, nsDOM = 0; var stdDOM =
document.getElementById;
if (stdDOM) aDOM = 1; else {ieDOM = document.all; if (ieDOM) aDOM = 1;
else {
var nsDOM = ((navigator.appName.indexOf('Netscape') != -1)
&& (parseInt(navigator.appVersion) ==4)); if (nsDOM) aDOM = 1;}}
function xDOM(objectId, wS) {
if (stdDOM) return wS ? document.getElementById(objectId).style:
document.getElementById(objectId);
if (ieDOM) return wS ? document.all[objectId].style:
document.all[objectId];
if (nsDOM) return document.layers[objectId];
}
function hideColumn()
{
var objs = xDOM('menu_column',1)
var objs2 = xDOM('imgArrow',1)
if ( objs.display != 'none' )
{
objs.display = 'none';
objs2.src = 'App_Themes/Trmis/WebResource4.gif'
}
else
{
objs.display = 'block';
objs2.src = 'App_Themes/Trmis/WebResource3.gif'
}
return true;
}
</script>
Any help will be appreciated.
Thanks,
Burak
In my asp.net 2.0 page, I have a hyperlink with an arrow image
<a id="imgtest" href="#"onclick="return hideColumn()">
<img id="imgArrow" src="App_Themes/Trmis/WebResource3.gif"
alt="Click" />
</a>
WebResource3.gif is an arrow pointing left and when I click on it I
want to replace it with WebResource4.gif which is an arrow pointing
right, but for some reason the code below is not working.
<script language="javascript" type="text/javascript" >
var testVar = 1;
var aDOM = 0, ieDOM = 0, nsDOM = 0; var stdDOM =
document.getElementById;
if (stdDOM) aDOM = 1; else {ieDOM = document.all; if (ieDOM) aDOM = 1;
else {
var nsDOM = ((navigator.appName.indexOf('Netscape') != -1)
&& (parseInt(navigator.appVersion) ==4)); if (nsDOM) aDOM = 1;}}
function xDOM(objectId, wS) {
if (stdDOM) return wS ? document.getElementById(objectId).style:
document.getElementById(objectId);
if (ieDOM) return wS ? document.all[objectId].style:
document.all[objectId];
if (nsDOM) return document.layers[objectId];
}
function hideColumn()
{
var objs = xDOM('menu_column',1)
var objs2 = xDOM('imgArrow',1)
if ( objs.display != 'none' )
{
objs.display = 'none';
objs2.src = 'App_Themes/Trmis/WebResource4.gif'
}
else
{
objs.display = 'block';
objs2.src = 'App_Themes/Trmis/WebResource3.gif'
}
return true;
}
</script>
Any help will be appreciated.
Thanks,
Burak