TripleDES Posted July 9, 2008 Share Posted July 9, 2008 Hopefully, this is a simple question. How do I go about setting a variable (PHP/Javascript) so when a user clicks out of a text field, it's immediately assigned? Thanks! Link to comment https://forums.phpfreaks.com/topic/113918-setting-variable-on-change/ Share on other sites More sharing options...
lemmin Posted July 9, 2008 Share Posted July 9, 2008 Like this? <input type=TEXT onblur="var variable=1;"> Link to comment https://forums.phpfreaks.com/topic/113918-setting-variable-on-change/#findComment-585471 Share on other sites More sharing options...
TripleDES Posted July 9, 2008 Author Share Posted July 9, 2008 But the value I want for the variable is the value of the input. Would this still work? Link to comment https://forums.phpfreaks.com/topic/113918-setting-variable-on-change/#findComment-585541 Share on other sites More sharing options...
lemmin Posted July 9, 2008 Share Posted July 9, 2008 Yeah: <input type=TEXT onblur="var variable=this.value;"> Link to comment https://forums.phpfreaks.com/topic/113918-setting-variable-on-change/#findComment-585544 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.