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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:28:17+00:00 2026-06-15T20:28:17+00:00

I have a link_to_function with image tag. I want to disable it (make its

  • 0

I have a link_to_function with image tag. I want to disable it (make its image blur n disable click event) for page load. But anothr button named “button 1” is clicked then only it should be enabled. How can i accomplish it?

Css for image with link is

.img  
{
opacity:0.4;
filter:alpha(opacity=40); 
} 

View is ….

<%i = 1%>
<div id = "file_<%= i %>" class = "file">
<%= link_to_function image_tag("play_images.png",:width => 30, :height => 30,:align => 'left', :title => 'Play', :id => "img_play#{i}"), :id => "play_#{i}"%>
&nbsp;&nbsp;<%= link_to_function image_tag("stop_images.png",:width => 30, :height => 30,:align => 'left', :title => 'Stop', :id => "img_stop#{i}",:class => "img"), :id => "stop_#{i}"%>
<%= link_to_function image_tag("fast_fwd.jpeg",:width => 30, :height => 30, :title => 'Fast farword', :id => "img_ff#{i}", :class => "img"), :disabled => 'true',:id => "ff_#{i}"%>

<%= link_to_function image_tag("images.jpeg",:align => 'right'), :id => "close_#{i}"%>
 <div id = "request_<%= i%>" class = "request">
   </div>
 </div>
 <%i = i + 1%>

Now, here what i want is initially 2 image button with class “img” will be blured and disabled to, and as i click on button with id “play_#”, both button with class “img” will remove their classes and they wll b enabled. So how can i make them disable on load and enable when play button is clicked. My jquery is…

   function set_file(id,time,user,node,activity)
    {
     var filename = "";
       filename = user+"_"+node+"_"+activity+"_"+time;

        jQuery("#log_"+id).ready(function() {
        jQuery("#file_"+id).dialog({modal: true, resizable: false, draggable: false,
                 title: "File Content", width: 520,

       });
        jQuery("#play_"+id).click(function(){
          jQuery("#img_stop"+id).removeClass();
          jQuery("#img_ff"+id).removeClass();
                    text="content of text here";
                    delay=500;
                    currentChar=1;
                    destination="[not defined]";
       jQuery.get('/requests/download_log/?filename=' + filename, function(data) {
    });

});
jQuery("#stop_"+id).click(function(){
    jQuery("#img_ff"+id).addClass('img');
    jQuery("#img_stop"+id).addClass('img');
   alert("Stop");
  });
   jQuery("#ff_"+id).click(function(){
  alert("Fast Forward");
  });
 }
  • 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-15T20:28:18+00:00Added an answer on June 15, 2026 at 8:28 pm

    please describe your problem more exactly, e.g. post some code.

    maybe you try to do something like that:

    jQuery(document).ready(function() {
        var $button1 = jQuery('#button1');
        var $button2 = jQuery('#button2').attr('disabled', 'disabled');
    
        $button1.click(function() {
            if ($button2.is(':disabled')) {
                $button2.removeAttr('disabled');
            } else {
                $button2.attr('disabled', 'disabled');
            }
        });
    
        $button2.click(function() {
            alert('button2 - click');
        });
    });​
    

    try it here: http://jsfiddle.net/f9F9z/2/

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

Sidebar

Related Questions

I have a link_to_remote and I want to make sure people can only click
I have an HTML page where I want to change Image & Link with
I have a tag on a html page on which I am trying to
I have anchor tag with one image tag inside, I am dynamically changing the
I have an anchor tag on my page that toggles between active and cancelled
I have three youtube videos that I want to stop when the user click
I have link that calls a function when clicked: <a href=javascript:spawnMenu(this); id=link1>Test1</a> To make
I have main.cpp (including main function) and func1.cpp, and I want to link these
I have tried to do this refering to following link. http://skypher.com/index.php/2008/07/28/function-list-for-php/ But no success.
I have a link to a page which invokes the 'Sexy Alert Box' script

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.