PDA

View Full Version : javascript help with html buttom and onClick URL


sabret00the
07-13-2005, 02:51 PM
i've got a button i'm trying to make take you to a url but i have no idea how to do it, i thought it was just <input name="gotopiece" type="button" onClick="goTo('display.php?p=$getpiece[pieceid]')" value="Review This Piece" style="font-size:9px" />

but that didn't work so i've googled and <insert crash burn now>

i've even tried this which i found <input name="gotopiece" type="button" onClick="goToURL('parent','display.php?p=$getpiece[pieceid]');return document.returnValue" value="Review This Piece" style="font-size:9px" /> but it don't work, how do you make a normal button send you to a url?

working version <input name="gotopiece" type="button" onClick="parent.location='display.php?p=$getpiece[pieceid]'" value="Review This Piece" style="font-size:9px" />