Jan
23
comment Why can't I wrap js promise resolve in a jquery object?
@Bergi TypeError: context is undefined if ( ( context.ownerDocument || context ) !== document ) { widget.js (line 98) widgetSystem.listenForClick/</<()widget.js (line 99) e = Object { type="object"}
Jan
22
comment Why can't I wrap js promise resolve in a jquery object?
@Bergi I can't! There is no variable in my script called context. I assume it is from the Jquery library?
Jan
22
comment Why can't I wrap js promise resolve in a jquery object?
@hugo - yep sure did, thanks again.
Jan
22
comment Why can't I wrap js promise resolve in a jquery object?
@charlietfl, It shows the same object I would expect it to, whether I console log it there or in the showWidget function.
Jan
22
comment Why can't I wrap js promise resolve in a jquery object?
@hugo, yes that is what I have done.
Jan
22
comment Why can't I wrap js promise resolve in a jquery object?
I know exactly why it isn't working. I need to turn data.widget into a jquery object, not data! My API returns an object containing the html I need.
Jan
22
comment Why can't I wrap js promise resolve in a jquery object?
It gives me a nice big object in the console, exactly as I would expect! Object { widget="<div>\r\n <div class="p...iv>\r\n </div>\r\n</div>\r\n"}
Jan
22
asked Why can't I wrap js promise resolve in a jquery object?
Dec
11
comment What is wrong with this Jquery Ajax request in Chrome?
Ultimate solution was to greatly simplify my php return to just a simple JS array holding the class values in the order I wanted them to appear. The large associative array(object) php was returning would have required more work than necessary.
Dec
11
comment What is wrong with this Jquery Ajax request in Chrome?
My json is now formatted as indicated, but order still does not appear to matter. when I do typeof(data.data[0]) JS still says an object, and Chrome is still not respecting the order the json is returned. Must still be missing something.
Dec
11
comment What is wrong with this Jquery Ajax request in Chrome?
Is this an option I can choose in PHP's json_encode, or should I just manually create the json?
Dec
11
asked What is wrong with this Jquery Ajax request in Chrome?
Dec
5
awarded Custodian
Dec
5
comment How can I make readily available config variables in Javascript without implicit globals
@AdityaParab. Simple example perhaps?
Dec
5
reviewed Approve suggested edit on How can I make readily available config variables in Javascript without implicit globals
Dec
5
asked How can I make readily available config variables in Javascript without implicit globals
Nov
23
awarded Popular Question
Nov
10
asked Mysql find dates using where in clause, or dates nearest to those in array
Aug
3
awarded Famous Question
Jul
29
awarded Notable Question
1 2 3 4 5