Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - texarea is not posting data
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedtexarea is not posting data

 Post Reply Post Reply
Author
Villain View Drop Down
Newbie
Newbie


Joined: 30 November 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Villain Quote  Post ReplyReply Direct Link To This Post Topic: texarea is not posting data
    Posted: 30 November 2005 at 4:50am
when i submit my form the textarea is not posting any info?
 
here is my form:
<FORM ACTION="addNews2.asp" METHOD="POST" NAME="form">
  <TABLE width = 100%>
    <TR class="TData_Info">
      <TD width="50%">Add News</TD>
      <TD width="50%"><a onclick = "return checkFields()" href = "javascript:form.submit();">Add</a></TD>
    </TR>
    <TR Class = "TData_Text_Grey">
      <%
 'Name of the HTML form the textarea is within
 strFormName = "form"
 
 'ID tag name of HTML textarea being replaced
 strTextAreaName = "mytextarea"
 
 %>
      <!-- include the Web Wiz Rich Text Editor -->
      <!--#include file="RTE_editor_inc.asp" -->
      <TD colspan="2" align="center" Class="TData_Text_Grey"><textarea name="textarea" cols="100" rows="20" ID="mytextarea"></textarea></TD>
    </TR>
    <TR Class = "TData_Text_Grey">
      <TD colspan="2" align="center" Class="TData_Text_Grey">&nbsp;</TD>
    </TR>
  </TABLE>
</form>
 
any ideas as to why its not posting?
thanks
Shem
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2005 at 6:28am
Your form needs to have an ID value as well as a name value, also calling the form 'form' is not a good idea as it can course conflicts in the JavaScript.

A proper submit button instead of sunbmitting by a javascript onclick event may also help.
Back to Top
Villain View Drop Down
Newbie
Newbie


Joined: 30 November 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Villain Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2005 at 7:51am
oh i thought the freakin textarea needed an ID - ha silly me
thanks for the help Embarrassed
Back to Top
Villain View Drop Down
Newbie
Newbie


Joined: 30 November 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Villain Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2005 at 8:05am
tried your suggestions, no lucky
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2005 at 10:52am
Try chnaging the names of form elements as sometimes they can clash cousring problems.
Back to Top
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 Posted: 06 December 2005 at 2:28pm
I believe this line is causing the problem:
 
<a onclick = "return checkFields()" href = "javascript:form.submit();">Add</a>
 
the form will submit but the onsubmit event is not fired and you end up with a blank textarea. (the onsubmit event must be fired and it cannot be done this way, you need a button of type=submit or type=image)
 
See my explanation here:
 
 
 
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.