Print Page | Close Window

Form not posting data - comments?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=17454
Printed Date: 28 March 2026 at 7:15am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Form not posting data - comments?
Posted By: campite
Subject: Form not posting data - comments?
Date Posted: 05 December 2005 at 12:07pm

Why is my form not posting data?

I did a little digging, and this is what i found out:
  • the rich text error is really an iframe sitting on top of your textarea, which means that your textarea is empty (or contains the initial value) while you are updating and not the updated text
  • only when you submit the form does the the text in the editor get assigned to your textarea field (see RTE_javascript.asp line 161 to 187)
 
so what does this mean:
 
  • the value is assigned to your textarea when the onsubmit event is fired (this can only be done with a button of type=submit or of type=image)
  • you cannot fire this event with javascript (so if you have something like href = "javascript:form.submit();" or onClick = "javascript:form.submit();" it won't work, yes the form will submit but the onsubmit event is not fired and you end up with a blank textarea)
 
my suggestion (and please let me know yours as well):
 
  • use a submit button
  • if you want to use an image instead then use a button of type=image (this works - i'm using this approach)
  • if you need to do validation or other stuff just before submitting the form, place the javascript function in the form action (i.e. action="javascript:SubmitMyFormFunction();") then write your code in this javascript function and submit the form by form.submit();
  • this works because when your submit button is clicked it will call the onsubmit event first (assigning the editor text to your textarea) and then your javascript function will be called (again see the code in RTE_javascript.asp)
 
I hope this saves someone else from the head-cracking work it took me, not to mention the time...Other than that the RTE is great, i will purchase it soon! Wink
 
Your thoughts are appreciated.
 
Did I overlook something?
 
 
*********************
Campite Consulting
http://www.campite.com/template/index.html - http://www.campite.com/template/index.html
 



Replies:
Posted By: darkfaceofmoon
Date Posted: 29 April 2006 at 2:36am
Thanks thanks thanks..
I have spent a dozen of hours with this problem and after this solution I solved it...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net