473,503 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8655
"\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
5943
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
5848
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
2798
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
1637
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
1845
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
3277
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
1460
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
5073
by: dancer | last post by:
What is this? vbCrLf
1
3428
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
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.