Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-18-2012, 07:11 PM   PM User | #1
m2244
Regular Coder

 
Join Date: Jun 2012
Posts: 129
Thanks: 1
Thanked 1 Time in 1 Post
m2244 is an unknown quantity at this point
Can someone explain what is going on with this Json

I am trying to figure out what the guy who created this code did here. I am taking over this project and he is gone.

This first one is the one I need to understand

Code:
jxml = $.xml2json(success);

This one is not as important.

Code:
JSFX_FloatDiv('floatingConsol', 10, 8).floatVert();
m2244 is offline   Reply With Quote
Old 09-18-2012, 10:11 PM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,459
Thanks: 0
Thanked 498 Times in 490 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
For the first one you'd need to find the definition of the $ object and then locate the xml2json method that has been attached to that object. Whatever that is coded to do is what that statement will do.

For the second one you'd need to look at the code defining the JSFX_FloatDiv function - you then need to look for what type of object that function returns and then look at the code for the floatVert() method associated with that object.

If any of thise JavaScript objects/methods/functions are defined within a framework then the documentation for the framework may tell you what they do without your having to read the JavaScript to work it out.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 09-19-2012, 12:54 AM   PM User | #3
DaveyErwin
Regular Coder

 
Join Date: Aug 2010
Posts: 810
Thanks: 12
Thanked 168 Times in 166 Posts
DaveyErwin is on a distinguished road
Quote:
Originally Posted by m2244 View Post
I am trying to figure out what the guy who created this code did here. I am taking over this project and he is gone.

This first one is the one I need to understand

Code:
jxml = $.xml2json(success);
This one is not as important.

Code:
JSFX_FloatDiv('floatingConsol', 10, 8).floatVert();
felgall has provided the correct way
you can answer you own questions.

here is a guess ...

jxml = $.xml2json(success);

success contains the
xml results of an $.Ajax
call $.xml2json converts
that to javascript Object
litteral notation and jxml
will contain the object
described by the xml

JSFX_FloatDiv('floatingConsol', 10, 8).floatVert();

aliows the div with the id of floatingConsol
to remain in the upper left hand corner
even when the page is scrolled

Last edited by DaveyErwin; 09-19-2012 at 02:25 AM..
DaveyErwin is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:43 PM.


Advertisement
Log in to turn off these ads.