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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:08:32+00:00 2026-05-12T17:08:32+00:00

I did a code in jquery and ajax with working very well in Safari,

  • 0

I did a code in jquery and ajax with working very well in Safari, FF and IE8, but dont work in IE6.

He can 5 Group of forms editable, which should not be showing, but only the first works, the ajax is also not working in IE6 and IE7.

scintillation only put in 2, but is 5 how can you see the link below.

$(document).ready(function(){
 var n=1;           
    $forms = $('#MemberCont'+n+' form');
    $('#MemberCont'+n+' #toogle').hide();
 $('#MemberCont'+n+' #hide').hide();

$('#MemberCont'+n+' a').bind('click', function(){
        switch(this.id){
            case 'c':
    $('#MemberCont'+n+' #change').hide();
    $('#MemberCont'+n+' #phone').hide();
    $('#MemberCont'+n+' #hide').show();
                $('#MemberCont'+n+' #toogle').show(); 
                return false;
                break;
    case 'd':
    $('#MemberCont'+n+' #change').show();
    $('#MemberCont'+n+' #phone').show();
    $('#MemberCont'+n+' #hide').hide();
                $('#MemberCont'+n+' #toogle').hide(); 
                return false;
                break;
        }
    })

    $forms.bind('submit', function(){
        var $button = $('#MemberCont'+n+' button',this).attr('disabled',true);
        var params = $(this.elements).serialize();

        var self = this;
        $.ajax({
            type: 'POST',
            url: this.action,
            data: params,

  beforeSend: function(){
                $('#MemberCont'+n+' #phone').show();
    $('#MemberCont'+n+' #hide').hide();

                $('#MemberCont'+n+' #phone').html("Loading...");
            },
            success: function(txt){

    $('#MemberCont'+n+' #top').show();
                $('#MemberCont'+n+' #cadastro').hide ();
    $('#MemberCont'+n+' #hide').hide ();
    $('#MemberCont'+n+' #toogle').hide();
    $('#MemberCont'+n+' #change').show();

    $button.attr('disabled',false);

                $('#MemberCont'+n+' #phone').html(txt);

                self.reset();
            },

            error: function(txt){
                $('#MemberCont'+n+' #phone').html(txt);
            }
        })
        return false;
    });

});

$(document).ready(function(){
 var n=2;           
    $forms = $('#MemberCont'+n+' form');
    $('#MemberCont'+n+' #toogle').hide();
 $('#MemberCont'+n+' #hide').hide();

$('#MemberCont'+n+' a').bind('click', function(){
        switch(this.id){
            case 'c':
    $('#MemberCont'+n+' #change').hide();
    $('#MemberCont'+n+' #phone').hide();
    $('#MemberCont'+n+' #hide').show();
                $('#MemberCont'+n+' #toogle').show(); 
                return false;
                break;
    case 'd':
    $('#MemberCont'+n+' #change').show();
    $('#MemberCont'+n+' #phone').show();
    $('#MemberCont'+n+' #hide').hide();
                $('#MemberCont'+n+' #toogle').hide(); 
                return false;
                break;
        }
    })

    $forms.bind('submit', function(){
        var $button = $('#MemberCont'+n+' button',this).attr('disabled',true);
        var params = $(this.elements).serialize();

        var self = this;
        $.ajax({
            type: 'POST',
            url: this.action,
            data: params,

  beforeSend: function(){
                $('#MemberCont'+n+' #phone').show();
    $('#MemberCont'+n+' #hide').hide();

                $('#MemberCont'+n+' #phone').html("Loading...");
            },
            success: function(txt){

    $('#MemberCont'+n+' #top').show();
                $('#MemberCont'+n+' #cadastro').hide();
    $('#MemberCont'+n+' #hide').hide();
    $('#MemberCont'+n+' #toogle').hide();
    $('#MemberCont'+n+' #change').show();

    $button.attr('disabled',false);

                $('#MemberCont'+n+' #phone').html(txt);

                self.reset();
            },

            error: function(txt){
                $('#MemberCont'+n+' #phone').html(txt);
            }
        })
        return false;
    });
});

Html:

    <div id="MemberCont1" style="float:left; display:block; margin: 15px 30px 10px 30px; width: 563px;">
                    <div id="ResultTitle" style="width:217px;">Business Name</div>
                    <div id="MemberPhone" style="width:340px;"><div id="hide"><a href="" id="d"><img src="../img/hide_btn.gif" width="65" height="25" alt="Hide" /></a></div><div id="phone"><?php echo $result['business']; ?></div></div>
                  <hr class="Line" />
          <div id="toogle" style="font-size:12px; color:#FFF; ">
            <div id="none" style="position:relative; float:left; display:inline; padding-bottom:2px;">Change business name</div>
                  <form action="personal_update.php" style="clear:left; margin:0 0 10px 0;">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><input name="dataform" type="text" class="FormMember" id="dataform" />
    <input name="id_member" type="hidden" value="<?php echo $result['id_member']; ?>" />
    <input name="table" type="hidden" value="business" /></td>
    <td align="right"><input name="submit" type="image" value="submit" src="../img/submit_member.gif" /></td>
  </tr>
</table>
           </form>
             </div><!--toogle-->
             <div id="change"><a href="" id="c"><img src="../img/change_btn.gif" alt="Change" width="64" height="25" align="left" /></a></div>
       </div><!--/*MemberCont*/-->

     <div id="MemberCont2" style="float:left; display:block; margin: 15px 30px 10px 30px; width: 563px;">
                    <div id="ResultTitle" style="width:217px;">Contact Name</div>
                    <div id="MemberPhone" style="width:340px;"><div id="hide"><a href="" id="d"><img src="../img/hide_btn.gif" width="65" height="25" alt="Hide" /></a></div><div id="phone"><?php echo $result['contact']; ?></div></div>
                  <hr class="Line" />
          <div id="toogle" style="font-size:12px; color:#FFF; ">
            <div id="none" style="position:relative; float:left; display:inline; padding-bottom:2px;">Change contact name</div>
                  <form action="personal_update.php" style="clear:left; margin:0 0 10px 0;">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><input name="dataform" type="text" class="FormMember" id="dataform" />
    <input name="id_member" type="hidden" value="<?php echo $result['id_member']; ?>" />
    <input name="table" type="hidden" value="contact" /></td>
    <td align="right"><input name="submit" type="image" value="submit" src="../img/submit_member.gif" /></td>
  </tr>
</table>
           </form>
             </div><!--toogle-->
             <div id="change"><a href="" id="c"><img src="../img/change_btn.gif" alt="Change" width="64" height="25" align="left" /></a></div>
       </div><!--/*MemberCont*/-->
  • 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-12T17:08:32+00:00Added an answer on May 12, 2026 at 5:08 pm

    You can only have one ID anywhere in your HTML. Try using classes instead for things you have to repeat.

    I suspect that, once they find the first ids you were looking for, they stop looking after that.

    Here’s the W3’s description of ids and classes.

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

Sidebar

Related Questions

My code used to work, but I recently updated jQuery UI to 1.8 and
HI i did this code with help of Marc Gravell in Why can't I
I did not make any changes on the code. I dont receive any errors
I have a situation where I send jquery ajax post request but in my
I'm working to setup an AJAX action in rails 3 with the following code.
I'm having a problem with my jQuery code on http://alpha.spherecat1.com/ , but the local
i have very simple code that i making partial postback by jquery and i
I have been working with AJAX for a while now, but in limited and
We have a complete code for getting the values from PHP through Jquery AJAX
I am trying to use ajax to load sometag , but my appended code

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.