Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Form not posting data - comments?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedForm not posting data - comments?

 Post Reply Post Reply
Author
campite View Drop Down
Newbie
Newbie


Joined: 05 December 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote campite Quote  Post ReplyReply Direct Link To This Post Topic: Form not posting data - comments?
    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
 
Back to Top
darkfaceofmoon View Drop Down
Newbie
Newbie


Joined: 29 April 2006
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote darkfaceofmoon Quote  Post ReplyReply Direct Link To This Post 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...
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.