I was trying to get a javascript function to change my table border but two thing occured, my value in the input box does not keep the value of the current query to my database, so the border stays one color instead of changing depending upon input
* I took the results out because that is too much to post and the results work fine.
according to the current value of my input box the border should be blue, but it is still red and the input value does not stay with the current team. What's wrong?
Code:
<html>
<head>
</head>
<script language="javascript">
function changeBorder()
{
if(document.getElementById('FindP').value='Houston Texans')
{
document.getElementById('T').style.borderColor='blue';
}
if(document.getElementById('FindP').value='Washington Redskins')
{
document.getElementById('T').style.borderColor='red';
}
}
</script>
<body onLoad="changeBorder()">
<h2>Search</h2>
<form name='search' method='post' action='Team_Roster.php'>
Enter Team Name: <input type='text' id='FindP' name='find' value='Houston Texans' />
<input type='hidden' name='searching' value='yes' />
<input type='submit' name='search' value='Find' />
</form>
<h2>Results</h2><p><table id='T' border='5'>
* I took the results out because that is too much to post and the results work fine.
according to the current value of my input box the border should be blue, but it is still red and the input value does not stay with the current team. What's wrong?