0

I got this PHP page where I get data from a database and turns it into a link through javascript.
It works well on Google Chrome and IE but doesn't work at all on Firefox. Any idea why? Thanks a bunch :)

<script type="text/javascript">
function submitform(action)
  {
    document.forms("pSubCategory" + action + "").submit();
  }
</script>
<? 
  $counter = 1;
  do { 
?>
<tr onMouseOver="this.style.backgroundColor='#E1EAFE'"; onMouseOut="this.style.backgroundColor='transparent'">
<td style="padding-left:10px;"> 
<form action="hardware.php" method="post" name="pSubCategory<? echo $counter; ?>">
<font size="2" color="#333333">
<a href="javascript: submitform(<? echo $counter; ?>);"><font color="black" style="text-decoration:underline;"><?php echo $row_subcatset2['pSubCategory']; ?></font></a>
</font>
<input name="sc" type="hidden" value="pSubCategory" />
<input name="st" type="hidden" value="<?php echo $row_subcatset2['pSubCategory']; ?>" />
</form>
</td>
</tr>
<?
  $counter = $counter + 1;
  } while ($row_subcatset2 = mysql_fetch_assoc($subcatset2));	
?>
2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by stultuske
0

Solved it by changing

document.forms("pSubCategory" + action + "").submit();

to

document.forms["pSubCategory" + action + ""].submit();

Can't find the delete button for this thread though ._.

0

there is no delete button. just a 'mark as solved'.
don't forget to check your other browsers whether they still work :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.