TextArea field in jsp - javascript

Experts,
One small question.I have a JSP form page which has Text Area field.
I have a string contains 300 lines. When I paste the content in text area field, it accepting the content. but when i submit the form, page got stuck there only and not moving to servlet.
If i give less than 50/60 lines. its accepting and moving the content to servlet. Any pointers would help how to achieve getting this 300 lines of content to servlet from jsp.
Thanks

Please use method type post
<form action="TEST" method="post">
<textarea rows="11" cols="160" name="tt" ></textarea>
<input type="submit" value="okkk">
</form>

Related

Beginners help to HTML [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I need to create a html page that will accept inputs from one webpage then print out the user results on a seperate HTML page. So far I have this. When I go and check my action_page.php file nothing is being written into it. Is there anyway I can have my inputs print directly on a second HTML page and constantly updating? Also is there any way for an outside application to control or change the values that are shown on the second webpage?
So I guess a more clear description of what I am trying to do is on one page its accepts input A,B,C then on another html page that have the previous A,B,C values I would like to update the values with the new user submitted values. The second webpage needs to also be static in the sense that the first html page would be website.com/UserInput and the second html page would be website.com/PrintedUserInput. I hope that helps. Thanks
<html>
<body>
<form action="action_page.php">
Time:
<br>
<input type="number" name="Time" value="">
<br>
Temperature:
<br>
<input type="number" name="Temperature" value="">
<br>
Instant Brew:
<br>
<input type="number" name="InstantBrew" value="">
<br>
<br>
<input type="submit" value="Submit">
</form>
<p>If you click "Submit", the form-data will be sent to a page called "action_page.php".</p>
</body>
</html>
All you have to do, is put the "method" attribute to your form like this:
<form action="action_page.php" method="post">
You absolutely need a server side language then to print them out. Since you use your page with the PHP extension, I'm guessing you're using PHP. So then you can call them that way in your other page:
<html>
<body>
Time: <?= $_POST['Time'] ?>
<br>
Temperature: <?= $_POST['Temperature'] ?>
etc, where the name you put between your POST braces is the "name" attribute of your input. Note that name attribute is case sensitive
Hope it helped !

Open Outlook and preset email, subject and body using HTML/Javascript

I am new in Javascript and I would like to make a small offline tool that opens up Outlook, and presets the email in the "To" section, presets the default Subject, and presets the body of the email with text from a textarea.
I would need the text area so that I can modify the email content whenever I want.
For now, I have the following code:
<form method="post" action="mailto:yourname#yoursite.com" enctype="text/plain">
<input type=text name=your_content>
<input type=submit value="Submit Your Content">
</form>
However, when I submit, Outlook opens, and the name attributes' values appear before my text.
Is there a way to avoid adding the name's value in my email, replace input with textarea and add the above mentioned things?
Thanks!
Try switching the method to GET so it behaves more like an anchor tag and puts your values into url parameters instead of a post body. You will have to set the input names to valid mailto: values like body & subject
<form method="GET" action="mailto:yourname#yoursite.com" enctype="text/plain">
<input type=text name="body">
<input type=submit value="Submit Your Comments">
</form>
note that there is a max url size of ~2k characters

Add WYSIWYG to already existing textareas without losing PHP functionality

I have some existing forms with text areas made for editing. They first retrieve information from the database, the user can edit them and then update them in the database.
The problem is that in the database I have some text from MS Word and in the textareas I see Word formatting. I tried using TinyMCE Editor, but it replaces the existing textareas with custom code - losing classnames and other things that I refer to in my code and nothing works anymore.
Is there any minimal WYSIWYG editor that I could implement into my website without losing the already existing functionality?
Or are there any ways to change the Word formatting without using a plugin?
This is my example form:
<form id="myForm7" action="api/userInfo_1.php" method="post">
Name: <textarea id="nazwa-artysty" type="textarea" name="Nazwa" class="nazwa"></textarea>
Songs: <textarea type="text" name="Piosenki" class="piosenki"></textarea>
<textarea type="input" id="" name="Id7" class="hidden-pic" ></textarea>
<button type="submit" class="cms-button">Save</button>
</form>
The text to be edited is inserted into the textareas via PHP using the name of the textarea in $.POST. When using TinyMCE, the textarea doesn't exist anymore and therefore there's no text inserted into it.

Getting an input from outside the form to submit with it

Okay, so I have an input
<input class="r" type="file" accept="image/*" id="work" capture="camera" name="Picture">
Later in the document i have a form
<form action="enterforms.php" method="post" onSubmit="return validate()">
which contains a hidden input
<input id="pic" type="file" name="Picture">
i need a way of either submitting the orginal input with the form or copying the first form into the second.
Some observations:
neither clone nor moving the original input will make it maintain the value of the file in the form
I can get a "URL" of the file that will work as a src tag for an image
I can't move input into the form because they're on separate pages in this pretty complex structure.
Basically, submitting the image is creates the form, but it pushes the input away from the user. (Its actually more complex but really hard to explain, if I need to I can go more into detail)
Thanks for any help!

Html Form Submit appends + (plus) in URL params

I am having a simple form following is the code
<form action="search.html" method="get" accept-charset="utf-8" id="search-within-form"">
<input type="hidden" name="within" id="within" value="">
<input type="text" name="q" value="" id="search-within" autocomplete="off" class="search-within-results inactive" title="">
<input type="submit"/>
</form>
I am entering test data for search in the field and click submit, in the URL I see is
/search.html?within=&q=test+data+for+search
But I need the url to be like tis
/search.html?within=&q=test data for search
I know this can be done by using java script form submit etc.. I like to know is there some way I can achieve this using html?
Thanks in advance.
Your URL will never display that way in a browser. Either the text will be seperated by those '+' characters or it will be seperated by '%20's. Is there a reason you need the URL to display in that fashion? Ultimately it comes down to how the browser displays the URL in the address bar. '%20' is code for a space. You might be able to develop a browser extension that would make them display with the spaces, but that sounds pretty terrible to me.
Why don't you clean the text at the place you retrieve the value from the form ? Is there any reason why you can't do that ?

Categories

Resources