473,320 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Javascript and Textarea problem!

I try to send a bunch of lines from JavaScript to a Java applet on the
same page. However, I receive only an empty string, unless the TextArea
has only one line.

Can someone put my nose on the right way to send all lines to Java?

Jan 16 '06 #1
3 1269
Rene Grothmann wrote:
I try to send a bunch of lines from JavaScript
Which script?
to a Java applet on the same page.
Which applet?
However, I receive only an empty string, unless the TextArea
has only one line.

Can someone put my nose on the right way to send all lines to Java?


With this vague description, no. Post _some_ code, maybe that will help.

<URL:http://jibbering.com/faq/>
PointedEars

P.S.: <URL:http://dcljs.de/>
Jan 16 '06 #2
Rene Grothmann wrote:
I try to send a bunch of lines from JavaScript to a Java applet on the
same page. However, I receive only an empty string, unless the TextArea
has only one line.

Can someone put my nose on the right way to send all lines to Java?


As a complete stab in the dark, have you tried replacing all newlines,
carriage returns, linefeeds, tabs, etc. with a single space? e.g.
var varToPass = TAref.value.replace(/\s+/g,' ');
varToPass has the value of the textarea with newlines, carriage returns,
linefeeds, tabs, etc. replaced by single spaces.

TAref is a reference to the textarea and varToPass is the variable to send
to the applet.

--
Rob
Jan 16 '06 #3
The first answer helped me in so far, as it told me that the thing must
work. So I redid the HTML file from a fresh start, and miracously
everything works now as expected. I have no idea, what I did
differently from the last time. Must have been a silly error.

I have some other problem with the speed of the reaction on the first
button press. However, I will open a separate thread for this.

Thanks all.

Jan 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dan glenn | last post by:
hi. I'm having a problem using javasript to pass the value of a textarea (in a form) to a PHP script file. I want to code a 'preview' function into a guestbook entry page, using an HTML link...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
1
by: IkBenHet | last post by:
Hello, I found this script to create a simple rich text form (http://programmabilities.com/xml/index.php?id=17): <html> <head> <title>Rich Text Editor</title> </head> <body>
13
by: John Smith | last post by:
I am using IE 6.0 from http://www.javaworld.com/javaworld/jw-07-1996/jw-07-javascript-p2.html I gather that "If you need to test a number of command lines, you can reduce the keystrokes by...
1
by: den2005 | last post by:
Hi everybody, I am confused and still looking why this codes is not working. Can anyone notice or know why this code is not working? Thanks in advance. Code working: <form id="form1"...
7
by: julian.tklim | last post by:
Hi, I need to build an editable Datagrid with add & delete buttons on each row using javascript. DataGrid need not be pre-populated with values. To make the thing complicated, one of the...
4
by: Nate12o6 | last post by:
Mabee you guys can help me with this. I have a form with enctype="multipart/form-data" that has a textarea in it as well as file upload. The text area is for a description of the file. If...
15
by: Asterbing | last post by:
Already posted in comp.lang.javascript but not found any solution :-( -- Hi all, Don't know where to ask my question because the way to go is included in the possible answer itself by...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.