Hi all i got a textbox and i allow the user enter some value and hit the submit. On submit i want that value be passed to javascript and that javascript opens a popup window along with that value. I have done most of the part only don't know how to pass value of text box to javascript on click of submit. I be happy if some one help with it.
Note : i don' want the form get redirected to new page !!
HTML Code:<form method="POST" action="--WEBBOT-SELF--"> <input type="text" name="T1" size="20"><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p> </form>
Code:<script language="javascript"> function newWindow(url) { var x,y; x = screen.width-35; y = screen.height-30; var win = window.open(url,'glossaryWindow','toolbar=no,directories=no,width=500,height=500'+ 'screenX=0,screenY=0,top=0,left=0,location=no,status=no,scrollbars=no,resize=yes,menubar=no'); } // Start of Playme Function function playme() { tempUrl =''; url = ''; //alert(tempUrl); url = "./player.php?songid=" + tempUrl.replace(/,$/,""); newWindow(url); return false; } // End of Playme Function // --> </script>




Reply With Quote