473,320 Members | 2,003 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.

VbCrLf in jscript

Hi!

Im still working on some <%@ LANGUAGE=JScript %> code ;)

What is the same command as VbCrLf in JScript?
I just want my HTML to jump one line down...
hehe

I know I should know... ;)
Jul 19 '05 #1
7 8642
"\n"

--
Roji. P. Thomas
SQL Server Programmer
"Christopher Brandsdal" <br*******@binaer.no> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi!

Im still working on some <%@ LANGUAGE=JScript %> code ;)

What is the same command as VbCrLf in JScript?
I just want my HTML to jump one line down...
hehe

I know I should know... ;)

Jul 19 '05 #2
thanks ;)

"Roji. P. Thomas" <la********@nowhere.com> skrev i melding
news:##**************@TK2MSFTNGP09.phx.gbl...
"\n"

--
Roji. P. Thomas
SQL Server Programmer
"Christopher Brandsdal" <br*******@binaer.no> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi!

Im still working on some <%@ LANGUAGE=JScript %> code ;)

What is the same command as VbCrLf in JScript?
I just want my HTML to jump one line down...
hehe

I know I should know... ;)


Jul 19 '05 #3
"Christopher Brandsdal" <br*******@binaer.no> wrote:
Hi!

Im still working on some <%@ LANGUAGE=JScript %> code ;)

What is the same command as VbCrLf in JScript?
I just want my HTML to jump one line down...
hehe


There's no macro in JScript like VbCrLf. You can use \n for a newline,
but remember that neither VbCrLf nor \n will cause a linebreak that's
visible in your browser. For that, you need to send the HTML tag <BR>.
Or possibly <P> or <DIV>. Browsers ignore things like extra spaces and
newlines in the HTML they are rendering.

--
Tim Slattery
MS MVP(DTS)
Sl********@bls.gov
Jul 19 '05 #4
Tim Slattery wrote on 03 jun 2004 in
microsoft.public.inetserver.asp.general:
"Christopher Brandsdal" <br*******@binaer.no> wrote:
Hi!

Im still working on some <%@ LANGUAGE=JScript %> code ;)

What is the same command as VbCrLf in JScript?
I just want my HTML to jump one line down...
hehe


There's no macro in JScript like VbCrLf. You can use \n for a newline,
but remember that neither VbCrLf nor \n will cause a linebreak that's
visible in your browser. For that, you need to send the HTML tag <BR>.
Or possibly <P> or <DIV>. Browsers ignore things like extra spaces and
newlines in the HTML they are rendering.


However ASP (VBS and JS) can produce far more than HTML content, where
this can be usefull.

vbs [IE]:

myCrLf = chr(10) & chr(13)
alert("a" & myCrLf & "b")

js:

myCrLf = String.fromCharCode(10, 13);
alert('a' + myCrLf + 'b')
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5
Isn't a true carriage return + line feed represented as \r\n ?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Roji. P. Thomas" <la********@nowhere.com> wrote in message
news:##**************@TK2MSFTNGP09.phx.gbl...
"\n"

--
Roji. P. Thomas
SQL Server Programmer
"Christopher Brandsdal" <br*******@binaer.no> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi!

Im still working on some <%@ LANGUAGE=JScript %> code ;)

What is the same command as VbCrLf in JScript?
I just want my HTML to jump one line down...
hehe

I know I should know... ;)


Jul 19 '05 #6
Aaron [SQL Server MVP] wrote on 03 jun 2004 in
microsoft.public.inetserver.asp.general:
Isn't a true carriage return + line feed represented as \r\n ?


Under jscript/ASP yes:

<%@Language=Jscript%>
<%

myCrLf = "\r\n"
Response.write(myCrLf.length) // 2

Response.write("<br>")

myLf = "\n"
Response.write(myLf.length) // 1

%>

======================

It could depend on the platform/OS used.
Perhaps some applications could use \n as crlf?

That's why I would play for sure, when I don't know the OS:

String.fromCharCode(10, 13)
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #7

"Tim Slattery" <Sl********@bls.gov> skrev i melding
news:0l********************************@4ax.com...
"Christopher Brandsdal" <br*******@binaer.no> wrote:
Hi!

Im still working on some <%@ LANGUAGE=JScript %> code ;)

What is the same command as VbCrLf in JScript?
I just want my HTML to jump one line down...
hehe
There's no macro in JScript like VbCrLf. You can use \n for a newline,
but remember that neither VbCrLf nor \n will cause a linebreak that's
visible in your browser. For that, you need to send the HTML tag <BR>.
Or possibly <P> or <DIV>. Browsers ignore things like extra spaces and
newlines in the HTML they are rendering.

I know the browser doesn't read the extra space, but that's not what I
needed anyway ;)

Just had to make a line-jump to make my HTML design work perfectly....

--
Tim Slattery
MS MVP(DTS)
Sl********@bls.gov

Jul 19 '05 #8

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

Similar topics

20
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client...
4
by: Harag | last post by:
Hi All I currently thinking of converting from my little knowledge of VBscript to jScript ASP. With this in mind I'm looking at my current code to see how it will convert over to Jscript. ...
14
by: John Bentley | last post by:
Note this is crossposted to comp.lang.javacript and microsoft.public.dotnet.scripting. After some Googling and FAQing my understanding of these terms is, crudely: Javascript (3 different...
0
by: Joe | last post by:
Hi, I have a simple form that does nothing but emails the whatever user entered in the form fields. The form is working fine and email sent. The problem I am having is in te string that forms...
6
by: RFS666 | last post by:
Hello, After I posted yesterday "using C# class in jscript", I have a new problem: I have a C# class - DBResult - that contains (and other variables) a string array (and other variables), that...
7
by: RFS666 | last post by:
Hello, I would like to use variables with a type in jscript.NET. I declare them as follows: var x : double = 5.03; This doesn't work in my script, that I write to the page in codebehind with...
5
by: Maxwell2006 | last post by:
Hi, I have a requirement to develop an application component using only Server-Side Jscript (not Jscript.NET). What is Server-Side Jscript?
14
by: dancer | last post by:
What is this? vbCrLf
1
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
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....

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.