...

View Full Version : Writing Dynamic Content



Rain Lover
06-12-2010, 06:23 PM
Hi,

Here's what I've been trying a lot to find but to no avail:
a simple text field and submit button that lets users insert an embedding (HTML/CSS/JavaScript codes) to display on the same frame.
I'd like something like this:
http://www.howtocreate.co.uk/tutorials/jsexamples/dywrite.html

Unfortunately it doesn't run any code, e.g.


<html>
<head>
<script type="text/javascript">
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTime()',500);
}

function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
</head>

<body onload="startTime()">
<div id="txt"></div>
</body>
</html>


Or the text marquee code on the following tutorial:
http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm


Your help is greatly appreciated!
Regards
Rain Lover



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum