javascript

Wait message for slow JSF page

I have a jsf page having a request scope bean. A slow database query is fired in the constructor of the request scope bean. Then, the results of the query are shown in a jsf data table on the web page. How do I display a wait message until the database query completes? I tried calling a javascript function for onLoad of tag. The metho...

Posting JSON string using dojo.xhrPost

Hi, I am having an issue trying to post a JSON string using dojo.xhrPost to a Zend Framework Controller. When I post the string to the server I get no data being sent. I've even tried just sending "A Test string", even that is not being sent. I've done a var dump to see the contents of the request but clear as day, there is no para...

Can I intercept a function called directly?

In this code I created a function called someFunction. Then I modified Function.prototype.apply and call methods. So instead of my function code is working I am running my interception code (which shows an alert). But neither "call" nor "apply" intercepts direct method call. Is it possiple to intercept this? Function.prototype.call...

php javascript upload file

hey there web experts, I use this upload tutorial to upload files. I decided to place my uploader in drupal, so in order the make a custom page, I made my upload page inside a iframe. All working fine, just when upload finished the method stopUpload is not called. Can you help me with that please? ...

Google Visualization from Spreadsheet

I've set up a map and chart visualization from a google spreadsheet (see at charcoalproject.org/resources/charcoal-index). Currently the google spreadsheet link for the visualization defines a specific range of cells to include because I have columns/rows that I do not want shown in the map/chart. I add new rows to the spreadsheet occa...

Javascript / AJAX - Send Data to Server w/o Headers?

JS - Is there a way to send data to the server backend without headers? ...

Getting values from location

I need to get the search query from the search query of the address of the page. What is the safest cross-browser, and most efficient method of getting the string. for example: q=123&data=true&b=456 //from http://www.example.com/?q=123&data=true&b=456 And is location.search available on all modern browsers (IE7+, FF, webkit, ...

Slideshow not working in IE for Windows

Any idea as to why this is happening? Works in Chrome, and Firefox but not in IE. Is there a script I can use to fix this? Problem: http://www.isomham.com/TEST/hospitality/hamptoninn-murrellsinlet.html ...

javascript inheritance - from abstract idea to actual code

Hi, i know how to inherit in c++, vb(6-shame on me), and php I saw many examples and tutorials about it regarding javascript. but no simple explanation about it. What i need is an starting point that will leave me with the need to learn "just" the syntax and usage. hope i am clear enough. thanks ...

Complicated issue in breaking out of an iFrame and loading the 'return url'

Hello All I've the following issue using iframes. I've an iFrame 'frameParent'. Inside frameParent i've a page 'parentPage.aspx' with several links in the format http://test.aspx?pageURL=http://something.aspx?returnUrl=http://domain/parentPage.aspx So when you click the link test.aspx gets loaded inside frameParent. Inside test.aspx...

Drawing over an image using Raphael.js

Can I put a Raphael.js canvas over an IMG element? What should I do make this layout work? ...

iframe.contentWindow on IE8?

I have an element on page: <iframe vspace="0" hspace="0" style="overflow-y:auto;overflow-x:auto;word-wrap:break-word;border:0px;" id="some-iframe"></iframe> and I'm trying to get contentWindow property of this frame using the following javascript: document.getElementById('some-iframe').contentWindow It's ok under at least ...

Javascript for loop trigger action when run

Well i have a simple for loop function issue is that i want the page to reload once done but what happens sometimes is that the page preloads before the loop has been fully run which makes the script not behave properly it's like this at the moment: for (loop condition) { action } window.location.reload(); but as i just mention...

Code review: Cross site scripting DOM load event, could this be cleaner?

Source on Github: http://github.com/tschellenbach/Fashiolista-Button/blob/master/buttons.js Blog post explaining the code http://www.mellowmorning.com/2010/08/03/creating-your-own-diggfacebook-liketweetmeme-button/ The current dom load version is rather verbose. I need the domload event because the code detects all a[href] elements i...

jQuery ajax function return

I have this function that embeds flash : function embedswfile(target, swf, base, width, height) {//dosomething} And I want to call the function like this embedSwf("flashgame",decode("<?=base64_encode($path['location'])?>"),decode("<?=base64_encode($path['base_directory'])?>"),"800","600" ) The idea is that whenever someone looks f...

Javascript widget (similar to Facebook Like) script vs Iframe approach

When building a social bookmarking button widget for usage in other websites there are a few challenges. We just recently opensourced the clientside aspects of this. (blog post here: http://www.mellowmorning.com/2010/08/03/creating-your-own-diggfacebook-liketweetmeme-button/) Basically the goal is to replace the chosen elements love it ...

JavaScript | Detecting the WebKit over Browser/Phone Type

Is it possible to detect the web-kit engine (ie iPhone, Android, BlackBerry6) rather than detecting each phone or browser individually? ...

jQuerys $.data() vs. DOM Object property

Hi folks, I recently needed to append some data to dynamically created LI elements. In my first instance, I used .data() in a way like var _newli = $('<li>foobar</li>'); _newli.data('base', 'ball'); // append _newli to an `ul` that.. was terribly slow. This logic happens in a loop which can easily grow up to 500+ items, it took ages!...

Web iPad app - how to differentiante between one- and two- finger scrolls.

Doing Web app for iPad clients, but need to recognize where user is doing one- and whe two-finger scrolls. Anybody know how to implement it? Any convenient jQuery plug in or something? Thanks. ...

Method execution from Javascript of a JavaFx applet function.

Hi, I've got a JavaFx applet running in my web application. This applet has several functions that I want to invoke from my web page, so I have some buttons that execute methods inside the applet. Those work fine, all but one of them. This one has to invoke a hessian service in the server to retrieve some data. I've debugged it and I've...