PDA

Click to See Complete Forum and Search --> : gay div


Arrow_Raider
Jun 24th, 2003, 10:33 AM
the following is some code i made to see if i could use a div box on a forum. i tried to make it so that when you type something in the div box and hit button1, it puts the html for the text in the label. it doesn't do that though, it only puts what i initially put there.

<%@ Page Language="VB" %>
<script runat="server">

' Insert page code here
'

Sub Button1_Click(sender As Object, e As EventArgs)
label1.text = MsgContent.innerhtml
End Sub

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<!-- Insert content here -->
<div class="edition" id="MsgContent" contenteditable="true" style="BORDER-RIGHT: thin solid; BORDER-TOP: thin solid; OVERFLOW-Y: scroll; BORDER-LEFT: thin solid; WIDTH: 100%; BORDER-BOTTOM: thin solid; HEIGHT: 332px" runat="server">
<b>test</b>
</div>
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"></asp:Button>
<asp:Label id="Label1" runat="server"></asp:Label>
</form>
<script>
function bold()

{

document.execCommand("Bold");

}
</script>
<button onmouseup="bold();" class="button" tabindex="-1" type="button" unselectable="on">Bold</button>
</body>
</html>

Cin0s3
Jun 25th, 2003, 08:18 AM
Why not use a multiline textbox inside the div?