I'm currently after some simple javascript. I have a text box and submit button..! i want the user to type in say monkey and CLICK submit or the ENTER key. From here the form changes the url to http://www.mydomain.com/monkey Can someone please help me? I need to make sure that it works from the enter key not just by clicking. Thankyou in advance
Thanks for the link but this has confused me...! I'm a absolute beginner at javascript and dont know where to start apart from i have a text input ans submit button but thats as far as it goes.
use javascript window.open() with the _self frame target, then use 'return false' to stop the form query_string submittal. <form name="thisform" action="" method="get" onsubmit="window.open('http://www.mydomain.com/'+document.thisform.url.value,'_self');return false;"> <input name="url" type="text" /> <input name="submit" type="submit" value="Go!" /> </form> Code (markup):