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

  • SEARCH
  • Home
  • 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 6910873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:52:15+00:00 2026-05-27T08:52:15+00:00

EDIT: With the hints on the responses i got to know that name isn’t

  • 0

EDIT:

With the hints on the responses i got to know that name isn’t a valid attribute for div tag, but it’s for select.

function modifica(estado,numero){
    alert(numero);
    $.ajax({
    type: "GET",
    datatype: "html",
    url: "icallverifica.php",
    data: {
    estado : estado,
    modifica : "1" ,
    numero : numero
    },
    success: function(data) {
        alert(data);
    }
    });
}

So, i want to get multiple attributes at once using onchange:

if($valor == 0){
    mysql_select_db("iloja_icall", $con);
    $result1 = mysql_query("SELECT * FROM icall WHERE verifica='0'");
    while($row = mysql_fetch_array($result1)){
    echo $row['numero'].'<select id="optin" name="'.$row['numero'].'" onchange="modifica(this.value,this.name)">
  <option value="chamada">Chamada</option>
  <option value="atendeu">Atendeu</option>
  <option value="atendeunao">Nao atendeu</option>
  <option value="engano">Engano</option>
</select>';
    echo '<br>';
    }
}

THIS COMBO IS NOW WORKING FLAWLESSLY 😀 THANK YOU SO MUCH GUYS, this is why i love stackoverflow 🙂

Shouldn’t this work?

Thanks so much guys!

  • 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-05-27T08:52:16+00:00Added an answer on May 27, 2026 at 8:52 am

    Based on the tags for this question, I see you’re using jQuery.

    // assuming you're passing "this" to function
    function modifica(me) {
        var id = me.parentNode.id; // or $(me).parent().attr('id'); etc
    }
    

    Additionally, you could just remove the onchange attribute and set it with an even listener (recommended):

    $('#optin').change(function(e) {
        // code here
        var option = $(this).val(); // current selected option for example
    
        // if you want to get ALL attributes of an element:
        var attribs = $(this)[0].attributes; // or $('#elementID')... etc
    });
    

    If you want to iterate (loop) through all of an element’s attributes, then check out this: How to iterate through all attributes in an HTML element?

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

Sidebar

Related Questions

EDIT: I was an idiot. I simply had an image that was vertically long,
EDIT: See my answer below--> I am wanting to have a view that when
EDIT: iam using ajax to load text in my content that is why onload
Edit : Note that, as Daniel and latkin noted in an answer and a
EDIT : It turned out that this can only be done through an external
I want to enable template path hints in admin panel. I know how to
EDIT This is homework so no straight up code please. Just hints, thank you!
I have a rails app that has picked up a bit of traction, but
I've got a page that needs POST data to get an ajax response. The
http://bit.ly/oSJwP2 Anyone know how to fix my #updates or give me some hints? I've

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.