so I am trying to use document.write to write anohter script to the document. Here is my code for the function:
function onSaveOk(streamName,streamDuration,userId,cameraName,micName,recorderId){
//alert("onSaveOk("+streamName+","+streamDuration+","+userId+","+cameraName+","+micName+")");
//the user pressed the [save] button inside the recorder and the save_video_to_db.XXX script returned save=ok
//recorderId: the recorderId sent via flash vars, to be used when there are many recorders on the same web page
$('#record').hide();
document.write('"<d"+"iv id=jwplayer>"
+ "<cen"+"ter>" +
"<d"+"iv id=mediaplayer>"+"</di"+"v>"+
"<scr"+"ipt type=text/javascript>
jwplayer('mediaplayer').setup({
'flashplayer': 'jwplayer/player.swf',
'id': 'playerID',
'width': '640',
'height': '580',
'provider': 'rtmp',
'streamer': 'rtmp://domain/recorder/_definst_',
'file': 'onSaveOk("+streamName+")'
}); " +
"</scr"+"ipt>"+
"</cen"+"ter>"
')
Basically what happens is the recorder that was suposed to show up simply does not show up. When I have this in my function, for some reason $('#record').hide(); doesnt work eiether...
'and still use unescaped'inside?