Alpha Video Training
Results 1 to 10 of 10

Thread: xbasic question crlf() in webpage

  1. #1
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default xbasic question crlf() in webpage

    I can't seem to find this

    With this code on an a5w page:


    <%a5
    ? "a" + crlf()
    ? "b" + crlf()
    ? "c" + crlf()
    %>

    I get a output "abc" on my webpage where I' expect

    a
    b
    c


    So where's the breaks ???

    Must be something trivial I miss
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  2. #2
    "Certified" Alphaholic glenschild's Avatar
    Real Name
    Glen Schild
    Join Date
    Apr 2000
    Location
    Frome, Somerset, UK
    Posts
    1,525

    Default Re: xbasic question crlf() in webpage

    Hi Frank

    Even though it is wrapped inside an xbasic codeblock you still need to use html. Replace the + crlf() with <br>
    Glen Schild



    My Blog


  3. #3
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: xbasic question crlf() in webpage

    Glen,

    If I put the html break within the xbasic that does not work and I would not expect it to work either. Did you mean this:


    <%a5
    ? "a" + <br>
    ? "b" + <br>
    ? "c" + <br>
    %>

    or did you mean this (already figured that out but I thought xbasic should be able to translate a crlf() into an html break)

    <%a5 ? "a" %>
    <br>
    <%a5 ? "b" %>
    <br>
    <%a5 ? "c" %>
    <br>

    Thx
    Last edited by Clipper87; 08-14-2012 at 08:20 AM.
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  4. #4
    "Certified" Alphaholic glenschild's Avatar
    Real Name
    Glen Schild
    Join Date
    Apr 2000
    Location
    Frome, Somerset, UK
    Posts
    1,525

    Default Re: xbasic question crlf() in webpage

    Sorry second one! Glad you worked it out.
    Glen Schild



    My Blog


  5. #5
    Member StephenP's Avatar
    Real Name
    Stephen Pilon
    Join Date
    Apr 2000
    Location
    Front Royal, Virginia
    Posts
    491

    Default

    Or like this:

    <%a5
    ? "a <br />"
    ? "b <br />"
    %>
    Stephen Pilon
    Associate Librarian
    Christendom College

  6. #6
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,396

    Default Re: xbasic question crlf() in webpage

    I'm trying to wrap my head around the list type option, but this seems to work.

    <%a5
    mylist = <<%g
    a<br>
    b<br>
    c<br>
    %g
    ? mylist

    %>

  7. #7
    "Certified" Alphaholic
    Real Name
    Andy Gill
    Join Date
    Jul 2011
    Location
    Barbados
    Posts
    1,029

    Default Re: xbasic question crlf() in webpage

    %g%, not %g

  8. #8
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: xbasic question crlf() in webpage

    Stephen,

    That works great; any reference to that somewhere in the doc's ?
    Thx
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  9. #9
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,396

    Default Re: xbasic question crlf() in webpage

    It figures. It picks something like this to work when I do it wrong.

    I posted it like that because it seemed to work as expected.


    Code:
    <%a5
    <%a5
    mylist = <<%g
    a<br>
    b<br>
    c<br>
    %g
    
    ? "Wrong way <br />"
    ? mylist
    
    my2list = <<%F%
    z<br />
    y<br />
    x<br />
    %F%
    ? "Right way <br />"
    ? my2list
    ? "end of code"
    %>%>
    produces
    Attachment 32984

  10. #10
    "Certified" Alphaholic kkfin's Avatar
    Real Name
    Kenneth
    Join Date
    Dec 2006
    Location
    EU
    Posts
    1,570

    Default Re: xbasic question crlf() in webpage

    Code:
    dim test as c = "a"+ crlf() + "b" + crlf() + "c" + crlf()
    ? a5_html_label(test)
    = "a<br />b<br />c<br />&nbsp;"

Similar Threads

  1. Xbasic Question
    By mastermind315 in forum Alpha Five Version 9 - Desktop Applications
    Replies: 12
    Last Post: 04-26-2008, 10:40 AM
  2. XBASIC QUESTION
    By ken tjia in forum Alpha Five Version 4
    Replies: 3
    Last Post: 03-03-2003, 12:49 AM
  3. CRLF String
    By Mario Prieto in forum Alpha Five Version 5
    Replies: 4
    Last Post: 01-20-2003, 11:12 AM
  4. XBasic Question
    By davej in forum Alpha Five Version 5
    Replies: 3
    Last Post: 08-29-2002, 06:57 AM
  5. Question on XBasic
    By crimmelcp in forum Alpha Five Version 4
    Replies: 6
    Last Post: 12-28-2001, 02:54 AM

Bookmarks

Posting Permissions

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