[Javascript] XMP tag related problem (sunita desai)

Senior, Henry (TWIi London) HSenior at twii.net
Thu Aug 8 03:31:34 CDT 2002


Sunita, 

You could try not closing the <XMP> tag until the end of the document(if it
does end!)

or

You could also try the following style declaration:
<style>
xmp {display:inline}
</style>
using this method you will have to use a <br> to cause a line break.
This doesn't work in Netscape 4

or 

if you're going for the pure text approach you could send a header of
Content-type: text/plain but this will mean you have no formatting control.

cant you replace the tabs and carriage return characters with html
formatting in the JSP?


-----Original Message-----
From: javascript-request at LaTech.edu
[mailto:javascript-request at LaTech.edu]
Sent: 07 August 2002 18:01
To: javascript at LaTech.edu
Subject: Javascript digest, Vol 1 #719 - 5 msgs


Send Javascript mailing list submissions to
	javascript at LaTech.edu

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.LaTech.edu/mailman/listinfo/javascript
or, via email, send a message with subject or body 'help' to
	javascript-request at LaTech.edu

You can reach the person managing the list at
	javascript-admin at LaTech.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Javascript digest..."


Today's Topics:

   1. submit a form .... final conclusion - why it didn't work
(maciej.kaniewski at lido.net)
   2. XMP tag related problem (sunita desai)
   3. Scrolling text (Iztok Polanic)
   4. =?iso-8859-1?Q?Mouse:_Different_Menus_on_Right_Click?=
(=?iso-8859-1?Q?pcarubbi at libero.it?=)
   5. Solution....RE: [javascript] Digest Number 773
(denzil.pereira at iflexsolutions.com)

--__--__--

Message: 1
To: javascript at LaTech.edu
From: maciej.kaniewski at lido.net
Date: Wed, 7 Aug 2002 10:29:21 +0800
Subject: [Javascript] submit a form .... final conclusion - why it didn't
work
Reply-To: javascript at LaTech.edu

Hi all,

As you may be interested, I'd like to tell you, why I couldn't submit form
from another frame and what is the solution:

I TRIED TO SUBMIT A FORM FROM ANOTHER FRAME. BUT MY FORM (WHICH I TRIED TO
SUBMIT) CONTAINED SUBMIT BUTTON(s). AND THAT WAS THE REASON. ONCE I REMOVED
SUBMIT BUTTONS (I CONVERTED THEM TO THE NORMAL BUTTONS AND I HANDLE AN
EVENT ONCLICK, WHERE I CALL SUBMIT FUNCTION EXPLICETELY) THE SUBMITTING
FROM ANOTHER FRAME WORKS FINE!!!!!!!!!!!!!!!!!!


thanks for help, and hope it'll help someone else too

Maciek


--__--__--

Message: 2
From: "sunita desai" <sudesai at cisco.com>
To: <javascript at LaTech.edu>
Date: Wed, 7 Aug 2002 10:44:15 +0530
Subject: [Javascript] XMP tag related problem
Reply-To: javascript at LaTech.edu

Hi,

Actually I have this particular problem with the Web based Application that
is being developed.
Your answers, and any pointers will be very helpful.

In one particular JSP, a socket connection is being established at the
backend, and data is continously
pushed from there, and the need is to read the Strings line by line and
display/dump on the
browser screen. If the String is enclosed between XMP tag

<XMP>%=data%</XMP> where data has the one text line content read from the
Socket output stream.

the formatings information coming from the backend (the white space, tabs
etc) are retained and display
is proper, but the problem is an extra line is inserted by the <XMP> tag
which is not required by the customer.

But if we don't use the <XMP> tag and just use %=data% the formatting info
is lost, because the HTML
does not interpret the tabs, spaces etc, and even if some HTML specific tags
are part of the text coming
from backend, it will not be displayed as it is. Even I have tried using
<div> and <PRE> tags, but the formatting info is lost.

So the question is there any other way to dump pure text on browser without
loosing the formatting information?

DOes using an applet for real time display purposes would be a better way?

Thanks in advance,
Regards,
Sunita

The code snippet without XMP tag:

