Who manages Javascript?


You know how php, java, mysql, they all have a project page and some sort of foundation that backs. Well who backs javascript I can never seem to find an official js site, one with all the classes/methods/properties, you can find what your looking for but i was wondering if there is some sort of foundation site to it.
Posted On: Sunday 23rd of December 2012 11:45:30 PM Total Views:  160
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Strings

I want a person to enter a string value in a javascript program. Example: Choose Rock, Paper, Scissors. Person: Rock What is the code for a program to take in strings Like parseInt andd parseFloat are for numbers. What is it for strings
VIEWS ON THIS POST

28

Posted on:

Saturday 10th November 2012
View Replies!

Collapse/un-hide table when page load.

I am newbie here. I need some help for a problem that already drag me for 2 days. I actually would llike to modify the code below to enable it to collapse when the page load. Previously the script has a show innertext that need user to click in order to collapse the table. I have been try for so many way but still unable to slove the problem. I really need some help here. I will post the javascript function below.
VIEWS ON THIS POST

69

Posted on:

Saturday 10th November 2012
View Replies!

ajax php mysql help

I want to make a rating system that uses ajax for the rating. i use php and call all of the images, then i want to use ajax to post all the votes to a php script. However, i dont know how to get the elements. I want to be able to identify which picture the user selected. Upload pics var x = document.getElementById("x"); I want to be able to identify which picture the user selected. if(window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("xxxx").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","tet.phprating=x",true); xmlhttp.send();
VIEWS ON THIS POST

137

Posted on:

Saturday 10th November 2012
View Replies!

Undefined method property

Haranaboy, Level 1: How to write a Constructor function with methods added internally and externally. function Objy() {//Constructor. this.text = ''; //This adds method .setText to Objy this.setText = function(x) { this.text = x; }; } //This adds another method, .display, to Objy Objy.prototype.display = function() { //A method added in this way also has access to Objy's this.text alert("display: " + this.text); }; //This is legal javascript but does not add a method that is inherited by each of the constructor's instances. It is not particularly useful in most circumstances. Objy.show = function() { alert("show: (works)" + this.text); }; //Now, let's demonstrate that //tst.setText() and tst.display() work //but tst.show() does not work window.onload = function() { var tst = new Objy(); tst.setText("yoyo");//will work //********************** try { tst.display();//will work } catch(e) { alert("display: failed"); } //********************** try { tst.show();//will not work } catch(e) { alert("show: failed");//this will execute } //********************** }; Level 2: Understanding that internally and externally added methods are not the same. Constructors can have private, public and privileged members without using keywords "Private", "Public" or "Privileged", as would be necessary in some other languages. function Objy() {//Constructor. this.text = '';//Public property var data = 0;//Private variable //Now, we add three Privileged methods, which can //all access private variables and public properties this.setText = function(x) { this.text = x; }; this.setData = function(x) { data = x; }; this.displayData = function() { alert("displayData: " + data); }; } //As before, we add public method, .display, to Objy //This time, .display is multifaceted. Objy.prototype.display = function() { //We can access public property .text alert("display (this.text): " + this.text); //But whatever we try, we can't access the private variable data alert("display (this.data): " + this.data);//will give "undefined" alert("display (data): " + data);//will throw an error }; //Now, let's demonstrate the differences between privileged and public methods window.onload = function() { var tst = new Objy(); tst.setText("yoyo");//will work tst.setData(999);//will work //********************** try { tst.display();//will partially work } catch(e) { alert("display: failed"); } //********************** try { tst.displayData();//will work. Privileged methods can access private members } catch(e) { alert("displayData: failed"); } //********************** }; NOTE: You can also have private methods but no private method is included in this example.Airshow
VIEWS ON THIS POST

66

Posted on:

Saturday 10th November 2012
View Replies!

iframe refresh using AJAX?

. I don't know how to use AJAX. Can someone please help me I'm using an iframe to display percentage of file uploaded. The iframe refreshes itself every 2.5 seconds. It's okay for now, but not a practical solution. I need iframe to refresh but, it shouldn't look like its refreshing (using AJAX). You can see a live example: http://mintload.com/upload/upload-single.php (Choose a sample file, click "Upload") Code for iframe fileprog.php (php+js):
VIEWS ON THIS POST

322

Posted on:

Saturday 10th November 2012
View Replies!

Multiple Submit Methods

Hi , In my attempt to learn javascript by jumping in with both feet, I have run into the following scenario: I have a registration form that requires different information based on a combobox selection. My thought was to resubmit the form with some special identifier when the combobox changes, then read this identifier with PHP and re-display the form with the proper fields. I have the combobox onchange event firing to a js function, which is currently submitting normally (I can't tell the difference between this submit and a normal user submit). I'm kinda stuck here. I guess I have the following questions: 1. Can I submit the form with some unique variable 2. How can I read this variable in PHP after the submit to know that I need to process it differently Am I on the right track
VIEWS ON THIS POST

39

Posted on:

Saturday 10th November 2012
View Replies!

Protect login against hackers

How do i protect a login against hackers and sql injection \t
VIEWS ON THIS POST

117

Posted on:

Monday 12th November 2012
View Replies!

Display contents of a div on external URL

So I'm trying to put a bit of javascript together to compliment some general monitoring systems we use at work. I have put together some simple stuff for running a slide show of graphs and stuff, but I also need to include a table of information from a page on a system called opsview. The problem is the page on ops view is roughly 40% rubbish that I don't need clogging up my nice clean UI. So any ideas as to a function that may accomplish this I was thinking it may be a good idea to use some kind of XML based extraction or maybe to use getElementById.innerHTML to strip everything out of the unneeded divs. Both of these solutions strike me as a little inefficient as they would involve loading the whole page each time and as the page will need to be refreshed every 18 seconds this might not be the best way. Any ideas for where I could go from here Any amount of searching has been fruitless.
VIEWS ON THIS POST

90

Posted on:

Monday 12th November 2012
View Replies!

Problem validating form

I am having problem validating form and then submit and my script seems ok but it does not works I am a beginner but want to learn as much as I can Help anybody
VIEWS ON THIS POST

94

Posted on:

Monday 12th November 2012
View Replies!

Quick Javascript/DHTML Question

I'm currently in progress of designing a web platform in regards to a personal project of mine, and came upon a frustrating conflict in my script. I am using DHTML windows and a CSS Fisheye Dock Menu, and when I click on a dock item to load a DHTML window, everything works fine, but whenever I click on the window itself to resize, drag, or close it, the fisheye menu ceases the fisheye effect. Anyone have any idea how to fix this, wow.. i'll take a look and reply as soon as possible
VIEWS ON THIS POST

65

Posted on:

Monday 19th November 2012
View Replies!

Is it possible to change the value of a variable using an event?

all. Well the topic pretty much sums up the problem. I'm pretty familiar with using events to alter the value of an html tag or attribute via the DOM. I was wondering if it is possible to use an event to alter the value of a variable within. Well I wrote the script below to test that and sure enough it didn't work. So if by some chance it is possible to use events to do alter the value of a variable, how does one go about that
VIEWS ON THIS POST

249

Posted on:

Wednesday 21st November 2012
View Replies!

Javascript onclick not working in IE

, I am having troubles with my form not working correctly in IE. I have onclicks for different parts of my site. I am trying to use onclick and divs to make this happen. Can some look at my code and help me out
VIEWS ON THIS POST

84

Posted on:

Wednesday 21st November 2012
View Replies!

Doesn't Read lastChild

When I test my page in Chrome, the Javascript Console tells me that it can't read the property lastChild of null. (line marked with "//error on this line") function openXML(file) { if(window.XMLHttpRequest) var xhttp = new XMLHttpRequest(); else if(window.ActiveXObject) xhttp = new ActiveXObject("Microsoft.XMLHTTP"); else { alert("Your browser does not support XMLHttpRequest. Click 'OK' to go back."); window.location = document.referrer; } xhttp.open("GET", file, 0); xhttp.send(0); return xhttp.responseXML; } function chldElmnts(prnt) { var chld = _1stChldElmnt(prnt); if(!chld) return 0; var cnt = 1; while(chld = nxtSibElmnt(chld)) cnt ++; return cnt; } function _1stChldElmnt(prnt) { var chld = prnt.firstChild; if(!chld) return 0; while(chld.nodeType != 1) { if(chld == prnt.lastChild) return 0; chld = chld.nextSibling; } return chld; } function nxtSibElmnt(sib) { var lstSib = sib.parent.lastChild; //error on this line if(sib == lstSib) return 0; sib = sib.nextSibling; while(sib.nodeType != 1) { if(sib == lstSib) return 0; sib = sib.nextSibling; } return sib; } //code var food = openXML("food.xml"); var cat1 = chldElmnts(food.documentElement); I've added alerts. They've helped me to figure this out. prnt == food.documentElement chld == prnt.firstChild //food.documentElement.firstChild sib == chld //food.documentElement.firstChild sib.parent should be food.documentElement sib.parent == null the only element that doesn't have a parent is documentElement \t
VIEWS ON THIS POST

113

Posted on:

Thursday 22nd November 2012
View Replies!

Jquery

I want the checkpassword function to be called after each letter is hit to check and display the results between the div tags after the 'retype password'. I've does this for two other textbox fields and it's worked fine, although somewhat different since I'm calling php scripts and returning the data. I need some guidance here. Is the text in orange even correct HTML Choose Password: Retype Password: Javascript function checkpassword(inputString) { if(inputString.length == 0) { $('#suggestions').hide(); } else { if($("#pwd1").val()==inputString){ //passwordresults [color=#FF9900]$("div").text("Match!");[/color] } else { [color=#FF9900]$("div").text("Not a Match!");[/color] } }; } // checkpassword
VIEWS ON THIS POST

57

Posted on:

Friday 23rd November 2012
View Replies!

learning ajax

hello i was recently studying how ajax work, problem is i followed some codes on the net and check if they work..they work on the site,but the time i tested those codes it wont work anymore..any ideasive tested js and it works on my browser... function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","hello.txt",true); xmlhttp.send(); } Let AJAX change this text Change Content btw the code above was gotten from a tutorial site.. i really wna learn ajax but first i need this to get running..any1 generous enough to help me..thnks
VIEWS ON THIS POST

279

Posted on:

Saturday 24th November 2012
View Replies!

If LEN = 1 then add a 0 : JS problem

, I am having a Javascript problem and any help would be apprecated. I am trying to test the input for if length = 1 then add on a 0 as this would mean if the user wanted 1.20 if would come out as 1.20 and not 1.2 as it is at the moment. I've tried concatenating the variables together and then putting them back into the variable but it still comes out at 1 decimal place. I am testing this on the form validation page, not the form processing page at current. if(cpence.value.length == 1){ cpence + 0;} Also trying testing it before it adds it to the database, but still no luck. if($pence.value.length == 1){ $pence . "0";} Many
VIEWS ON THIS POST

173

Posted on:

Sunday 25th November 2012
View Replies!

control session state using javascript

How can I perserve the session state of a SharePoint browser state using javascript
VIEWS ON THIS POST

90

Posted on:

Sunday 25th November 2012
View Replies!

Adding New Field Problem

Hi! I have this code that adds field when the user hit the "add new field" button. The problem here is, once you added an input field, then fill it out, then add a new field again, the info in the first field be erased. As how the code runs, you have to add all the fields that you want to fillout FIRST before entering you data in those fields. I believe its not logical to do that. So pls help me to modify this script. thanks! fields = 0; function addInput() { if (fields != 10) { document.getElementById('text').innerHTML += ""; fields += 1; } else { document.getElementById('text').innerHTML += "Only 10 upload fields allowed."; document.form.add.disabled=true; } }
VIEWS ON THIS POST

38

Posted on:

Monday 26th November 2012
View Replies!

popup called from a frame, accessing parent's obecjts

I have a container page with an IFRAME that is loaded with pages selected by the user. One of these pages calls a popup .. when the user is done with the popup I need to refresh of list ...
VIEWS ON THIS POST

124

Posted on:

Friday 30th November 2012
View Replies!