vbCrlf

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: vbCrlf

  1. #1
    RA Guest

    Default vbCrlf

    I have come across code like -<BR><BR>Response.Write "&#060;SCRIPT LANGUAGE=""JavaScript""&#062;" & vbCrlf<BR><BR>When I try to use it in my ASP code, I get error. What is<BR>"vbCrlf"( I do understand it is related with VBScript !!) equivalent in ASP/JScript combination ?<BR><BR>I do know it is used for "Carrige Return + Line Feed", but how<BR>do I get this effect in ASP/JScript Combination ( say for e.g. for code line given above)?<BR><BR>Any help/insight is really appreciated !!<BR><BR>:-)<BR><BR>RA<BR><BR><BR>

  2. #2
    Solution Guest

    Default RE: vbCrlf

    What error do you get ?<BR>The code you wrote will make sure that the next output you do goes on the next line as read by the printer and the HTML page editor

  3. #3
    RA Guest

    Default RE: vbCrlf

    I am getting this error -<BR><BR>Microsoft JScript runtime error &#039 800a1391&#039 <BR><BR>&#039vbCrlf&#039 is undefined <BR><BR>/asp/try/repform.asp, line 22 <BR>

  4. #4
    RA Guest

    Default RE: vbCrlf

    Sorry forgot to give line where this error occurs -<BR><BR>var tmp = "one string ";<BR> <BR>Response.Write (vbCrlf & tmp )<BR><BR>Error comes at second line.<BR><BR>Thanx<BR><BR>RA<BR>


  5. #5
    Solution Guest

    Default RE: vbCrlf

    Gotcha!!<BR>vbCrLF is a vbScript/VB constant.<BR>To use it with javaScript..I am not sure but if you declare this constant <BR>vbCrlf = Chr(10) + Chr(13), you should be fine<BR>(I am not sure that JavaScript supports this CHr Function)<BR>Also, try including the adovbs.inc file within your code.<BR>This has a list of all the constants.<BR>If this does not work, maybe create a variable in VbScript and then store chr(10) + chr(13) there and then use it it Javascript.<BR><BR>good luck

  6. #6
    RA Guest

    Default RE: vbCrlf

    Thanks for replying. I had already tried<BR>1. chr(13) + chr(10), <BR>2. including adovbs.inc<BR><BR>but.....:-(<BR><BR>But I have not tried doing "create a variable in VbScript and then store chr(10) + chr(13) there and then use it it Javascript.", how does one do it ? <BR><BR>Thanx again

  7. #7
    Desire Guest

    Default JScript uses for new line character

    Example:<BR>&#060;script language="JScript" RUNAT="server"&#062;<BR>response.write("Yahoo".lin k("http://www.yahoo.com"));<BR>response.write("&#060;P&#062; ");<BR>Response.write("
    ")<BR>response.write("I am the color red".fontcolor("red"));<BR>&#060;/script&#062;<BR>Hope this helps... Cheers!<BR>

  8. #8
    RA Guest

    Default RE: JScript uses for new line character

    Thanks for Replying.<BR><BR>But guess what.. "
    " does not bring "I am color red" to next lione. As far as I see, I am able to get text "I am red..." in new line with "&#060;P&#062;", "
    " does not make any difference. <BR><BR>"&#060;P&#062;" does give me a newline "
    " does not.<BR><BR>Is there something I am missing or interpreting wrong ??<BR><BR>:-)<BR><BR>RA<BR><BR><BR>

  9. #9
    RA Guest

    Default works at client but with ASP it doesn't why ?

    Finally I tried "
    " at client side as -<BR><BR> document.write("this shows how the
    new line char works.
    ")<BR><BR>it works and so do all special characters like ( ,
    etc.)<BR>but when I try at server side in ASP code as -<BR><BR> response.write("this shows how the
    new line char wrks.
    ");<BR><BR>It does not work !!<BR><BR>What is the trick with ASP code ?<BR><BR>Thanks for help<BR><BR>RA<BR>

  10. #10
    John Weeflaar Guest

    Default RE: works at client but with ASP it doesn't why ?

    I tried this, and it works:<BR><BR>NL = "&#060;" & "BR" & "&#062;"<BR><BR>response.write("This shows how the new line char works." & NL)<BR><BR>John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •