Debt Consolidation - Cheap Gas - Loan - Credit Counseling
Button to letter - Transparent text box? [Archive] - Threeboy Forums

PDA

View Full Version : Button to letter - Transparent text box?


Liquor_Riss
02-17-2004, 06:48 PM
Really two questions I have here, so:


Is there any existing code which allows a character to be produced on the screen by a user clicking the mouse on an image? E.g. on a webpage a picture of a keyboard, the user clicks A and an A appears in a text box?


If the above is not possible, can you make a transparent text box which can be placed over an image, so when the user types it looks like they're writing on the image and theres no visible text box outlines?
Just a fun little idea I was thinking of incorporating into my new site design, for instance if someone wanted to e-mail or text me it could be done using an on-screen phone or computer.

zubaz
02-17-2004, 07:40 PM
<img onClick="parent.document.formname.textareaname.value=parent .document.formname.textareaname.value+'The Letter A';" src="A.jpg">

Liquor_Riss
02-17-2004, 08:02 PM
Which parts of the code would need to be replaced?

zubaz
02-17-2004, 11:23 PM
formname is the name of your form - textareaname is the name of your textarea or you can do an input text field or whatever. parent and document and value stay as is though.

Liquor_Riss
02-18-2004, 04:55 AM
Ok thanks I've got it working :) Worked out how to make the transparent text box from a Neopet's CSS Guide :o

brentech
02-18-2004, 05:35 AM
Ok thanks I've got it working :) Worked out how to make the transparent text box from a Neopet's CSS Guide :o
css styles are the way to go.