Results 1 to 7 of 7

Thread: Web Development Question

  1. #1

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188

    Question Web Development Question

    Hey Guys,

    Quickie!
    How using any language can when i click an image have it insert some text in a text area?

    thanks for any help
    b

  2. #2
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    In VB, it's:

    VB Code:
    1. Private Sub Image1_Click()
    2.     Text1.Text = Text1.Text & " plus my custom text"
    3. Ed Sub


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  3. #3
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    In Visual C++:

    Code:
    LRESULT CALLBACK WndProc(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
        switch(Msg)
        {
            case STN_CLICKED:
                switch(lParam)
                {
                    case hwndImage:
                        SetWindowText(hwndEdit1, "My Text");
                }
                return 0;
            // OTHER MESSAGES HERE
        }
        return DefWindowProc(hwnd, Msg, wParam, lParam);
    }


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  4. #4

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Sorry dude i was talking Web languages hence the subject Web Development!

  5. #5
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    Oops, MicroBasic Is Nothing. Anyways,

    Code:
    <TEXTAREA ROWS=20 COLS=10 id=txtMe>
    This is my text
    </TEXTAREA>
    <IMG SRC="/somepic.gif" ... onClick="txtMe.value = txtMe.value + ' plus my text'">


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  6. #6
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    Code:
    <HTML>
    <HEAD>
    <script>
    	function addtext(){
    	document.theform.textarea1.value = 'added it';
    	}
    </script>
    </HEAD>
    <BODY>
    <form name="theform">
    <IMG SRC="images/tpaint.gif" onclick="addtext();">
    <TEXTAREA rows=2 cols=20 id=textarea1 name=textarea1></TEXTAREA>
    </form>
    </BODY>
    </HTML>
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  7. #7

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    thanks guys!

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