prudens Posted June 12, 2008 Share Posted June 12, 2008 Hi, I have a input type = text that I want to pass its values to a special variable var_special when it is changed... And then, whenever it is changed, I want to change the window url as well. How can I achieve that? Quote Link to comment Share on other sites More sharing options...
haku Posted June 12, 2008 Share Posted June 12, 2008 What do you want to do with this 'special variable'? Show us the code you have already. Quote Link to comment Share on other sites More sharing options...
prudens Posted June 12, 2008 Author Share Posted June 12, 2008 alert(document.getElementById['form1'].l_text.value); alert(document.getElementById['l_text'].value); None of those work! (I'm developing on Facebook platform... I think they disabled .value property...) But I really need to get the value of the textbox by clicking a button... Quote Link to comment Share on other sites More sharing options...
zenag Posted June 12, 2008 Share Posted June 12, 2008 <form action="" method="post"> <input type="text" name="test" id="test" /> <input type="button" name="button" value="button" onclick="getvalue()" /> </form> <script type="text/javascript"> function getvalue() { alert(document.getElementById('test').value); $value=document.getElementById('test').value; } </script> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.