PDA

View Full Version : Merging ASP.NET CODE WIF JAVASCRIPT CODE. NEED HELP!


vinlam
07-11-2008, 04:51 AM
VB CODE

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td colspan="3">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td rowspan="2" style="width: 100px">
</td>
<td colspan="2" rowspan="2">
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;&nbsp;
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</asp:contentplaceholder>
</td>
</tr>
<tr>
</tr>
</table>
&nbsp;
</div>
</form>
</body>
</html>




JAVA CLOCK CODE
Directions: Simply cut and paste everything inside the table onto your page (for example, inside the <body> tags):

<form name="Tick">
<input type="text" size="11" name="Clock">
</form>
<script>
<!--
/*By George Chiang (JK's JavaScript tutorial)
http://javascriptkit.com
Credit must stay intact for use*/
function show(){
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="AM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
document.Tick.Clock.value=hours+":"+minutes+":"
+seconds+" "+dn
setTimeout("show()",1000)
}
show()
//-->
</script>

vinyl-junkie
07-11-2008, 05:30 AM
What exactly is the problem you're trying to solve? You've shown us your code, but what do you want us to do with it? Are you getting errors? Please give us a more clear explanation of what you want us to do for you. Thanks.

p.s. - In future posts, please use code tags.

rangana
07-11-2008, 06:37 AM
Hi vj,

I believe the OP has double posted:
http://codingforums.com/showthread.php?t=143961

vinlam
07-11-2008, 07:25 AM
when i merge these two codes together, it actually couldnt work. i dunno how to place the code inside the asp.net. im doing a clock for my website. and the javascript is actually for clock code. yupps.