1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Use JavaScript to show image on button press echoed in PHP?

Discussion in 'Web Design & Development' started by Leiki, Aug 1, 2006.

Thread Status:
Not open for further replies.
  1. Leiki

    Leiki Thread Starter

    Joined:
    Jul 15, 2005
    Messages:
    102
    I am wondering if there is a way to use JavaScript to make an image show when a button is pressed, but the button is echoed in PHP? I am not sure if JavaScript can work in PHP, but maybe... Here is my button:

    Code:
    echo "<input type=\"submit\" VALUE=\"Upload File\" class=\"bottombutton\">";
    
    I have found a script that changes images when the button is pressed, but I added the required "onClick='change_it2()" to the above code but it did not work. So is there another way to show an image when the above button is pressed?

    Thank you!
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/488556

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice