Reputation: 1828
I would to create a link inside a button. I understand that a normal HTML link button works with all other browsers except for internet explorer. I added some javascript, but now the link isn't working in browser. My javascript skills are not good at all as I am still learning.
<tr>
<td> </td>
<td><input type="submit" value="Submit" />
<input type="reset" value="Clear and Reset" />
<input type="button" value="Return To Term" onClick="javascript:location.href = commute.php?clickedletter=<?php echo $clickedterm ;?>;" /></td>
Upvotes: 1
Views: 70
Reputation: 43
<tr>
<td> </td>
<td><input type="submit" value="Submit" />
<input type="reset" value="Clear and Reset" />
<input type="button" value="Return To Term" onClick="javascript:location.href='commute.php?clickedletter=<?php echo $clickedterm ;?>';" /></td>
you must use quotes.
Upvotes: 0
Reputation: 1636
You must to enclose the string in single quotes:
<input type="button" value="Return To Term" onClick="javascript:location.href = 'commute.php?clickedletter=<?php echo $clickedterm ;?>';" />
Upvotes: 1
Reputation: 40672
You need to place the URL inside quotes:
<input type="button" value="Return To Term" onClick="javascript:location.href = 'commute.php?clickedletter=<?php echo $clickedterm ;?>'" /></td>
Upvotes: 2
Reputation: 6066
onClick="location.replace('commute.php?clickedletter=< ?php echo $clickedterm;?>'" /></td>
Upvotes: 0