Simple javascript: why won't it work cross-browser?

I am trying to use Javascript for a series of menu buttons. When clicked, I want to enter text into a hidden field, and change the border around the clicked icon. My code works fine in Firefox, but not in other browsers. Please advise.

Sample link:
<a href="javascript:setButton4();" onClick="javascript:document.forms['search'].cat.value='Toys';" onMouseUp="setButton4();">
The javascript functions:
function setButton1()  {"5""1""1""1""1""1""1"		
function setButton2()  {"1""5""1""1""1""1""1"	
function setButton3()  {"1""1""5""1""1""1""1"	
function setButton4()  {"1""1""1""5""1""1""1"	
function setButton5()  {"1""1""1""1""5""1""1"	
function setButton6()  {"1""1""1""1""1""5""1"	
function setButton7()  {"1""1""1""1""1""1""5"	

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

it may be that  other styles are overriding

if this doesn't work, you could check which browser is being used and based upon that set the borderwidth accordingly where it shows up identical all browsers...
Cannot test your code without the html, but you can merge this
onClick="javascript:document.forms['search'].cat.value='Toys';" onMouseUp="setButton4();"
to just

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jpschreibmanAuthor Commented:
No other styles are overriding. It simply is not working in IE.

Thanks for trying.

The HTML is attached below:

	<legend>Find More Presents!</legend>
			<form name="search" action="./?page=users_home&act=MORE#look" method="post">
		<td><a href="javascript:setButton4();" onClick="javascript:document.forms['search'].cat.value='Toys';" onMouseUp="setButton4();javascript:document.forms['search'].keyword.value='What type of toys are you looking for?';"><img id="button4" width="85" src="./theme/images/icon_toys.png"  border="5" ></a></td>		
		<td><a href="javascript:setButton5();" onClick="javascript:document.forms['search'].cat.value='VideoGames';javascript:document.forms['search'].keyword.value='What type of video games are you looking for?';" onMouseUp="setButton5();"><img id="button5" width="85" src="./theme/images/icon_games.png"  border="1" ></a></td>			
		<td><a href="#" onClick="javascript:document.forms['search'].cat.value='Books';javascript:document.forms['search'].keyword.value='What type of book are you looking for?';" onMouseUp="setButton1();"><img id="button1" width="85" src="./theme/images/icon_books.png"  border="1" ></a></td>
		<td><a href="#" onClick="javascript:document.forms['search'].cat.value='DVD';javascript:document.forms['search'].keyword.value='What type of movie or DVD are you looking for?';" onMouseUp="setButton2();"><img id="button2" width="85" src="./theme/images/icon_movies.png"  border="1" ></a></td>
		<td><a href="#" onClick="javascript:document.forms['search'].cat.value='Music';javascript:document.forms['search'].keyword.value='What type of music are you looking for?';" onMouseUp="setButton3();"><img id="button3" width="85" src="./theme/images/icon_music.png"  border="1" ></a></td>		
		<td><a href="#" onClick="javascript:document.forms['search'].cat.value='Apparel';javascript:document.forms['search'].keyword.value='What type of clothes are you looking for?';" onMouseUp="setButton6();"><img id="button6" width="85" src="./theme/images/icon_clothes.png"  border="1" ></a></td>				
		<td><a href="#" onClick="javascript:document.forms['search'].cat.value='Tools';javascript:document.forms['search'].keyword.value='What type of tools are you looking for?';" onMouseUp="setButton7();"><img id="button7" width="85" src="./theme/images/icon_tools.png"  border="1" ></a></td>				
		<td><a href="#" onClick="javascript:document.forms['search'].cat.value='Electronics';javascript:document.forms['search'].keyword.value='What type of electronics are you looking for?';" onMouseUp="setButton8();"><img id="button8" width="85" src="./theme/images/icon_electronics.png"  border="1" ></a></td>				
	<tr><td colspan="10" style="padding:10px;" bgcolor="#000033"><font color="#ffffff"><b>Search for:</b></font> <input type="text" size="45" name="keyword" value=""> <input class="submit" type="submit" value="go!"></td></tr>
	<input type="hidden" name="cat" id="cat" value="Toys">
	<p>Want to browse the regular site? <a class="gen_link" href="" target="_blank">Click here!</a></p>

Open in new window

Do not use

try to change to

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.