javascript

window.onerror in Safari ( Javascript )

I create an error message its working with IE and Mozila. Not woking with Safari, Chrome and Opera. But I need to use it. Please give me right way for doing it. <script language="javascript" type="text/javascript"> window.onerror = function(msg, url, line) { document.write("Message\t = "+msg + "<br/>Location\t = " + url + "<br/>Lin...

Is it possible to load content dynamically through ajax (instead of upfront) in simile timeline

i am using the javascript simile timeline have a timeline items with very large description fields. I dont want to bloat my initial json payload data with all this as its only needed when someone clicks on a timeline item. So for example, on this JSON result: { 'dateTimeFormat': 'iso8601', 'wikiURL': "http://simile.mit.edu/shelf/"...

ASP.NET how to disable button on submit ?

I have forms with payment in ASP.NET site, when user clicks on asp:Button sometime he submits few times. I want to disable this functionality without harming current ASP.NET site ( by that i mean no fancy jQuery, unless it is very basic and will not interfere with ASP.NET built-in validation) thanks!!! ...

chrome/safari (webkit?) does not post values when submitting via Javascript .submit()

I'm submitting some of my forms with javascript/jquery. $("#myform").submit(); this works fine in Firefox, but in Safari or Chrome, none of my form values are posted. When I check the $_POST variable, in Firefox it's filled up correctly, but on safari/chrome the $_POST values are empty. I submit like this when the dialog's OK button...

javascript disable table row and its content

I am try to disable some particular rows in a html table,by using rowObject.disabled=true; but it does not seems to be work?in each row some 5 columns are available(it contains radio and textboxes)...how can i do this? many thanks ...

How to send array datatype to server?

I am using PHP as server side coding, and i want a set of values to be send to the server(in array format). how can i send that, and retrieve that array value at backend? ...

browser extension to replace JavaScript file on a live site for testing

I'm looking for a browser extension (Firefox, Chrome) allowing to replace a Javascript file on a live Web site to do some testing/hacking. Basically, it should take a URL and load another one instead (locally or on a HTTP development server). Any idea? ...

Validation to check if password and confirm password are same is not working

Here's my code: function validate_form(thisform) { with (thisform) { if (validate_required(name,"Name must be filled out!")==false) {name.focus();return false;} if (validate_required(country," Country must be filled out!")==false) {country.focus();return false;} if (validate_required(state,"State must be filled out!")==f...

[Javascript]Get coordinate from openlayers map

Hi, I would get the coordinate from an openlayers map. When I open my page I would that when I click on a button, I have received the coordinate of top bottom left and the upper right. <html> <head> <title>OpenLayers Example</title> <script src="http://openlayers.org/api/OpenLayers.js"&gt;&lt;/script&gt; </head> <body> ...

Multiplayer game with Javascript backend and frontend. What are the best practices?

I'm thinking of creating a web multiplayer game in Node.js. This means I'll be using the same language in the backend and in the frontend. It would be in realtime and about 20 people max in each 'room', so I have a few thoughts: How do I compensate for the delay among all users so that everyone sees the same thing the same time? I'm th...

How to do this trick in 'CallServer' method in Implementing Client Callbacks Programmatically Without Postbacks?

From this example we can call back server from JavaScript without post back , but i want to make CallServer method to return the result and i try it as below string callBackReference = Page.ClientScript.GetCallbackEventReference(this, "arg", "function(result) {alert(result);response = result;}", "context", "function(result) {resp...

Can't make all elements of a class appear after delays

I'm trying to make all the elements of a certain class show, but each after a delay. This code shows all the elements instantly, but I want to wait 1 second between each. $('.notify').each(function(index) { $(this).fadeIn('slow'); }); I've tried using setTimeout but it 'loses' the element variable (the one called 'this'). I've al...

Getting Spring MVC Relative path

I am using Jboss and Netbeans to create Spring MVC web application on windows. it runs on http://localhost/myapplication/ My project path is D:\Myapplication\ My JSP Views are in D:\Myapplication\web\jsp\ My Javascripts are in D:\Myapplication\web\js\ Controllers are in D:\Myapplication\web\src\java\controller\ I have created 1 cont...

PhoneGap Android

hi, I am new to phonegap and android , i wanted to know how to access/make database through javascript. and the second thing i want to ask is how to make Graphs just using html, css and javascript. Every information is thankfully accepted. ...

file upload problem with browser

hi var file_upload=document.getElementById('picture-upload').value; The code returns diffrent values in two browsers. in firefox,ie returns 'filename.ext' example: test.jpg but in opera returns 'fullpath\filename.ext example:C:\fake_path\test.jpg Is any one knows the problem ...

Set data on text nodes in IE with javascript

Hi, i have created a script to associate data to dom nodes, something like the jQuery.data method. Basically the script sets a property on the node that is the key of an object that will contain the data of every node, but in IE 7 setting a property on a text node throws an error: var a=document.createElement("div"); a.test="test"; aler...

Js, is it really better to include at the end of the page?

Currently I'm doing this. <js> </head> Pagespeed and other articles suggest doing this instead. <js> </body> </html> I would love the opinion of stack overflow! Thank you ...

Error with XSL validation of Javascript

Hello, I am getting validation errors such as: "No processing instruction starts with 'xml...." when I try to validate my code before I put it into the 3rd party app I'm using. How do I send a soap message with Javasript that is embedded on an XSL page without getting this error ? Here is the code in question: <script language="javascr...

Do JavaScript problems break the browser?

I'm running Google Website Optimizer, and its executing client-side cookie checks to show content just once. However, when they're cookied, I get a javascript error that doesn't SEEM fatal, but I've read that 1 js error is enough to totally break Internet Explorer. the line of code in question is <script>utmx_section("Blah")<...

how to show image loading gif using jquery

can ny one suggest how to do show image loading gif when image is loading in runtime using jquery. ...