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 8992321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:55:36+00:00 2026-06-15T22:55:36+00:00

I have two banners (images) which keep switching every 4 seconds. One image is

  • 0

I have two banners (images) which keep switching every 4 seconds. One image is clickable and the other is not. Below is the code,

<div class="contentdiv">
   <h:commandLink  action="#{mybean.firstImageClick}" id="firstBanner" style="text- decoration:none;">
       <img src="imagePath" width="590" height="210"  border="0" style="cursor: pointer;"/> 
</h:commandLink>
</div>


<div class="contentdiv">
    <img src="imagePath" width="590" height="210"  border="0" style="cursor: default;"/>
</div>

I have specified style for 1st and 2nd image as pointer and default respectively.

When images switch, 1st image will appear as Pointer to user when he moves his cursor over the image. When a switch happens to 2nd image, and when user has not moved his cursor away from the image, 2nd image will also appear as Pointer instead of Default.
Only when User clicks on 2nd image, it will change as Default and then User will come to know that 2nd image is not clickable.

Same thing happens with 1st image. When User is in 2nd image and when a Switch happens from 2nd image to 1st image, Cursor will still be default instead as Pointer. So, User doesn’t know that 1st image is clickable.

  • 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-15T22:55:37+00:00Added an answer on June 15, 2026 at 10:55 pm

    Instead of using inline style.,just create two simple classes for your cursor styles like as follows.

    For CSS :

    <style type="text/css">
    .clickable {
    cursor:pointer;
    }
    .not_clickable{
    cursor:default;
    }
    </style>
    

    For HTML :

    <div class="contentdiv">
       <h:commandLink  action="#{mybean.firstImageClick}" id="firstBanner" style="text- decoration:none;">
           <img src="imagePath" width="590" height="210"  border="0" class="clickable"/> 
    </h:commandLink>
    </div>
    
    
    <div class="contentdiv">
        <img src="imagePath" width="590" height="210"  border="0" class="not_clickable"/>
    </div>
    

    After that you can easily switch over the classes as per your wish, while you triggering or clicking the image.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two drop downs, one which influences the other. The first acts as
I have two classes (MVC view model) which inherits from one abstract base class.
Right now, I have a layout that looks like one of the two images
I have two divs, one inside the other and I would like the small
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have an xml layout which places an image at the top of the
Have two IBOutlets which won't appear in File's Owner to connect to even though
i have two arraylist one is departurelist and one is arrival list i want
I have two divs: -A header bar, which is fixed while scrolling, and stuck
I have two flash banners (.swf) and i want to show them randomly on

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.