Results 1 to 2 of 2

Thread: gay div

  1. #1

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423

    gay div

    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.
    Code:
    <%@ 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>
    My monkey wearing the fedora points and laughs at you.

  2. #2
    Lively Member
    Join Date
    Jan 2001
    Location
    Worcester, MA
    Posts
    77
    Why not use a multiline textbox inside the div?
    "Find all you need in your mind if you take the time" -DT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width