Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

button style

Status
Not open for further replies.

kromych

Technical User
Joined
Dec 6, 2007
Messages
3
Location
GB
hello,
I creatred a java script to swap a style of 2 buttons but i am getting error "member not found" on function line. This is a script:
function blueclick()
{
document.formc.pb5.style = document.formc.pb7.style;
}
i am new to java so its maybe something obvios.
thanks
Reply With Quote
 
You need to set the specific styles. It may be easier to add a class than to set each style manually, though.

Code:
...
document.formc.pb5.className = document.formc.pb7.className;
...

Of course you will have to assign a class to the pb5 form element for the code above to work.

...i am new to [!]java[/!] so its maybe something...
Please check the FAQ linked in my footer to understand the difference between Java and Javascript.

Cheers,
Jeff


[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Thanks a lot for the advise Jeff - it works now :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top