We help IT Professionals succeed at work.

PICTURES  OnClick

abusrbin
abusrbin asked
on
342 Views
Last Modified: 2012-08-13
I like to know  how to get  "my picture" with OnClick function on the input button.
any help?

abusrbin
Comment
Watch Question

Commented:
can you be more specific so we can better help you?

What input button?
and what's "my picture"?

Author

Commented:
I am sorry,

I like to have "grey " button" on my page, and when I click on it
I should see picture (any picture, my picture,  ..the picture I 've
chosen ) It must be java, not link conection.
Can you provide the source code ?

thanks
abusrbin

Commented:
Did you want that picture to pop up into another window, or onto the same page that the button is on?
-Josh

Author

Commented:
Both

thanks
abusrbin
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
I'll grade you excellent if you provide working samples for this, somewhere on the net,
with source code.

best regards
abusrbin

Commented:
What about this:

<input type="image" src="MyPicture.gif" onClick="MyFunction()">

This will show your image in stead of the default button.

Commented:
I am aware that my comment is something completely different then what others give as an answer, but I am not exactly sure what you want, so i thought it might be this.

Author

Commented:
hi, Sybe,
I want completely opposite solution. When I click on the "grey buton", the picture
should appear on the same page.

regs
abusrbin

Commented:
Wel alright here is the 'working' script on adres:
http://freud.et.tudelft.nl/~mud/Q/bluemoon/Bluemoon.html

For those who want to read it:
<HTML>
<HEAD><TITLE>Picture select page</TITLE>
<SCRIPT language="JavaScript"><!--

function Showpicture() {
    if (document.form.selection[0].checked)
       document.theimage.src='4.gif'
    if (document.form.selection[1].checked)
       document.theimage.src='5.gif'
    if (document.form.selection[2].checked)
       document.theimage.src='6.gif'
}                                                                              

<!-- --></SCRIPT><BODY>
<FORM name=form>
<INPUT type=radio name=selection value=1 checked>a four<BR>
<INPUT type=radio name=selection value=2>a five<BR>
<INPUT type=radio name=selection value=3>a six<BR>
<INPUT type=button name=changer OnCLick="Showpicture()"
       value="Show the picture">
<IMG name="theimage" src="4.gif">
</BODY>
</HTML>
</HEAD>

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.