Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 889 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

html tags don't format in Javascript

Thread title: html tags don't format in Javascript
Closed Thread  
Page 1 of 2 1 2 >
    Thread tools Search this thread Display Modes  
05-28-2008, 05:36 AM
#1
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old  html tags don't format in Javascript

I've got a script I use and the HTML tags being pulled from the source don't display on the javascript page. I get things like <br /> without it adding the break. Any idea how to fix this?

05-28-2008, 06:47 AM
#2
sujaykar is offline sujaykar
Status: I'm new around here
Join date: May 2008
Location:
Expertise:
Software:
 
Posts: 11
iTrader: 0 / 0%
 

sujaykar is on a distinguished road

  Old

Hi,
You can send me the code once to check if possible.

05-28-2008, 03:38 PM
#3
BlaineSch is offline BlaineSch
BlaineSch's Avatar
Status: Member
Join date: Mar 2005
Location: Trapped in my own little world
Expertise: Web Applications
Software: Notepad++
 
Posts: 385
iTrader: 0 / 0%
 

BlaineSch is on a distinguished road

Send a message via AIM to BlaineSch Send a message via MSN to BlaineSch Send a message via Yahoo to BlaineSch Send a message via Skype™ to BlaineSch

  Old

Yes, we would need to see the source for any of us to help you fix your code.

05-28-2008, 04:55 PM
#4
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old

Here's everything to do with the script.

http://forums.brius.com/index.php?Feed=LatestPosts

http://jakowenko.com/default.php

I already edited a line in the script to allow common html tags from not being stripped. But when outputted, they don't format.

05-28-2008, 04:57 PM
#5
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old

I uploaded the script here as an attachment, apparently it won't work with a direct link.

Attached Files
File Type: zip default.php.zip (3.6 KB, 4 views)

06-03-2008, 08:11 PM
#6
G-Sun is offline G-Sun
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
 
Posts: 101
iTrader: 0 / 0%
 

G-Sun is on a distinguished road

  Old

Well for a start, it seems you misspelled the break-line. It's <br /> not <br> ..

06-05-2008, 09:05 PM
#7
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old

I'm not the one who scripted it, and <br> also will do a line break.

06-06-2008, 01:57 PM
#8
G-Sun is offline G-Sun
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
 
Posts: 101
iTrader: 0 / 0%
 

G-Sun is on a distinguished road

  Old

Originally Posted by Jako View Post
I'm not the one who scripted it, and <br> also will do a line break.
Maybe. What's your Doctype-setting?

06-06-2008, 02:40 PM
#9
Liam is offline Liam
Liam's Avatar
Status: Member
Join date: Dec 2007
Location: Liverpool, UK
Expertise:
Software:
 
Posts: 287
iTrader: 0 / 0%
 

Liam is on a distinguished road

Send a message via MSN to Liam

  Old

this isn't javascript it's php.

my php is not great, so I mgiht not have this right. Try taking out the tags you put in the strip_tags if you want them to display.

06-07-2008, 08:39 AM
#10
G-Sun is offline G-Sun
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
 
Posts: 101
iTrader: 0 / 0%
 

G-Sun is on a distinguished road

  Old

Ok, I put some linebreaks in your code for making it easier to read:
Code:
document.write('<a href="http://forums.brius.com/comments.php?DiscussionID=5" 
class="links2">Where will my testimonials go?</a>
<small> by Dave on May 21, 2008</small>
<br>Your testimonials will be displayed on our main website located here, http://brius.com/hosting/testimonials.php&lt;br /&gt;&lt;br /&gt;
Voice your opinion and let others know what you like and dislike. Please include your domain hosted (free ...<br><br>
<a href="http://forums.brius.com/comments.php?DiscussionID=4" class="links2">Pre-Sales Inquiries</a>
<small> by Dave on May 21, 2008</small>
<br>If you would rather contact us directly via email about a pre-sales question, http://secure.brius.com/submitticket.php?step=2&amp;amp;deptid=003
<br><br><a href="http://forums.brius.com/comments.php?DiscussionID=3" class="links2">Welcome to the Brius Community!</a>
<small> by Bryan Le on May 20, 2008</small>
<br>Howdy everyone!&lt;br /&gt;&lt;br /&gt;Welcome to the brand new Brius community boards where everyone talks.&lt;br /&gt;&lt;br /&gt;I\'ll edit and update this later.<br><br>');

Closed Thread  
Page 1 of 2 1 2 >


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed