Results 1 to 2 of 2

Thread: 2 small questions

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    23

    Post

    Hi, please try and help with either or both of these questions, they are really beginning to bug me now

    Question 1:
    I have a perl script that writes the contents of a <textarea> to an HTML page....
    Problem is that I need it to include line breaks..

    e.g. <textarea>
    line1
    line2
    line3
    </textarea>

    should be printed as:
    line1
    line2
    line3

    but currently looks like: line1 line2 line3......
    Does anyone know how i can change the <textarea> carriage returns to '<br>'s?
    preferably using the syntax:
    $text =~ s/ (something here) /<br>/g;


    Question 2:
    I have a table:
    <table BORDER=0 CELLSPACING=5 CELLPADDING=3>
    <tr BGCOLOR="#5954C5"><td width="750"></td></tr>
    </table>

    Now i need the table to wrap any text that would make it wider then the specified 750 pixils. Anyone have any idea how this could be done?

    Thanks
    Sythe

  2. #2
    Guest
    for Q. #2

    if you set the table to the specified width, then the TD will automatically wrap the text if it is that wide. if you make the table shorter than the text it will shorten the text in the table data.

    As far as Q #1 you have to wait till I get home. I think I have what your talking about.

    does the perl script taking the text form a text file or is it in the script? if it is in the script you can just put <br> in it.

    Scoutt

Posting Permissions

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



Click Here to Expand Forum to Full Width