javascript - New to add an "open in new window" and "Reset Input" into script -


i have been trying use site , cant code or html blocks work putting in blockquotes. not codemonkey 'im looking because cant figure out though have tried many variation.

i trying html part of javascript open created url new window , use "reset" clear text box code below uses. "reset" not clearing textbox (infact nothing happens when click reset button, , gotopage opens created url in same window, when replace "window.open" script stops working together.

<input type="text" id="usps_tracking_number" /> <input type="submit" value="check usps tracking number"  onclick="gotopage();"  <input type="reset" value="reset"> 

help please.

you need wrap input tags inside form tag:

<form>   <input type="text" id="usps_tracking_number" />   <input type="button" value="check usps tracking number" onclick="gotopage();"/>   <input type="reset" value="reset"> </form> 

also change type="submit" type="button". sumbit cause form call url , onclick not triggered.

working example here


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -