jbajaj
asked on
change background image for a button
I have 2 frames for my page upper_frame.html and lower_frame.html
in lower_frame.html I have a button with background as back.bmp , clicking on which I change the html content in upper_frame.html. I want to add code to change the background of the button after it is clicked to front.bmp.
here is my cuurent code
<html>
<head>
<SCRIPT language="JavaScript">
function change_overview()
{
parent.upper_frame.locatio n="demo.ht ml";
}
</script>
</head>
<body>
<button name="overview" style="background-image:ur l(back.bmp )" onclick="javascript:change _overview( )"><font color="#FFFFFF">Product Overview</font>
</button>
</body>
</html>
in lower_frame.html I have a button with background as back.bmp , clicking on which I change the html content in upper_frame.html. I want to add code to change the background of the button after it is clicked to front.bmp.
here is my cuurent code
<html>
<head>
<SCRIPT language="JavaScript">
function change_overview()
{
parent.upper_frame.locatio
}
</script>
</head>
<body>
<button name="overview" style="background-image:ur
</button>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The comment http:#20175514 contains a commen wrong assumption about syntax of style attributes in JavaScript. Therefore I would not add that comment to PAQ to increase the confusion.
My proposal:
Accept: Zvonko {http:#20175714}
My proposal:
Accept: Zvonko {http:#20175714}
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
function change_overview()
{
parent.upper_frame.locatio
var elm = document.GetElementById("b
elm.style.background-image
}