i know this:
$.getJSON(
"test.js",
function(json){
alert("JSON Data: " + json.users[3].name);
}
);
but i see the code in a site:
$.getJSON(l, {
tag: "userName",
userName: 'sss'
}
what is '1' mean,in this place.
thanks
...
I'm using the code:
var x = function() {return true;};
trying to set x to true, the return value of the function, but instead x is defined as the function itself. How can I set x as the return value of the function? I could easily code around this problem by using a non-inline function or some such, but it bugs me because I'm sure the...
Often I need to refer to code written in HTML/JavaScript/CSS, but it is a very awkward construction to constantly refer to the descriptive trio of 'HTML/JavaScript/CSS' code.
for example, Mozilla refers to its HTML/JavaScript/CSS JetPack code as 'a JetPack'.
Other than the defunct 'dHTML', what are some concise, generic and accurate ...
Why does this work (returns "one, two, three"):
var words = ['one', 'two', 'three'];
$("#main").append('<p>' + words.join(", ") + '</p>');
and this work (returns "the list: 111"):
var displayIt = function() {
return 'the list: ' + arguments[0];
}
$("#main").append('<p>' + displayIt('111', '222', '333') + '</p>');
but not thi...
Hey guys,
I am currently using prettyPhoto lightbox for my images and for some reason i cant get it to work. I know this is a very basic questions but some help would be appreciated. i found the script here:http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/
Additionally here is the page i am trying to get i...
I want to know how can I display a confirmation box when the users try to get out of the page, like this one here in StackOverflow when you try to close the "Ask Question" page.
Thanks you in advance.
...
Hi everyone. I'm new to JavaScript. I've developed a page using JavaScript in such a way that when I select a color it is applied to the whole page as a background.
I want to develop a page where I can change only the text color. It should get changed (from red to green or something like that), but the page shouldn't get refreshed, an...
I am trying to utilize the example cited here:
http://www.physicsforums.com/showthread.php?t=248191
I wrote a simple javascript that takes advantage of this example (or at least I intended it to), however, I'm totally bewildered by how it reacts to what I set as the angle. I'm EXPECTING it to behave where (assuming we use polar coordin...
Does sifr 3 works in all A-Grade browser if css, javascript is enabled and flash player is installed.
and which Flash player version is needed to see sifr 3 text in all browsers.
...
I have a select box as follows
<select>
<option value="yes">Yes</option>
<option value="No" selected="selected">No</option>
<option value="Maybe">Maybe</option>
<option value="So">So</option>
</select>
I would like
<select>
<option value="yes">Yes</option>
<option value="No">No</option>
<option value="Maybe" selected="selected">Maybe...
var c = false;
if(c=[] && c.length==0)alert('hi');
hi is not alerted because c is still false when it executes the second operand of &&, can someone explain how the boolean operands in if condition are executed and in what order?
...
Is there any Javscript (library) or any other solution, through which we can fix most of IE6 issues like png fix and also make IE6 to support CSS3 properties?
...
I am having editable div
I need to store the contents of that division into a mysql table.
which all events are available for a division?
is there any onBlur event for divisions?
...
hi everyone, I am displaying data in a table on one of my web pages. When the user clicks on a row, I want that row ONLY to change color. I'd settle for that cell. I have a css file referenced on the page with two styles, td_on and td_off, which have same settings except for the background colors. I put the "class" tag in the td like so:...
My JavaScript function is working but for some reason after the alert is displayed inside my IF statement the page re-loads/refresh and I do not want it to. Why is this and how can I change my function so that it will not do this?
My function
function valSubmit(){
varName = document.form1.txtName.value;
varSurname = documen...
While adding the parameters to get/post request they need to be encoded in application/x-www-form-urlencoded form. So do we need to encode values each time ? Does JavaScript have any method for that ? What are the possible caches ?
On server side when we read the values we do not decode them we directly say Request.Params["key"] and tha...
according to McAfee “Aurora” Exploit In Google Attack Now Public, and the exploit code referred should be here, any one can give a more detailed explanation how it works?
...
Hi,
I'm looking to create an extension for the leading browsers (firefox, safari and ie).
Its rather simple, and I'm looking for the most efficient way to go about this.
I need to get the hostname of the current site the user is on, and if it matches a certain parameter(eg, mysite.org), I'll need to append to the link some extra data a...
i have aspx pages with vb.net in the back. I need to use javascript to open a new window on page load. I am also sending a querystring (www.mysite.com/default.aspx?dest=register.aspx) from the previous page. I need the javascript to parse the querystring and open the new window only if the URL has a querystring.
please advice
...
Hello every one can any one help me out please?
by using this code my font size is go beyound the size of parent div
here
$(divid).resizable({
maxHeight: parseInt(200),
maxWidth: parseInt(180),
resize: function(event, ui) {
var width1 = parseInt(ui.element.css('width'));
...