Hey everyone,

I am looking for Javascript API's on the internet but I couldn't find one that has all built-in functions and stuff. Is there a downloadable version of the documentation or a website that I can search what function is available? something like php.net

Cheers,

Member Avatar for stbuchok

Each browser has there own version of JavaScript. Most functions and methods are common betweent them, however each browser tends to have a few that are only used by them (normally for experimentation or early adopter of a new standard).

Mozilla - https://developer.mozilla.org/en/JavaScript/Reference
Microsoft - http://msdn.microsoft.com/en-us/library/yek4tbz0(v=VS.85).aspx
Chrome/Safari (WebKit based browsers) - https://developer.apple.com/library/safari/#documentation/AppleApplications/Conceptual/SafariJSProgTopics/WebKitJavaScript.html
http://developer.apple.com/library/safari/navigation

Hope this helps.

Javascript lovers.. Anyone use a documentation for Javascript to see what methods are available and so on? please pass a link to that website so I can download the doc. cheers,

Member Avatar for stbuchok

Copy and paste the code below into note pad and save it as something.html. Open the file in your favorite browser to be able to see what events, object and properties are available.

<html>

<head>

<style>

.link
{
    cursor: pointer;
}

</style>

</head>

<body>

<ul>
    <li id="topListItem" class="link"><b onclick="getListOfProperties(document.getElementById('topListItem'), window); return false;">window/document</b></li>
</ul>

<script>

var i = 0;

function getListOfProperties(element, obj){
    var childList = '<ul>';

    for(var prop in obj){
        i++;

        var listItemName = 'item' + i;

        try
        {
            if(obj[prop] instanceof Function){
                childList += '<li>(function) ' + prop + '</li>';
            }else if(obj[prop] instanceof Object){
                childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(object) ' + prop + '</b></li>';
            }else if(obj[prop] instanceof Array){
                childList += '<li>(array) ' + prop + '</li>';
            }else if(typeof obj[prop] === 'number'){
                childList += '<li>(number) ' + prop + '</li>';
            }else if(typeof obj[prop] === 'string'){
                childList += '<li>(string) ' + prop + '</li>';
            }else if(typeof obj[prop] === 'object'){
                if(prop.substring(0,2) === 'on'){
                    childList += '<li>(event) ' + prop + '</li>';
                }
                else{
                    childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(object) ' + prop + '</b></li>';
                }
            }else if(typeof obj[prop] === 'boolean'){
                childList += '<li>(boolean) ' + prop + '</li>';
            }else{
                childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(not sure) ' + prop + '</b></li>';
            }
        }
        catch(error)
        {
            childList += '<li id="' + listItemName + '" class="link"><b onclick="getListOfProperties(document.getElementById(\'' + listItemName + '\'), ' + prop + '); return false;">(error) ' + prop + '</b></li>';
        }
    }

    childList += '</ul>';

    element.innerHTML += childList;
}


</script>

</body>

</html>

Hope this helps a few people.

if it helps, why not giving you a point. I want something like the php.net API's page... They are out there available to everyone...

Will give it a try now..

OK... This is useful to some extent. Yet, it does not show how to use the methods and what params the methods take.

Member Avatar for stbuchok

Yeah, sorry, not going to happen in 75 lines of code. It's useful for you to see what is available then you can easily look it up online when you see something that might fit what you are trying to do.

I think that what you are looking for is in fact The DOM API.

The DOM API.

Is there a website so I can access then download a pdf doc?

cheers,

Thanks troy. That is a lot of readin, hey? I don't think I can handle that much reading since it is not that useful ..

You don't have to memorize it, (that's not how we learn), you read and let things that matter stick by themselves and create yourself a memory overview on the matter so that each time you have a task or a matter to resolve you will know where to look and what to look for. You become familiar with the matter and resources, the rest is experience and of course natural borne talent.

So, Is that useful to you?

Knowing there are some differences between Google chrome and FireFox. I was testing the method parseInt... Since it is a method, it should have the brakets at the end like so parseInt(). That is why I wanted good reliable JavaScript APIs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.