The code is showing up
The code is showing up
I am so new to Jquery, I never heard of it until the day before yesterday, and I have very little experience with javascript. I needed a time picker and finally found one my users and I should do well with. It is at:
http://pttimeselect.sourceforge.net/example/index.html
Before I start to use it, I need to isolate exactly what I need to make it work in my webpages. And by trial and error I have stripped everyhing I can. But some of the code is visible on the page and I cannot figure out how to prevent this.
In the code below, I need to put away the statement between the code tags somehow, to prevent it from showing up. I cannot seem to put it in the document ready script or it's own script tags, I just do not know the syntax well enough yet. Anything more I do to this seems to break it.I've spent all morning trying to figure it out and look up what might be wrong. Yes I've considered just putting a font color to match the background but that's not really a good solution here.
I'm sure it's something simple. I'm just too new at this to understand it yet. Thank you!
Here is my code:
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery.ptTimeSelect</title>
<script type="text/javascript" language="JavaScript" src="../../timepicker/jquery.js"></script>
<script type="text/javascript" language="JavaScript" src="../../timepicker/dimensions.js"></script>
<script type="text/javascript" language="JavaScript" src="../../timepicker/jquery.ptTimeSelect.js"></script>
<script language="JavaScript">
$(document).ready(
function () {
$('code').each(
function() {
eval($(this).html());
} ) } );
</script>
<code>
$('#sample2>input').ptTimeSelect({
labels: {
x: '[X]',
popup_link: '[Pick Time]',
set_time: 'Set New Time'
},
bgcolor: '#fff',
border_color: '#ff0000'
});
</code>
</head>
<body>
<div id="sample2">
<br /><br />
<form onsubmit="return void(0);">
Start Time:<br><input name="s2Time1"/><br>
</form>
</div>
</body>
</html>