newbie needs help with form formatting during admi

Results 1 to 2 of 2

Thread: newbie needs help with form formatting during admi

  1. #1
    Join Date
    Dec 1969

    Default newbie needs help with form formatting during admi

    i have an admin section which allows my friends to update the news section of my site thru a textarea field. of course they would definitely have to write a URL in some time or another. <BR>the question is how do i make it so that they do not have to include the &#060;a href&#062;...&#060;/a&#062; when typing the URL but when it is displayed from the database onto the site, it actually displays hyperlinked.<BR>we see this function in most free email account or good forums...<BR>thanks

  2. #2
    Join Date
    Dec 1969

    Default umm, i think that...

    internet explorer automatically links addresses. Anyways, what you need to do is go through the text and find any links. If you find one, then you want to put the &#060;a&#062; tags on it. FAQ#99 should help you doing this. It is a bit complicated since it uses regular expressions. Your other alternative is to split all your text into an array, then loop through the array looking for links (I guess strings that start with http://), and when you find them, change it to a string with the &#060;a&#062; tags on it.<BR><BR>arrText(i) = "&#060;a href=""" & arrText(i) & """&#062;" & arrText & "&#060;/a&#062;"<BR><BR>thats how you would add the A-tag to your string in array.

Posting Permissions

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