javascript

Is there some good javascript grid that can be filled using ajax?

I need a grid that can be filled using ajax. I need to sort, filter and select. Thanks! ...

Trying to select a specific node with Dojo

I'm trying to select the text from the name attribute of the anchor element of the last Comment div in the Comments div (i.e. comment_3037) How can I select it? Here's my html: <div id="Comments"> <div class="Comment"><!-- last "Comment" element in the div --> <a name="comment_3037"></a> <a href=""><img src=""></a> ...

Javascript/Ajax error help in Internet Explorer

I'm building an e-commerce site for a client, and for some reason in Internet Explorer when I click the add to cart button, the shopping cart messes up the quantities added into the cart. I think for some reason IE is refreshing the page, causing the quantities to double, I just can't figure out how to fix it. I would greatly appreciate ...

what is the code example site about 'Safari DOM Extensions'.

see this: http://developer.apple.com/safari/library/documentation/appleapplications/reference/SafariJSRef/index.html#//apple_ref/doc/uid/TP40001482 they are : CSSRule Additions Document Additions DOMApplicationCache DOMWindow Additions GestureEvent HTMLAudioElement HTMLMediaElement HTMLVideoElement Touch TouchEvent TouchList WebKitAni...

Browser actions outside the viewport

If an iframe loads a page containing a javascript ticker, but the ticker is outside the viewport, will a browser still waste CPU on running the ticker? ...

Javascript function execution on link click?

Hi there, I have a link, that when a user clicks on it, it loads a different page as normal but also executes a JS function that autofills a specific text-box on that different page. Is it better practice to use Jquery or Javascript to do this? How can I do this using either one of them? ...

Writing to a non-unique div with Javascript

Hi everyone, <div class="aList"> <div class="theTitle"></div> <div class="theContent"></div> </div> I'm building a multi-feed RSS reader for school. aList is the div that encompasses each individual feed (the amount of feeds will fluctuate). theTitle is the div that will be filled with the attribute of the current feed. Additional...

document.onclick vs window.onclick

Is there any difference between document.onclick and window.onclick event? Thanks. ...

Check if Internet Connection Exists with Javascript?

How do you check if there is an internet connection using Javascript? That way I could have some conditionals saying "use the google cached version of JQuery during production, use either that or a local version during development, depending on the internet connection". ...

List of evented / asynchronous languages

I'm working on a system than has to be pretty scalable from the beginning. I've started looking at / playing around with asynchronous/evented approaches to writing serverside code. I've played around with both ruby's EventMachine and node.js. EventMachine is cool, but doesn't have asynchronous file I/O, which I need. The interface is ki...

Javascript code as a variable

Ok, this may sound a bit crazy but hear me out :) I would like to do the following in javascript: define START_OF_EVERY_FUNCTION = "try {" define END_OF_EVERY_FUNCTION = "} catch () {}" function TEST () { START_OF_EVERY_FUNCTION // rest of function END_OF_EVERY_FUNCTION } Basically, can I define a list of javascript li...

Store JsTree order back into database

Hi I am using JsTree and got some of it working with my database. Such as deleting a node, renaming a node, etc. I am having problems with saving the ROOT folders order back to the database. When I move the root folders, it doesnt save order. When I move the sub folders around, it saves order fine. Anyone know what I am doing wrong? I ...

All my index.php files on my website got hacked

All index.php files on my website got hacked with the code injection in the body tag, see below. Does anyone know how they did it and if there is way to look for it how prevent it? echo "<body><script language="javascript">try { function BwrLMVnkPmRbZYpfwLH(MLJOynjaY){var iMgpLZHO="",aVwbJg,oKONbIZB,gdGJUWTs,siAOty,hPaiwMZ,NxynbqCA,VxXq...

Global javascript exception handler (in Chrome)

How do I overwrite the global Exception handler in javascript so that it becomes the top level handler for all uncaught exceptions? EDIT: window.onerror didnt work, code is: <HTML> <HEAD> <script language='javascript'> window.onerror = function (em, url, ln) { alert(em + ", " + url + ", " + ln); return false; ...

Disable Highlighting in Google API WebSearch Result Title

Hey Everyone, I've been using Google Web Search API but the searched keyword is coming highlighted - with b tag- in the title property of the return object. I thought webSearchControl.setNoHtmlGeneration(); could work but didn't change anything. I know how to deal with other ways but is there any ways Google API provides to avoid any ...

JavaScript problem with IE

I built a site about 6 months ago now and designed a menu with some interactivity using jQuery. It worked great in my friends (Firefox, Safari, etc). Turns out that now IE7 & 8 are not playing ball. The error in IE points to jQuery (on Google's CDN) with invalid argument. The page can be viewed here. Move your mouse over the top heade...

Two different actions on form submit

Hi, I have a form with a submit button. I have called a function on click of submit button. function actionPage(form1) { form1.action="action1.php"; form1.submit(); return(true); } Now i want that the form data should be submitted to two different pages. These pages are on different servers. I know that we can send the data to...

Html Canvas Resizing And Coordinate Space

Note: I'm using Google Chrome Currently I have this test page http://www.evecakes.com/doodles/canvas_size_issue.htm It should draw a rectangle right below the mouse cursor, but there are some really weird scaling issues which is causing it to draw at a varying offset. I think it's because the canvas coordinate space is not increasing ...

load a page or video in to the dialog box

Helo, Can you please explain the line in this code // Load rules in to modal $('#rules .text').load('rules.html'); as i want to load a page or video in to the dialgue box. ...

Dynamically adding members to a javascript object

I'm working on a scoring script for contract bridge, just for giggles. I'm storing the game as an object: var game = { team1 : { player1 : prompt("Team 1, first player: "), player2 : prompt("Team 1, second player:") }, team2 : { player1 : prompt("Team 2, first player: "), player2 : prompt("Team 2, second player:") }, } functio...