badge Posted April 19, 2006 Share Posted April 19, 2006 Hi all, need a hand,I've defined a variable "sonic" with radio buttons and can display it using <input type="button" value=Display onClick="document.write(sonic)"> However, I'd really like to show it in a text box next to the button (currently get taken to a new page), and can't for the life of me work out how.Any help greatly appreciated, Badge. Link to comment Share on other sites More sharing options...
aspnetguy Posted April 19, 2006 Share Posted April 19, 2006 <script type="text/javascript">var sonic = 'something';</script>...<input type="button" value=Display onClick="document.getElementById('txt1').value = sonic"/><input type="text" id="txt1" value=""/> Link to comment Share on other sites More sharing options...
badge Posted April 19, 2006 Author Share Posted April 19, 2006 Thanks very much, that's great.-B- Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now