Jump to content

Textarea Problem


Robert Solly

Recommended Posts

I am trying to improve one or two of my websites by using a Send email script and adding a larger text box to the form.I can't get the textarea function to work properly. It creates the textarea box but it puts the code for the "reset" and "submit" buttons inside the box??? How can I get the "reset" and "Submit" buttons below the textarea box?Here is the original code without textarea:<!DOCTYPE html><html><body><h2>Send e-mail to someone@example.com:</h2><form action="MAILTO:someone@example.com" method="post" enctype="text/plain">Name:<br><input type="text" name="name" value="your name"><br>E-mail:<br><input type="text" name="mail" value="your email"><br>Comment:<br><input type="submit" value="Send"><input type="reset" value="Reset"></form></body></html>Result:Send e-mail to someone@example.com:Name:E-mail:Comment: (This is a one line comment area.)The send and reset buttons are here-----------------------------------------------------------------------------------I then changed the code below to include a textarea:<!DOCTYPE html><html><body><h2>Send e-mail to someone@example.com:</h2><form action="MAILTO:someone@example.com" method="post" enctype="text/plain">Name:<br><input type="text" name="name" value="your name"><br>E-mail:<br><input type="text" name="mail" value="your email"><br>Comment:<br><textarea name="comments"rows=10 cols=65 wrap>Comments?/textarea><input type="submit" value="Send"><input type="reset" value="Reset"></form></body></html>------------------------------------------------------------------------As I stated above, the input types (actually the last 5 lines from above) are then in the textarea box.What am I missing here?Thanks for any and all help.Chuck

Link to comment
Share on other sites

'<' on closing '/textarea> should be</textarea>It thinks '/textarea> and beyond is part of textarea element content, eventually the browser will close the textarea itself before its parent element form closing tag '</form>‘

Edited by dsonesuk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...