DEVILofDARKNESS Posted March 23, 2009 Share Posted March 23, 2009 Is there a more proper way to change values as with forms? F.e. You are on your own user page where you should be able to change your email. currently there are textareas shown beneeth each value that can be changed with the current value, you can change the textarea its value and you need to click on submit. is there a more proper way? Link to comment https://forums.phpfreaks.com/topic/150750-solved-change/ Share on other sites More sharing options...
Yesideez Posted March 23, 2009 Share Posted March 23, 2009 I think you're needing Javascript... <textarea name="mytext"></textarea> <input type="button" value="Change" onclick="document.form.mytext.value='i am here'" /> Link to comment https://forums.phpfreaks.com/topic/150750-solved-change/#findComment-791983 Share on other sites More sharing options...
revraz Posted March 23, 2009 Share Posted March 23, 2009 Is there a more proper way? Not really. But for your example I would use a INPUT line and not a Textarea. Is there a more proper way to change values as with forms? F.e. You are on your own user page where you should be able to change your email. currently there are textareas shown beneeth each value that can be changed with the current value, you can change the textarea its value and you need to click on submit. is there a more proper way? Link to comment https://forums.phpfreaks.com/topic/150750-solved-change/#findComment-792040 Share on other sites More sharing options...
DEVILofDARKNESS Posted March 23, 2009 Author Share Posted March 23, 2009 Is there a more proper way? Not really. But for your example I would use a INPUT line and not a Textarea. I'm not known with INPUT lines are it just html or are it PHP codes? Link to comment https://forums.phpfreaks.com/topic/150750-solved-change/#findComment-792072 Share on other sites More sharing options...
revraz Posted March 23, 2009 Share Posted March 23, 2009 HTML http://www.w3schools.com/html/html_forms.asp Look at the first Input Text example. Link to comment https://forums.phpfreaks.com/topic/150750-solved-change/#findComment-792074 Share on other sites More sharing options...
Yesideez Posted March 23, 2009 Share Posted March 23, 2009 TEXTAREA is a chunk of text (including multiple lines) whereas INPUT only one line. Link to comment https://forums.phpfreaks.com/topic/150750-solved-change/#findComment-792080 Share on other sites More sharing options...
RichardRotterdam Posted March 23, 2009 Share Posted March 23, 2009 I'm not known with INPUT lines are it just html or are it PHP codes? were just talking basic html here Textarea (for large chunks of text such as descriptions) <textarea></textarea> Input for text (for things like names,emails, streetnames etc) <input type="text" /> Link to comment https://forums.phpfreaks.com/topic/150750-solved-change/#findComment-792135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.