newLine in <applet>'s <param> tag

P

peter10

Hello everybody,

is there an alternative to the <param> tag when passing data to an
applet?

The problem I have is that newLine characters are lost when using the
<param>tag.

I tried it with replacing all /n with
which worked fine inside
JBuilder but not for IE (6.0) and Netscape (7.1).

Does anybody have any ideas?

Thanks alot for every hint,

Peter
 
A

Andrew Thompson

is there an alternative to the <param> tag when passing data to an
applet?

The problem I have is that newLine characters are lost when using the
<param>tag.

Why are you feeding 'newlines' to an applet?

Any piece of text that long is probably best displayed
in an HTML said:
I tried it with replacing all /n with
which worked fine inside
JBuilder but not for IE (6.0) and Netscape (7.1).

Does anybody have any ideas?

Replace the new-lines with a sequence of characters that
are not going to be in the input text, then split the line
based on those markers and insert new-lines.
 
P

peter10

Hello Andrew!
Why are you feeding 'newlines' to an applet?

Well the reason is that my applet functions as a text editor. One can
save and then reload text to continue editing, and thus all the
newlines that one has put in when first editing text have to show up
again.
Replace the new-lines with a sequence of characters that
are not going to be in the input text, then split the line
based on those markers and insert new-lines.

Thanks! That seems like a workable solution!

Peter
 
A

Ann

peter10 said:
Hello everybody,

is there an alternative to the <param> tag when passing data to an
applet?

The problem I have is that newLine characters are lost when using the
<param>tag.

I tried it with replacing all /n with
which worked fine inside
JBuilder but not for IE (6.0) and Netscape (7.1).

Does anybody have any ideas?

Thanks alot for every hint,

Peter

You could make the parameter value the name of a file on disk
and manipulate the file. I don't understand why you would want
to put the edited contents as the parameter value.
 
A

Andrew Thompson

You could make the parameter value the name of a file on disk
and manipulate the file.

Good point. Alternately, the name might be a directory where
the user stores a number of documents, and the user gets presented
with a file chooser pointing to the directory to select and open files.

Note also that you should not rely on Applet.destroy()* for your applet,
as this method is not reliably called.

* For saving edited documents, for instance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,088
Latest member
JeremyMedl

Latest Threads

Top