String data="";
while ((str = rd.readLine()) != null) {
                    data = data + str + "<BR>";
                    //increment the total lines counter by one
                    count = count + 1;
	                 <%=data%>

                        //flush the out buffer
                        out.flush()
                        // re-initialise the data string
                        data="";



Display without <XMP> tag:

----------------------
MGCP MESSAGES DISPLAY
----------------------

Time stamp Orig IP address Dest IP address Prot Msg Data
----------------------------------------------------------------------------
---------------------------
First packet received - 08/06/2002

20:37:51.607341 10.10.99.106:2427 10.10.99.41:2427 MGCP...... -> 200 4100052
OK

v=0
c=IN IP4 10.10.99.106
m=audio 49288 RTP/AVP 0
20:37:53.384690 10.10.99.41:2427 10.10.99.106:2427 MGCP...... -> CRCX
4100054 vism/t1-6/21 at mgxc101-13 MGCP 0.1
C: A6DF1
L: e:off
M: inactive
R:
X: D67D
S:




The code snippet with XMP tag:

String data="";
while ((str = rd.readLine()) != null) {
                    data = data + str;
                    //increment the total lines counter by one
                    count = count + 1;
	                 <XMP><%=data%></XMP>

                        //flush the out buffer
                        out.flush()
                        // re-initialise the data string
                        data="";



Display with XMP tag:

----------------------

 MGCP MESSAGES DISPLAY

 ----------------------


Time stamp       Orig IP address      Dest IP address      Prot          Msg
Data

----------------------------------------------------------------------------
---------------------------

First packet received - 08/06/2002



20:44:03.193352  10.10.99.41:2427     10.10.99.106:2427    MGCP...... ->
CRCX 4100098 vism/t1-6/16 at mgxc101-13 MGCP 0.1

                                                                         C:
A6DF9

                                                                         L:
e:off

                                                                         M:
inactive

                                                                         R:

                                                                         X:
D68D

                                                                         S:

View source gives this:
         <XMP> ---------------------- </XMP>


         <XMP> MGCP MESSAGES DISPLAY  </XMP>


         <XMP> ---------------------- </XMP>


         <XMP> </XMP>


         <XMP>Time stamp       Orig IP address      Dest IP address
Prot          Msg  Data </XMP>



<XMP>-----------------------------------------------------------------------
-------------------------------- </XMP>


         <XMP>First packet received - 08/06/2002</XMP>


         <XMP></XMP>


         <XMP>20:50:39.575409  10.10.99.41:2427     10.10.99.190:2427
MGCP...... -> CRCX 4100079 vism/t1-8/8 at mgxc201-10 MGCP 0.1</XMP>


         <XMP>
C: A6DF5</XMP>


--__--__--

Message: 3
From: "Iztok Polanic" <iztokp at amis.net>
To: <javascript at LaTech.edu>
Date: Wed, 7 Aug 2002 09:47:04 +0200
Subject: [Javascript] Scrolling text
Reply-To: javascript at LaTech.edu

 Hi!
 
 I've written a code which scrolls text vertically. But now when a user
 triggers OnmouseOut event the scroller should stop where it is. How to do
 this?  Here is the code for scrolling:
 
 function moveUp()
 {
  if (tblSize >= size) {
   if (tblSize_2 >= counter1) {
    counter1 += 10;
    document.getElementById('scrollIt').style.top = -counter1;
 
   setTimeout("moveUp()",200);
   }
 
  }
 }
 
 
 
 Bye,
 
 Iztok



--__--__--

Message: 4
Date: Wed,  7 Aug 2002 12:19:03 +0200
From: "=?iso-8859-1?Q?pcarubbi at libero.it?=" <pcarubbi at libero.it>
To: javascript at LaTech.edu
Subject: [Javascript] =?iso-8859-1?Q?Mouse:_Different_Menus_on_Right_Click?=
Reply-To: javascript at LaTech.edu

SGFsbG8sDQoNCkkgaGF2ZSBhIHNjcmlwdCB0aGF0IGxldCBtZSBtYW5hZ2UgcGljdHVyZXMg
b24gdGhlIHBhZ2Ugc28gdGhhdCANCm9uTW91c2VPdmVyIGluIGFub3RoZXIgcGxhY2Ugb2Yg
dGhlIHBhZ2UgYSB0ZXh0LWRlc2NyaXB0aW9uIG9mIHRoZSANCnBpY3R1cmUgaXMgdmlzdWFs
aXplZC4NCg0KSSB3b3VsZCBsaWtlIGFsc28gdGhhdCB3aGVuIHJpZ2h0LWNsaWNrIG9uIHRo
ZSBwYXJ0aWN1bGFyIHBpY3R1cmUgYSANCnNwZWNpZmljIG1lbnUgcmVsYXRlZCB0byB0aGUg
cGljdHVyZSBpcyBkaXNwbGFpZWQuDQoNCklzIHRoaXMgcG9zc2libGU/IEkgZG8gbm90IG1l
YW4gYSBuZXcgbWVudSBvbiByaWdodCBjbGljayB0aGF0IA0KcmVwbGFjZXMgdGhlIG9uZSBv
ZiBXaW5kb3cgaW4gdGhlICp3aG9sZSogcGFnZSwgYXMgZS5nLiB0aGUgb25lIGF0IA0KaHR0
cDovL3d3dy5keW5hbWljZHJpdmUuY29tL2R5bmFtaWNpbmRleDEvY29udGV4dG1lbnUuaHRt
ICwgYnV0IHJhdGhlciANCiptb3JlKiBkaWZmZXJlbnQgbWVudXMgd2hlbiByaWdodC1jbGlj
ayBvbiAqZGlmZmVyZW50KiBwaWN0dXJlcyBpbiB0aGUgDQpwYWdlLg0KDQpDYW4geW91IHBs
ZWFzZSBoZWxwIG1lPw0KDQpUaGFuayB5b3UsDQpCeWUsDQpQaWV0cm8=



--__--__--

Message: 5
From: denzil.pereira at iflexsolutions.com
To: Javascript at LaTech.edu
Cc: iztokp at amis.net
Subject: Solution....RE: [javascript] Digest Number 773
Date: Wed, 7 Aug 2002 16:27:33 +0530 
Reply-To: javascript at LaTech.edu

Hi  Iztok,

Well you could call the clearTimeout Method (what this method will do is
that it will cancel the time-out that was set with the setTimeout method
earlier) when the user triggers the OnmouseOut event.

intID = setTimeout("moveUp()",200);

Syntax will be window.clearTimeout(intID)
where intID=Integer that specifies the time-out setting returned by a
previous call to the setTimeout method.

Hope this helps !!! 

Best regards,
Denzil


-----Original Message-----
From: javascript at yahoogroups.com 
Subject: [javascript] Digest Number 773

      3. Scrolling text
           From: "Iztok Polanic" <iztokp at amis.net>
________________________________________________________________________
________________________________________________________________________

Message: 3
   Date: Wed, 7 Aug 2002 09:47:04 +0200
   From: "Iztok Polanic" <iztokp at amis.net>
Subject: Scrolling text

 Hi!
 
 I've written a code which scrolls text vertically. But now when a user
 triggers OnmouseOut event the scroller should stop where it is. How to do
 this?  Here is the code for scrolling:
 
 function moveUp()
 {
  if (tblSize >= size) {
   if (tblSize_2 >= counter1) {
    counter1 += 10;
    document.getElementById('scrollIt').style.top = -counter1;
 
   setTimeout("moveUp()",200);
   }
 
  }
 }
 
 Bye,
 Iztok
----------------------------------------------------------------------------

This message contains privileged and confidential information and is
intended only for the individual named. If you are not the intended
recepient you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if you
have received this e-mail by mistake and immediately delete this e-mail from
your system.


E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.


--------------------------------------------------------------------------


--__--__--

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


End of Javascript Digest


DISCLAIMER - The preceding e-mail message (including any attachments)
contains information that may be confidential, may be protected by the
attorney-client or other applicable privileges, or may constitute non-public
information.  It is intended to be conveyed only to the designated
recipient(s) named above.  If you are not an intended recipient of this
message, or have otherwise received it in error, please notify the sender by
replying to this message and then delete all copies of it from your computer
system.  Any use, dissemination, distribution, or reproduction of this
message by unintended recipients is not authorized and may be unlawful. The
contents of this communication do not necessarily represent the views of
this company.



More information about the Javascript mailing list