Jump to content

<textarea> readonly


kv79

Recommended Posts

Hi ,I would like to use this ,but it does not work .

<textarea rows="2" cols="80" rows="40"  readonly="false" >The cat was playing in the garden. Suddenly a dog showed up..... And you get killed by the horse .</textarea>

The readonly from this one http://www.w3schools.com/tags/html5_textarea.aspdoes not work -> I tested and false command does not working in mode

readonly="false"

Can anyone explain why is that ?

Link to comment
Share on other sites

Dont know sorry. :) Do you mind me asking why you want a text-area that is read-only?

Link to comment
Share on other sites

if you want to make a textarea readonly just write <textarea readonly> (html 4) or <textarea readonly="readonly"> (xhtml)if you don't want to make it readonly, remove the readonly attribute, you can't set readonly='false' or readonly='true'check your link againwww.w3schools.com/tags/html5_textarea.aspthis is where you should look:www.w3schools.com/tags/tag_textarea.asp

Link to comment
Share on other sites

No, the w3schools people can't write to you, as they are waay to busy to answer each little coding problem, but you can listen to the experienced web developers that are members of this board.Now, the reason this doesn't work is because you are trying to use something from HTML 5, which no browser vendor has implemented in a browser yet, and is in fact just a working draft (work in progress) by the panel who defines internet standards, the WorldWide Web Consortium (W3C):http://www.w3.org/html/wg/html5/

HTML 5A vocabulary and associated APIs for HTML and XHTMLW3C Working Draft 1 April 2008
You should stick to HTML 4.01 or XHTML 1.0/1.1 for now.
Link to comment
Share on other sites

>You should stick to HTML 4.01 or XHTML 1.0/1.1 for now.That is not a problem .Ok , But how I can create post ? with edit and Compete Edit , Like w3school did or that is the secret of the hole damn world .Thank you .Edit :Thanks for info .

Link to comment
Share on other sites

>You should stick to HTML 4.01 or XHTML 1.0/1.1 for now.That is not a problem .Ok , But how I can create post ? with edit and Compete Edit , Like w3school did or that is the secret of the hole damn world .Thank you .Edit :Thanks for info .
The "quick edit" function on the W3Schools forum makes use of AJAX (Javascript) and PHP. It's a little complicated, I recommend you check the AJAX tutorial to see how to work with and modify websites in real time with things that only server-side languages could do.
Link to comment
Share on other sites

-> IngolmeThe "quick edit" function on the W3Schools forum makes use of AJAX (Javascript) and PHP. It's a little complicated, I recommend you check the AJAX tutorial to see how to work with and modify websites in real time with things that only server-side languages could do.I want to make a post , with edit and complete Edit ,AJAX does not allow me to write a files . AJAX is used to call requests. If I am wrong please tell me and give why do you think so .But it is possible to call all ready wrote post .But why do I need to make a file .When people create a MySQL for storing such a text .Thank you for reading this .

Link to comment
Share on other sites

AJAX means to use JavaScript to call the server. It's the server that does the writing to files, and can then give JavaScript something to confirm the successful writing.The procedure is this:

  1. Create a reading pane (form or otherwise).
  2. When the user clicks the edit button, find the content they want to edit and save it in a variable.
  3. Turn the reading pane into a writing pane.
  4. Place the stored content in that writing pane.
  5. When the user clicks the "post modified post" (or whatever) link/button, fetch the new content from the textarea and save it into a variable.
  6. Send a request to the server containing the new post as the requests' body.
  7. Once the server replies that the post was saved (this can be done by making PHP send a simple PHP header or status code), transform the writing pane to a reading pane with the new content in place.

Link to comment
Share on other sites

-> boen_robotIs there any code example for your story ?
Unfortunatly, no. None that I have made. But I believe this board uses the same type of story for its workings, so if you could "reverse engineer" it, you'll end up with the same mechanism as my story.
Link to comment
Share on other sites

I just find out how to do it . A very simple Comment .I always find a way how to solve my problem but alway takes time .But I will post my code just to teach you something . :)

<?php echo "<form method='post' action='index.php'>";		echo "<textarea style=\"height: 90px;\" rows=\"8\" cols=\"45\" id=\"feedcomment\" name=\"comment\"></textarea>";echo "<input type=\"submit\" name=\"submit\" value=\"Post my comment\" />";echo "</form>";$comments=$_POST["comment"];echo $comments;?>

If this is complicated then for you guys need to see a Doctor . ( This is a Bad joke , because no one laugh ).But I am very pleased when you trying to help me .Thank you for your time of reading .

Link to comment
Share on other sites

If you're trying to process and respond to a form (which is all your code does, it's not saving anything anywhere), then check these:http://w3schools.invisionzone.com/index.ph...ost&p=96606http://www.php.net/manual/en/tutorial.forms.phphttp://www.w3schools.com/php/php_forms.aspThis information is not a secret, it is all over the internet. You just need to know how to either find it yourself, or communicate what you want so that people can understand what you're asking.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...