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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:46:51+00:00 2026-05-20T18:46:51+00:00

I am retrieving some data from the server which looks something like this: 1:some

  • 0

I am retrieving some data from the server which looks something like this: 1:some values@2: some other@3:some more . I parse it in the client and It works well with chrome but firefox seems to throw this error.

I even tried setting the dataType to text which didnt work as well. I searched SO for similar questions and found this to be matching. But I am accessing it through http only unlike the problem in this thread.

EDIT:

    setInterval(function(){

            if($thisUser)
                $commonURL= "checkRequest.do?user="+$thisUser ;
            else
                $commonURL= "checkRequest.do?user=null";

            $.ajax({                            
            url:$commonURL,
            contentType: "text/plain",
            dataType: "text",   
            success:function(result){
                if(result[0]=="1")
                        window.location="playGame.do";
                else if(result[0]=="2"){ 

                    result1=result.substring(1,result.indexOf("@")); 
                    resultTemp="";
                    for(i=0;i<result1.split(",").length-1;i++)
                        resultTemp += "<a href='#' class='oppRequests' id='"+result1.split(",")[i]+"'>"+result1.split(",")[i]+"</a>, ";
                    $('td#oppRequests').html(resultTemp);
                    resultTemp="";
                    $("a.oppRequests").click(function(){
                        $thisUser = $(this).html();
                        $.ajax({

                        url:"postRequest.do?confirm="+$thisUser, 
                        success:function(result){

                    }});
                    });         

                }
            }
            });

},10000);

Pls help me out of this 🙂

somebody pls answer this :p I have got the proper way to achieve what i want yet I would like to know the problem.

  • 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-20T18:46:52+00:00Added an answer on May 20, 2026 at 6:46 pm

    One thing for sure that will solve your problem and speed up your script is if instead of parsing your own data format as text, you should use the built in JSON format. This is supported in jQuery by simply changing the ‘datatype’ parameter to ‘json’. This will allow you to simply access your results from the server using the ‘result’ var without having to do any string matches.

    In essence, your returned string in JSON format should look something like this:

    { key1: 'some value', key2: 'some value'}
    

    And you can access this with result[key1], result[key2] in your success function.

    Creating JSON server side is easy, I’m not sure what language you are using but a lot of languages have built in JSON encode functions.

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

Sidebar

Related Questions

I am using this sample to decode/encode some data I am retrieving/sending from/to a
I have some data that I'm retrieving using JSONP from a remote server. The
One thing I've started doing more often recently is retrieving some data at the
When retrieving a lookup code value from a table, some folks do this... Dim
I have a table in SQL Server 2005 which contains some changelog data for
In my java code,I am retrieving some multibyte data from database and making some
how to cache data source contents? suppose I'm retrieving some records from my sql
This is puzzling me. I'm using PetaPoco to retreive some values from a database,
When retrieving values from a DataRow is it better to use the column name
I've encountered a problem when retrieving a JSONP response from a server in a

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.