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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:11:59+00:00 2026-05-30T12:11:59+00:00

Today I have a bit of a problem. I have an ajax script that

  • 0

Today I have a bit of a problem. I have an ajax script that I have been using for my site, but for efficiency reasons, I need to convert it to jQuery. I have been researching how to do this and have had no such luck whatsoever with this.

Here is my script:

<script type='text/javascript'>
//<![CDATA[
function ajaxFunction2(){
var ajaxRequest;  

try{
    // Opera 8.0+, Firefox, Safari
    ajaxRequest = new XMLHttpRequest();
} catch (e){
    // Internet Explorer Browsers
    try{
        ajaxRequest = new ActiveXObject('Msxml2.XMLHTTP');
    } catch (e) {
        try{
            ajaxRequest = new ActiveXObject('Microsoft.XMLHTTP');
        } catch (e){
            // Something went wrong
            alert('Your browser broke!');
            return false;
        }
    }
  }
  ajaxRequest.onreadystatechange = function(){
    if(ajaxRequest.readyState == 4){
        var ajaxDisplay = document.getElementById('editpagecolors');
        ajaxDisplay.innerHTML = ajaxRequest.responseText;

    }
   }
  var bandname = document.getElementById('bandname').value;
  var musicstyle = document.getElementById('musicstyle').value;
  var websiteurl = document.getElementById('websiteurl').value;
  var aboutme = document.getElementById('aboutme').value;
  var chooser = document.getElementById('chooser').value;
  var chooser2 = document.getElementById('chooser2').value;
  var chooser3 = document.getElementById('chooser3').value;
  var chooser5 = document.getElementById('chooser5').value;
    var chooser6 = document.getElementById('chooser6').value;
  var chooser7 = document.getElementById('chooser7').value;
  var params = 'bandname=' + bandname + '&musicstyle=' + musicstyle +   '&websiteurl=' + websiteurl + '&aboutme=' + aboutme + '&chooser=' + chooser + '&chooser2='   + chooser2 + '&chooser3=' + chooser3 + '&chooser5=' + chooser5 + '&chooser6=' + chooser6 + '&chooser7=' + chooser7;
  ajaxRequest.open("POST", 'ajaxeditprofile.php', true);  
  ajaxRequest.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  ajaxRequest.send(params);

}
//]]>
</script>

Is it even possible to convert this to jQuery and if so, how would I go about doing this. Thank you guys so much for the help!

  • 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-30T12:12:00+00:00Added an answer on May 30, 2026 at 12:12 pm
        function ajaxFunction2(){
    
          var bandname = $('#bandname').val();
          var musicstyle = $('#musicstyle').val();
          var websiteurl = $('#websiteurl').val();
          var aboutme = $('#aboutme').val();
          var chooser = $('#chooser').val();
          var chooser2 = $('#chooser2').val();
          var chooser3 = $('#chooser3').val();
          var chooser5 = $('#chooser5').val();
            var chooser6 = $('#chooser6').val();
          var chooser7 = $('#chooser7').val();
          var params = 'bandname=' + bandname + '&musicstyle=' + musicstyle +   '&websiteurl=' + websiteurl + '&aboutme=' + aboutme + '&chooser=' + chooser + '&chooser2='   + chooser2 + '&chooser3=' + chooser3 + '&chooser5=' + chooser5 + '&chooser6=' + chooser6 + '&chooser7=' + chooser7; 
    
            $.post('ajaxeditprofile.php', params, function( data){                                             
                $('#editpagecolors').html( data);              
            });
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm familiar with using NSLocalizedString() to localize strings, but the problem I have today
Today we have a windows application that, using an OCX, creates a web page
Hi everyone my problem today is I have a couple of buttons that slide
I have a wierd problem that i need to work out how to resolve,
Today I have noticed that the order in which the $lt and $gt operators
greetings, today i have started to learn java using netbeans ide. i would like
I realized today that I have blindly just followed this requirement for years without
Today I came across a very nasty problem, I need to make the front-end
Today I ran into a very difficult TDD problem. I need to interact with
I have a bit of a problem when I try to take a huge

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.