Jump to content

problem with form variables using WYSIWYG Editor


Looktrne

Recommended Posts

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

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.

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.