Subject: dynamic SRC argument
Posted By: doum74 Post Date: 4/4/2006 2:58:22 PM
I am trying to use a variable as a SRC argument. Does anyone have any idea on how to proceed.

<script src="MYVARIABLE"></script>

Thanks in advance

Reply By: doum74 Reply Date: 4/5/2006 1:38:39 PM
Problem solved, here's the solution. I hope it helps somebody on a dark day:

<script type='text/javascript'>
var url = 'partofURL'+MYVARIABLE+'anotherpartofURL';

var jsi = "<" + "script type='text/javascript'"
jsi += " src='" + unescape(url) + "'></" + "script>";

document.open();
document.write(jsi);
document.close();
</script>


Go to topic 42473

Return to index page 322
Return to index page 321
Return to index page 320
Return to index page 319
Return to index page 318
Return to index page 317
Return to index page 316
Return to index page 315
Return to index page 314
Return to index page 313