0

I want to check the value of input type = image instead of input type = checkbox

This is the template

<div class="wrap_col td5"><input type="image" src="/pc/images/kick.png" alt="Submit" id="buttonKick" value="{$participant.channel}"></div>

This is the function

$('#buttonKick').click(function(e) {
    e.preventDefault(); // cancel default behavior
    var data = [];
    var conference = $("select[name='subuid'] option:selected").val();
    var action = "confbridgekick";
    getAllCheckAtParticipants(conference,data, action ,function(results){
        socket.emit("action",results);
    });

this is the action

var getAllCheckAtParticipants = function(conference, data, action, callback) {
    var $chk = $("#room_"+conference).find("input[type='checkbox']:checked").not(".chkAllParticipants");
    $chk.each(function(index){
        if (action=="confbridgekick") {
            var channel = $(this).val();
            data.push({ 'action': action, 'conference': conference, 'channel': channel });
        }
    });

How can i change this to check the value of input type = image

    var $chk = $("#room_"+conference).find("input[type='checkbox']:checked").not(".chkAllParticipants");
2
  • What's the problem, what's not working? More information required... Commented Jul 21, 2015 at 9:41
  • i edited @Jamie . . thanks :) Commented Jul 21, 2015 at 9:46

1 Answer 1

1
$("input[type='image']").val();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.