javascript

Great Eclipse Set-up for PHP Development

I use Eclipse PDT, Subclipse, viPlugin and JSEclipse for my PHP and JavaScript development. This gives me quite a nice environment, but I wonder what else is out there that might be even better. What plug-ins have you installed into Eclipse to create your great set-up for developing using PHP and JavaScript? Which features do you find m...

computing a cross-browser iframe height

One of the most difficult problems in my javascript experience has been the correct (that is "cross-browser") computing of a iframe height. In my applications I have a lot of dinamically generated iframe and I want that all do a sort of autoresize at the end of load event to adjust their height and width. In the case of height computing...

ASP.Net AJAX uses syntax like $get('myId'), is this standard Javascript or JQuery?

It doesn't look like basic javascript but nor can I use JQuery commands like $('myId'). Is this or similar functions documented anywhere? For reason I don't want to go into, I am not able to use 3rd party libraries like JQuery but if some powerful javascript extensions come with asp then I would like to know about them. ...

How to indicate public/protected/private members in JSDT outline view?

Javascript Developer Tools (JSDT) for Eclipse provides a nice outline view of Javascript classes, with a little symbol next to them to indicate visibility. Looking at Preferences->Javascript->Appearance->Members Sort Order, it seems able to indicate whether a method is public, private or protected, but all of my use the "default" marke...

How to list the properties of a javascript object

Say I create an object thus: var myJSONObject = {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"}; What is the best way to retrieve a list of the property names? i.e. I would like to end up with some variable 'keys' such that: keys == ["ircEvent", "method", "regex"] Thanks. ...

Consuming a Web service using Javascript

Is there a way to consume a web service using Javascript? Looking for a built in way to do it, Javascript framework is not an option. Thanks, RWendi ...

How to remove a property from a javascript object

Say I create an object thus: var myJSONObject = {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"}; What is the best way to remove the property 'regex'? i.e. I would like to end up with myJSONObject such that: myJSONObject == {"ircEvent": "PRIVMSG", "method": "newURI"}; Thanks. ...

Webform checkbox value in javascript

Hi, I have a checkbox list control on my asp.net web form that I am dynamically populating from an arraylist. In javascript I want to be able to iterate through the values in the list and if a particular value has been selected to display other controls on the page. My issue is that all the values in the checkbox list are showing up ...

How to interact with embedded PDF documents in iframes through JavaScript?

How to interact with embedded PDF documents in iframes through JavaScript? Is it possible? Is it possible in every main browsers? if "yes", how can I... ...know that the document finished loading? ...trigger the print dialog? ...configure the zooming? ...configure the toolbars? ...

jQuery: How to stop a helper from being removed if it wasn't successfully dropped.

I have a draggable with a custom helper. Sometimes the helper is a clone and sometimes it is the original element. The problem is that when the helper is the original element and is not dropped on a valid droppable it gets removed. My solution looks like this so far: in my on_dropped callback I set ui.helper.dropped_on_droppable to true...

Why does a checkbox remain checked in FF3 but not in IE, Chrome or ...

So - I have a checkbox <asp:CheckBox ID="chkOrder" runat="server" Visible='<%#IsCheckBoxVisible() %>' Checked="false" OnCheckedChanged="chkOrder_CheckedChanged" AutoPostBack="true" EnableViewState="false"></asp:CheckBox> the one above. Now, the checkbox is in a gridview and on databound - for all the rows in the gridv...

What are advantages of using google.load('jQuery', ...) vs direct inclusion of hosted script URL?

Google hosts some popular JavaScript libraries at: http://code.google.com/apis/ajaxlibs/ According to google: The most powerful way to load the libraries is by using google.load() ... What are the real advantages of using google.load("jquery", "1.2.6") vs. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/lib...

Browser & version in prototype library?

I am used to using Atlas. Recently i have started transitioning to jQuery and sometimes prototype. The project that i'm currently working on is using prototype. In Prototype, is there an easy way to get the browser name and version? I've looked over the API documentation and can't seem to find it. ...

Good JavaScript IDE with jQuery support

I'm planning to start learning jQuery (among other things), so I'm looking for a good Javascript editor that can preferably provide some of the following features: Syntax coloring Contextual help for standard JS functions, jQuery functions and possibly custom ones Some code completion (optional) JS debugging Is there such an editor o...

How to make Dojo a bit more lightweight?

I've been looking at Dojo, and it has some nice tricks, however its quite huge IMHO. Basically when viewing my test my slow machine (600mhz), just loading Dojo was kind of painful, and can imagine lots of mobile devices will also not be happy with it. Is there a slim version or something like that available? ...

JQuery: has a button been pressed again within so many milliseconds..

Hi, I'm writing a web application that decodes Morse Code that is tapped in using mouse button. I originally did a proof of concept using conventional JavaScript, but now I'm redoing it using jQuery. Is there a clever way with jQuery to tell if a button has been pressed again within so many milliseconds, or not - and run some jQuery c...

Javascript registering event to object

Hello all, I have an activex object I loaded into an html page. I then use that activex object to create another object, but I need to register an event with the new object created. The object is expecting an event listener of a certain type. I can load this same dll in c# and it will work fine. Code looks like this for c#. upload =...

What are some JavaScript Unit Testing and Mocking Frameworks you have used?

My main JavaScript framework is jQuery so I would like my unit test and mocking frameworks to be compatible with that. I'd rather not have to introduce another JavaScript framework. I am currently using QUnit for unit testing and Jack for mocking, but I am pretty new to the whole unit testing of JavaScript. Does anyone else have a bett...

Non-Standard Attributes on HTML Tags. Good Thing? Bad Thing? Your Thoughts?

HTML (or maybe just XHTML?) is relatively strict when it comes to non-standard attributes on tags. If they aren't part of the spec, then your code is considered non-compliant. Non-standard attributes can be fairly useful for passing along meta-data to Javascript however. For instance, if a link is suppose to show a popup, you can set th...

How do I prevent a jQuery Selector from including nested elements?

I'm new to jQuery so hopefully there is an easy answer to this. I have html similar to: <table id="dataTable"> <tr> <!-- I want this row --> <td>...</td> <tr> <tr> <td> <table> <tr> <!-- I do not want this row --> <td>...</td> </tr> </tab...