Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8570833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:38:53+00:00 2026-06-11T18:38:53+00:00

I am using images and hrefs to create buttons. Code look like this: <a

  • 0

I am using images and hrefs to create buttons. Code look like this:

<a href="http://www.zive.sk"><img src="res/images/zive.png" alt="Zive.sk" id="ziveCircle"></a>

Is there any way to change image src if user press button? Maybe some event handler which will determine that user has pressed image? It should act as normal button so when user press it and keep pressed it should change image src and when he releases the button then the href should be loaded (normal button behaviour).

PS: I cannot use css for this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:38:54+00:00Added an answer on June 11, 2026 at 6:38 pm

    I have found a solution, using some of Hope I Helped script. Here is the code:

    function buttons(){
    document.getElementById('zive-anchor').onmousedown=function () {
        document.getElementById('ziveCircle').src = 
        "res/images/zivePressed.png";
    };
    document.getElementById('zive-anchor').onmouseout=function () {
        document.getElementById('ziveCircle').src = 
        "res/images/zive.png";
    };
    };
    

    and here is HTML:

    <div data-role="page" id="homepage">
            <div id="selectCircle">
                <a href="feeds.html#page1" rel="external" id="zive-anchor"><img src="res/images/zive.png" alt="Zive.sk" id="ziveCircle"></a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using this function to get the featured images: <a href=# rel=prettyPhoto> <?php
This is what my current code looks like: HTML: <a class=button href=#>Read More</a> CSS:
I have a page containing a series of tags like this <a class=IMG href=#
CSS3 allows developers to implement simple graphics without using images. For example this envelope
How do I create dynamic images using php which depend of $_GET['x'] variables?
I am trying to save images using the following code: - (void)writeData{ if(cacheFileName==nil) return;
I am trying to create a button on an <a href=# ...> tag using
I am using this article to create a way for users to enter in
SLIDER CODE http://tympanus.net/codrops/2012/03/15/parallax-content-slider-with-css3-and-jquery/ IMAGE MOCK: I'd like to preface this by saying I'm not
I have been learning how to create dynamic images and dynamic stylesheets using ASP.NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.