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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:15:36+00:00 2026-06-03T23:15:36+00:00

Please check it here: http://jsfiddle.net/9VaW2/1/ I want jData be available outside $http({method: ‘POST’, url:

  • 0

Please check it here: http://jsfiddle.net/9VaW2/1/

I want jData be available outside

$http({method: 'POST', url: '/someurl'}).
  success(function(data, status, headers, config) {
    var jData = data;
  }).
    error(function(data, status, headers, config) {
  });

But when I do this:

$view.availableData = {
                cols:{ID:'ID', Date:'Date'},
                rows:{data:jData},
                options:{}
            };
   
    

It gives me this error

ReferenceError: jData is not defined

EDIT
update fiddle

http://jsfiddle.net/9VaW2/3/

** I think I found a solution to make a synchronous call ..async : false. that works. I think the page was loading faster than the data was coming back…. wonder if someone has a better solution **

  • 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-06-03T23:15:38+00:00Added an answer on June 3, 2026 at 11:15 pm

    Just define as a global variable.

    var jData;
    
    $http({method: 'POST', url: '/someurl'}).
        success(function(data, status, headers, config) {
          jData = data;
        }).
        error(function(data, status, headers, config) {
        });
    
    $view.availableData = {
        cols:{ID:'ID', Date:'Date'},
        rows:{data:jData},
        options:{}
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please refer the url http://jsfiddle.net/fnvXT/ Here while selecting the check box the corresponding row
Please check out my code here http://jsfiddle.net/bYDPr/20/ So I have some HTML textarea elements
Please check this one: http://jsfiddle.net/sasindu555/nNyxk/8/ You can see Description , Features and Contact Details
http://jsfiddle.net/4UbKe/3/ Please check out the fiddle to see exactly why it doesn't work. I'm
http://jsfiddle.net/smhz/vFSV2/2/ When i click on edit checkboxes appear but i want when i check
I'm writing a simple tooltip that can hold HTML tags. Please check http://jsfiddle.net/Qkwm8/ for
Here is what I am working on. http://jsfiddle.net/yfcZN/ What I want is padding of
Please check this code: http://jsfiddle.net/rkumarnirmal/Rq7b2/2/ What I'm doing is I'm showing some text. If
http://jsfiddle.net/9aaNh/ Please check this Fiddle. I am having problem with spacing in between text
Please check this: http://img62.imageshack.us/img62/3598/ieff.png why is it more height than in FF.. i want

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.