javascript

Ruby plugin for web browser?

Am I correct that if someone wrote a Ruby plugin for a web browser and a user installed that plugin then it would be possible to replace javascript with ruby on the frontend? Aren't there any plugins for this? Or even for using other languages than javascript on the browser side? ...

jQuery bug in IE when selecting Jeditable select boxes.

I'm making an intranet application and experimenting with the Jeditable plugin for jQuery. The following function makes an element (in this case a td element) clickable, which then turns it editable (again in this case selectable, as it's a select box) and checks a key listener to see if tab or shift-tab has been pressed to activate the ...

Find Usage/Declarations in a directory Netbeans 6.9 Javascript

How can I setup Netbeans to search all .js files in the same directory for declarations and/or usage? I am just getting my feet wet with Netbeans 6.9 for the first time. As far as I understand, one can't make a pure Javascript project ( http://stackoverflow.com/questions/2926379/pure-javascript-projects-in-netbeans ), thus I set up a du...

How to select/query effectively 70,000 json data?

I'm now developing javascript library which consists 70,000 more villages in Indonesia (accessible at http://bisbak.com/regina/) and I build a data browser widget. Everything is fine in Safari and Firefox. But when using Chrome, it always takes long when I happen selecting a district (which automatically loads villages). The code to retr...

How can I make a program wait for a variable change in javascript?

I want to force a JavaScript program to wait in some particular points of its execution until a variable has changed. Is there a way to do it? I have already found an extension that is called "narrative JavaScript" that force the program to wait until an event to happen. Is there a way to create a new event, a "variable change event" for...

HTML book-like pagination

How can I split the content of a HTML file in screen-sized chunks to "paginate" it in a WebKit browser? Each "page" should show a complete amount of text. This means that a line of text must not be cut in half in the top or bottom border of the screen. Edit This question was originally tagged "Android" as my intent is to build an And...

Parse Greasemonkey metadata and/or grab comments from within a function

function blah(_x) { console.info(_x.toSource().match(/\/\/\s*@version\s+(.*)\s*\n/i)); } function foobar() { // ==UserScript== // @version 1.2.3.4 // ==/UserScript== blah(arguments.callee); } foobar(); Is there any way to do this using JavaScript? I want to detect the version number / other attributes in a Greasemonkey...

Splice method does not remove array

Hello all, I have a javascript that has custom indexes, I created them like so: var rand = event.timeStamp; //jquery on click event object freeze_array[rand] = month + ',' + model_name + ',' + activity; To remove the above element I have this: freeze_array.splice(rand, 1); But this does not remove the element as I can see it in ...

Best practice for rails-javascript interaction?

hi, I have a page which shows a Google map. I'd like to use Javascript to fetch several points from my database and place them as markers on the map. So the flow is: Javascript calls a Rails action with parameters. Rails queries the database. Rails returns the response. Javascript updates the page (Rails can't do this since it must be...

Display DIVs over iFrame containing Flash

Hi all! I have a some trouble with iFrame. Basically, I have drop down basic CSS menu and right underneath it I have iFrame with flash from external website. Unfortunately whenever the menu drops down it goes underneath the iFrame. Is there a way using jQuery , JavaScript or CSS to prevent the menu from disparaging behind the iframe...

Validate one button is clicked before another with Javascript

This is in ASP.NET. We are using a ExtJS frontend, and have our own VB.NET controls to make all the Ext Forms and stuff. However, I hope this can be done in plain javascript. There is already some Javascript on the page for the 'Test Connection' button click and handling the result. However, I need validation on the screen to make sure ...

how to refer xml file from client side application which is generated by webservice

This is my code on the webservice which sucessfully creates the xml file and saves at particular destination folder. public bool GetList(string keyword1, string streetname, string lat, string lng, string radius) { XmlDocument xmlDoc= CreateXML( keyword1,streetname,lat,lng,radius); xmlDoc.Save(@"C:\Documents and Settings\block\Bloc...

Where is the syntax error in this bit of JavaScript?

Error from firebug: missing ) after condition [Break on this error] else if (($(this).parent...nt().hasClass('plaing')==true) ) { The code: $(".myButtonPlay").live('click',function(){ if ($(this).parent().parent().hasClass('current')==false){ console.log($(this).children().attr('src')); var media=$(this).parent...

Checking inside of the div tag with innerhtml in javascript?

hi fellows im trying to make a registration form with ajax validation check. validation check is OK. i make it show a cross.png image when there is a problem about a field on the form. but what i wanna do next is to not let visitors apply the registration form when there is problem. i tried to check for errors by if(document.getElemen...

jQuery tabs, dynamically binding to click event on currently selected tab

I'm trying to bind to the click event of the currently selected tab with jQuery tabs. I'm dynamically creating tabs so I need to do live binding. The idea is that I want to reload the current tab if it's clicked on again. I tried binding in the select event, but it seems this event doesn't fire for click on the already selected tab. I ...

nested checkboxes with JStree

Hello. I am trying to replicate the behaviour of the nested tree list of checkboxes in the following link using the JStree Jquery module - http://www.blueshoes.org/_bsJavascript/components/tree/examples/example3.html JStree - www dot jstree dot com I've swiped the callback behaviour below from another post on the subject, but haven't...

Firefox element height issue

I am creating a table dynamically based on the number of rows returned from the server using struts. The table is created properly and I am trying to get the height value on the created table using any of the following: document.getElementById('elementId').offsetHeight jQuery("#elementId").css('height') jQuery("#elementId").height() I...

What is the code for an rss reader that only accesses local content?

I need an rss reader for viewing feeds on our Intranet. The only rss readers I've found can only read web based feeds. I want to place the rss reader within an <iframe> or <object> within my page. ...

Avoiding Nested Anonymous Functions in JavaScript / Sencha Touch / ExtJS

I've started using the Sencha Touch / ExtJS JavaScript framework and have am noticing a wide use of nested, anonymous functions. For example, this is a common way to start your app: Ext.setup({ blah: blah, onReady: function() { my fairly long startup code } }); It's been a while since I...

How to take text from one place then render at other place on same page?

<div id="default"> <h2> heading </h2> <div id="big-on-hover"> <h2> heading </h2> I want to render the text of h2 of <div id="default"> in <div id="big-on-hover"> because both will be same always so I will change at one place it will show all other places also. ...