I was wondering if I could use JavaScript to make an image display if a form button was hit. I do not want the page to reload, I just want an image to display if the button is hit.
For example (obviously not real java code below, just logic):
No I want a form button that WHEN the user clicks on it THEN a image will display.
Basically when the page is first loaded there is no image on the web site, but WHEN the user clicks on this form button a image will make the image appear.
In other words when a user clicks the SHOW IMAGE button I want an image to just display.
You're going to want to load the image inside a <div> whose 'display' style attribute is originally set to 'none', then when the button is clicked, have it change to 'True'. The code below take an image, and when the image is clicked, shows a hidden div and changes the image to another image. This isn't exactly what you want, but you might be able to gleen something from this...
The one I posted is the easiest way. Who cares about so much code, its not even alot! Also take what you get for granted, your lucky you have people here helping you in the first place.
I realize that people are only here to help. I was not saying your solution was not helpful. I was simply asking ANYONE on the forum if they had an easier solution.
In fact I was using this forum the way it should be. We are here for discussion on web site development, right?
Last edited by icesolid on Wed Mar 01, 2006 6:25 pm, edited 1 time in total.
I realize that people are only here to help. I was not saying your solution was not helpful. I was simply asking ANYONE on the forum if they had an easier solution.
I was simply ASKING for anyone elses opinion on an easier solution, am I allowed to do that?
Aright im not going to sit here and argue with you. If you want to use it, use it. This is a very simple method. I am sorry you want people writing your codes and doing your homework for you. But we provided you with very good methods. Mine is not even long!
Oh well, good luck
EDIT: Also I dont know if you didnt know, you only have to put that one code in the head of the document. Not everywhere.