Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - textarea value disappears
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedtextarea value disappears

 Post Reply Post Reply
Author
jenn5175 View Drop Down
Newbie
Newbie


Joined: 08 August 2006
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote jenn5175 Quote  Post ReplyReply Direct Link To This Post Topic: textarea value disappears
    Posted: 08 August 2006 at 9:26pm
When I submit my form, there is nothing in the textarea value that is submitted. It works in the default.asp page supplied, but not in my real life example.

Here is my code

<tr>
                                        <td>Msg:<br>
                                    <%
                      'ID tag name of the HTML form the textarea is within
                      strFormName = "form1"
                     
                      'ID tag name of HTML textarea being replaced
                      strTextAreaName = "sMyMessage"
                     
                      %>
                      <!-- include the Web Wiz Rich Text Editor -->
                      <!--#include file="RTE_editor_inc.asp" -->

                          
                                    <textarea name=sMessage id=sMyMessage rows=15 cols=55><%=sMessage%></textarea></td>
                                    </tr>

And here is where the page submits to:

sMessage = trim(replace(Request.Form("sMessage"), "'", "`"))
    if sMessage = "" then
        sError = sError & "Please enter some text<br>"
    end if


It ALWAYS gives the error message meaning sMessage is blank.

Help!
Jenn

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: 09 August 2006 at 9:39am
The form name and ID tag need to have the same name eg:-

name="sMyMessage" id="sMyMessage"

Also I can't see the form tag, but make sure that has a different name to tbe texteara but the 'name' and 'id' property have the same name.
Back to Top
jenn5175 View Drop Down
Newbie
Newbie


Joined: 08 August 2006
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote jenn5175 Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2006 at 1:08pm
I was being dumb on this one - the issue was I was using a link to submit rather than a submit button. Changing it to a submit button made everything work - sorry!
 
FYI - in the example you guys give us in the zip file the name and id are different - that is why I did it that way (originally I had them the same and thought that might be the issue). Just in case anyone else is reading this, wanted to point it out that from everything I can tell, they DO NOT have to be the same (although it is good practice).
 
Thanks!
Jenn
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.