Hi I'm quite new to JS and jquery.
Im having a problem accessing the properties of an object returned from the jquery ajax method.
As you can see in the code below I'm trying to use the properties of the object 'data' in the success call back function to create a table row, which I then try and add to a table.
$('#add_comp').submit(f...
$('.updateDescriptionProduct').click( function() {
if ( updateProductDescription(productID, description) == 'true') {
alert('success!');
} else {
alert('did not update');
}
});
function updateProductDescription(productID, description) {
$.ajax({
url: '/index.php/updateProductDescription',
global: false,
...
Possible Duplicates:
Is it reasonable to assume my visitors have javascript enabled?
How many people disable JavaScript?
I know that JS should only be used to enhance functionality and users with JS disabled should still be able to use your website. But how often does that really happen nowadays? A majority of modern "Web 2....
I'm tryig to create a array named status in my javascript, but it is not working in Google Chrome.
<html>
<body>
<script>
var array = [1, 2, 3];
document.write("Type of [" + array + "] : " + (typeof array) + "<br />");
document.write("Value of array.length : " + array.length + "<br />");
...
I need to display a page inside of a page, like an iframe, but using jquery. The pages are not on the same server.
The main page is a html page inside of a cms and the page that needs to be nested is a media page with lists of images or audio files, that is located on another server. The heights will vary on the media pages, so I kinda ...
I am pulling an address from a database and plotting it in a map. However, if the marker is dragged to a new location, I need the NEW geocode at "dragend" to be stored in the database.
any ideas on the simplest way to accomplish this?
...
I have been searching for a JavaScript "Find In Page" tool to place in a HTML file so that when I enter a search term and click submit, the script will search a TEXT file of my choice and find a match on the text page for the entry submitted. Can someone give me a hand? Thanks.
...
Hi All,
I'm trying to enter a javascript competition where the script has to be <= 1kb in size. Minifying and eval is allowed, so I've run it through google's closure compiler (which does slightly better than any others I've tried).
But I've found that if I convert the script to a string, and replace long words like 'function' and 'ret...
catch google.maps.Marker.prototype.setPosition calls
(function(){
var setPos = google.maps.Marker.prototype.setPosition;
google.maps.Marker.prototype.setPosition = function(latLng){
console.log(["setPos", latLng]);
setPos(latLng);
};
})();
return error
this.set is not a function
http://maps.gstatic.com/intl/cs_ALL/mapfiles/ap...
I'm trying to write a recursive method which may take a array/value as input and then process the input.
<html>
<body>
<script>
function process(array){
if (array instanceof Array) {
for(i=0; i < array.length; i++){
process(array[i]);
}
} else {
document.write(array +...
hello, i just want to ask if where can we find the code that will display the world clock just like this one LINK that doesn't depend on my computer time..
is there any plugins for that? or a function that i can simply call.. ?
any help will be much appreciated..
...
Title says it all. Why does
if (prev = this.Prev()) {
...
}
work but
if (var prev = this.Prev()) {
...
}
does not? this.Prev() is a method for a Point object which returns a reference to a previous Point if it exists, and false if it does not. I don't want to declare the variable to be global, and I don't want something ...
I have a JavaScript file highlight.js which highlights all strings within a given document class with a certain background color. eg.
$("div").highlight("the")
This highlights all occurrences of "the" within all divs with a yellow background.
I am writing a web application; which needs to open an link to an HTML page and automaticall...
Hi I was wondering if there is a limit to the number of divs that are allowed on a web page?
For example will Internet Explorer start to choke when it has to render a webpage with a thousand divs?
...
I am learning jQuery right now and am looking to validate form fields with it.
The registration form in question is at http://taehee.pumpl.com/register.php
The basic code for the form field I made is:
<div id="register">
<form action="">
<fieldset>
<legend>Register</legend>
<ol>
<li><label f...
This is some Javascript added on an .aspx page:
<Head>
<script>
function SayHello()
{
alert('Hello');
}
</script>
and here is how I am calling it from code:
protected void Page_Init(object sender, Eventargs e)
{
Page.ClientScript.RegisterStartupScript(Page.GetType(),"script","SayHello()",true);
}
The problem is that the Ja...
Hello expert,
please check this file
http://www.findmyshift.com/scripts/minified/4.1.1518127339_-603332839.js?20100812231650
The script is written in an interesting method,Could you please explain how this is done ?
Anyone can explain how a simple function can write in this method ?
Thank you
...
I've had trouble with people jumping to conclusions about what I need here, so please read this and think about it before answering.
Here is the case:
You have an incoming object. You do not know the structure of this object. You do however have a "target" to something in the object. So let's pretend there is myObject, and you have som...
I need to do a lot of regex things in javascript but am having some issues with the syntax and I can't seem to find a definitive resource on this.. for some reason when I do:
var tesst = "afskfsd33j"
var test = tesst.match(/a(.*)j/);
alert (test)
it shows
"afskfsd33j, fskfsd33"
I'm not sure why its giving this output of original a...
After calling the server and turning the data it returns into a table. I insert it into the page using jQuery's .html() syntax. After that the data appears in the page but I can't manipulate it using jQuery.
heres the code:
<html>
<head>
<title>testJavaScript</title>
<script type="text/javascript" src="jquery-1.4.2.js"></scrip...