[Javascript] coding for the <enter> key

Chris Tifer christ at saeweb.com
Wed Mar 12 15:04:34 CST 2003


What's the extension on the page? That's going to determine what language 
is used on the server-side.  ASP's replace statement would be something like:

REPLACE(Variable, vbCRLF, "<br />")

So say if I was retrieving something from the database (text in your example) 
and I wanted to write it out with line-breaks, I would first have to have it defined 
as a variable.

DIM strText
strText = "Some text that might have a line break"

strText = REPLACE(strText, vbCRLF, "<br />")

Response.Write strText

I would assume though that your program would have something built in 
allowing you to insert line breaks.

Chris Tifer
http://www.emailajoke.com


  ----- Original Message ----- 
  From: bill.marriott at agric.nsw.gov.au 
  To: javascript at LaTech.edu 
  Sent: Wednesday, March 12, 2003 3:51 PM
  Subject: Re: [Javascript] coding for the <enter> key



  Hi Chris, 

  I'm using an Informix product called App Page Builder 
  and I guess this is not strictly a javascript question. 

  I would be interested to see a example of the full ASP replace statement because it may work with Informix as well. 

  It seems strange to me that the form element can read the format but the page can't. 



  Bill Marriott
  Analyst/Programmer
  Information Technology
  NSW Agriculture
  Orange

  Ph.  02 6391 3657
  Fax. 02 6391 3290



       "Chris Tifer" <christ at saeweb.com> 
        Sent by: javascript-admin at LaTech.edu 
        13/03/2003 07:35 AM 
        Please respond to javascript 

               
                To:        <javascript at LaTech.edu> 
                cc:         
                Subject:        Re: [Javascript] coding for the <enter> key 



  What do you mean by "written directly from the server"? What language 
  are you using? With ASP you could use REPLACE on vbCRLF...  Or is 
  this stricly through JavaScript where a form is submitted and you are parsing 
  the QueryString using JavaScript? 
    
  Chris Tifer 
  http://www.emailajoke.com 
    
  ----- Original Message ----- 
  From: bill.marriott at agric.nsw.gov.au 
  To: javascript at LaTech.edu 
  Sent: Wednesday, March 12, 2003 3:20 PM 
  Subject: [Javascript] coding for the <enter> key 


  Hi Everyone, 

  Does anyone know how to get HTML to format an embedded carriage return. 

  eg. 1. something 
        2. something else 
        3. something different 

  ends up as 

        1. something 
        2. something else 
        3. something different 

  if it is loaded from server data  into a text area form element , but if it is just written to the page directly from the server it ends up as 

        1. something 2. something else  3. something different 

  which is not as pretty 

  thanks 

  Bill Marriott
  Analyst/Programmer
  Information Technology
  NSW Agriculture
  Orange

  Ph.  02 6391 3657
  Fax. 02 6391 3290


  This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient or received it in error, please delete the message and notify sender. Views expressed are those of the individual sender and are not necessarily the views of their organisation. 



  This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient or received it in error, please delete the message and notify sender. Views expressed are those of the individual sender and are not necessarily the views of their organisation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20030312/aceb7312/attachment.htm>


More information about the Javascript mailing list