Looktrne Posted May 10, 2008 Share Posted May 10, 2008 I'm working on a classified website there is a problem with the ad posting form there are two areas to upload photos some text fields and also a text area that is using a javascript WYSIWYG editor... the thing is if I fill in any of the form text fields and decide to upload a photo after all the field data remains on the page except the main description body that is using the JAVASCRIPT wysiwyg editor.. I need this variable to remain on the page... if anyone can please help or give me some ideas it would be greatly appeciated... the variable is called description... this is the html form <script language="JavaScript" src="js/forms.js"></script> <script language="Javascript" src="smartway/scripts/innovaeditor.js"></script> <form name="form1" action="index.php?page=ad_step_2&catid={CATID}&pid={PID}&ad_id={AD_ID}&ad_secondary_id={AD_SECONDARY_ID}" method="post" enctype="multipart/form-data"> <input type="hidden" name="action" value="submit"> <input type="hidden" name="delete_id"> <input type="file" name="image7"> <input type="button" value="Upload Image" onClick="submit_form(this.form, 'limage_upload');"> <input type="text" name="limage1_url" size="28"> <input type="button" value="Upload Image" onClick="submit_form(this.form, 'limage_upload_url')"> <input type="file" name="image1"> <input type="button" value="Upload Image" onClick="submit_form(this.form, 'image_upload');"> <input type="text" name="image1_url" size="28"> <input type="button" value="Upload Image" onClick="submit_form(this.form, 'image_upload_url')"> <textarea id="txtContent" name="description" rows=4 cols=30>{DESCRIPTION}</textarea> <input type="submit" value="Continue >>"> When I click upload image all the text areas are transfered to the reloaded page except the description text which I think it is lost due to it being a javascript editor.. is there a way I can make sure this DESCRIPTION variable is passed when the upload button is pressed just like the other text fields?? is there some code I can install into the javascript text editor??? thanks for any ideas Paul Link to comment https://forums.phpfreaks.com/topic/104962-problem-with-form-variables-using-wysiwyg-editor/ Share on other sites More sharing options...
johnsmith153 Posted May 10, 2008 Share Posted May 10, 2008 You've obviously let the editor create it then changed yourself to accomodate your variable: <textarea id="txtContent" name="description" rows=4 cols=30>{DESCRIPTION}</textarea> If you look at it and compare to another input, you will see clearly what the problem is: <input type="text" name="limage1_url" size="28"> If not, sorry, but this is very basic. Link to comment https://forums.phpfreaks.com/topic/104962-problem-with-form-variables-using-wysiwyg-editor/#findComment-537309 Share on other sites More sharing options...
Looktrne Posted May 10, 2008 Author Share Posted May 10, 2008 let the editor create it?? I have no clue what you just tried to tell me Paul I wanted to add that this field saves fine when using the submit button at the bottom of the form just doesnt stay on the page when the upload buttons are clicked Link to comment https://forums.phpfreaks.com/topic/104962-problem-with-form-variables-using-wysiwyg-editor/#findComment-537312 Share on other sites More sharing options...
Looktrne Posted May 12, 2008 Author Share Posted May 12, 2008 could someone please shed some light on why this field dissapears when I upload a photo but the other text fields do not clear? thanks.... Paul Link to comment https://forums.phpfreaks.com/topic/104962-problem-with-form-variables-using-wysiwyg-editor/#findComment-538611 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.