Previous Thread
Next Thread
Print Thread
Hop To
#244508 07/23/2011 3:40 PM
Joined: Dec 2006
Posts: 184
member
member
Joined: Dec 2006
Posts: 184
I'm trying to put the following code into a post to djow a video hosted on my own server

Code
<script type='text/javascript' src='/jwplayer/jwplayer.js'></script>
 
<div id='mediaspace'>This text will be replaced</div>
 
<script type='text/javascript'>
  jwplayer('mediaspace').setup({
    'flashplayer': '/jwplayer/player.swf',
    'file': '/cgtv/Ironclad.flv',
    'image': '/cgtv/ironclad.jpg',
    'backcolor': '000000',
    'frontcolor': 'FFFFFF',
    'stretching': 'exactfit',
    'controlbar': 'bottom',
    'width': '518',
    'height': '384'
  });
</script>

Now, it works in a test page uploaded to the server ( here) but not in a post ( here).

I have the markup set to allow HTML in the post.

Is there anything I can do to make this work?

I'd like to be able to insert the code in the posts for videos on my own hosted server.

I use the normal tags for videos elsewhere.

Stephen G #244509 07/23/2011 3:47 PM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
ensure you are inserting as HTML only not HTML + bbcode for that post

otherwise the newline characters will be converted to the <br /> character and essentially break your javascript

if you use Firebug and view source, that is what is happening

2c

Stephen G #244510 07/23/2011 4:21 PM
Joined: Dec 2006
Posts: 184
member
member
Joined: Dec 2006
Posts: 184
Great stuff, thanks SD

It doesn't work when I try to Preview it but it works once posted. smile

Stephen G #244512 07/23/2011 4:26 PM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
yeppers.. that is a semi-buglet in the preview markup

i need to semi-fix that in 7.6 laugh

Stephen G #244513 07/23/2011 4:28 PM
Joined: Dec 2006
Posts: 184
member
member
Joined: Dec 2006
Posts: 184
laugh


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
1 members (Nightcrawler), 963 guests, and 210 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)