|
-
Sep 12th, 2002, 09:11 PM
#1
Thread Starter
PowerPoster
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
-
Sep 12th, 2002, 09:13 PM
#2
Frenzied Member
In VB, it's:
VB Code:
Private Sub Image1_Click()
Text1.Text = Text1.Text & " plus my custom text"
Ed Sub
MicroBasic
Dragon Shadow Trainer
There is no good or evil in the world...only programmers and fools .
-
Sep 12th, 2002, 09:19 PM
#3
Frenzied Member
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 .
-
Sep 12th, 2002, 09:21 PM
#4
Thread Starter
PowerPoster
Sorry dude i was talking Web languages hence the subject Web Development!
-
Sep 12th, 2002, 09:29 PM
#5
Frenzied Member
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 .
-
Sep 12th, 2002, 09:29 PM
#6
Frenzied Member
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>
-
Sep 12th, 2002, 10:09 PM
#7
Thread Starter
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|