javascript

Alternatives are there to jQuery that work in the same or similar way

I'm looking for alternative JavaScript Libraries to learn as an alternative to jQuery, as I think it would be good to know more than one and so i can broaden what libraries I know. I'd tried Mootools so far but am not sure what else is just as good. Any ideas? ...

jQuery element variable doesn't seem to be accessible?

So I get a set of form elements that I want to extract the values from, by using var inputs = $("input.row_2"); inputs[0].val() When I run this, I get told that val is not a valid method. What am I doing wrong? Should be an easy one.. Thanks! ...

Why do I see javascript arrays getting created with string.split()?

I see code like this all over the web var days= "Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "); Why do that instead of var days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; I don't think laziness or ignorance has anything to do with it. This is out of jQuery 1.4.2 props:...

Check if certain row in textarea is empty

How to check if certain row in textarea is empty? ...

'checked' is null or not an object - only IE

Hi This problem exists only in IE browser, in mozilla its working fine... i have to delete a row on click on checkbox.... Here is my code : <table width="100%" id="seller"> <tr id="row_1" class="row"> <td><input type="checkbox" name="delete_seller" id="delete_seller" value="1" /></td> </tr> <tr id="row_2" class="row"> <td><input type...

Javascript: add iframe element after page has loaded

Using Javascript I need to find the best way to add a iframe element that is: Completely hidden from the user. Created after the page has fully loaded. i.e. Should be completely unobtrusive to the user and not affect loading of images and other scripts etc, in any way. ...

Looking for resources to explain a security risk.

I've a developer which has given users the ability to download a zip archive which contains an html document which references a relative javascript file and flash document. The flash document accepts as one of it's parameters a url which is embedded in the html document. I believe that this archive is meant to be used as a means to tran...

jQuery Drawing Plugin

Camarades, You'd know me identify good libraries (preferably in jQuery) to work with "Canvas" and drawings in javascript / html. I want to make my page more interesting, especially in some registries (registry of cars) and would like to draw a car and be able to go changing the number of wheels for example. Many thanks for any help. Su...

Can anyone advice me some HistoryManager( to use with AJAX ) to use with MooTools that will handle browser back and forward buttons ?

I've tried to use http://digitarald.de/project/history-manager/ but whether it doesn't work with mootools 1.2 whether i'm writing wrong code :( ...

jquery, list div-box above by clicking a button.

hi, i've got 20 div-boxes in a list [ div 1 ] [ div 2 ] [ div 3 ] and so on. every divbox should contain a button to change position with another div. one for up, one for down. [ div 1 <+><->] [ div 2 <+><->] [ div 3 <+><->] when i press the <+> in divbox 3, the divbox#2 and #3 should change places.... like it would by add the ...

determine if a restaurant is open now (like yelp does) using database, php, js

i was wondering if anyone knows how yelp determines what restaurants are "open now"? i'm developing a similar application using html/javascript/php. i was going to have a column in my database for each day, with comma separated hours written in "2243" format (10:43 pm). so for example if a restaurant is open for lunch and dinner it might...

With (or similar) statement in JQuery

Very simple question: I want to optimize the following jQuery code with maximum readability, optimal performance and minimum fuss (fuss = declaring new variables etc): $(".addthis_toolbox").append('<a class="addthis_button_delicious"></a>'); $(".addthis_toolbox").append('<a class="addthis_button_facebook"></a>'); $(".addthis_toolbox").a...

jquery, sortable: sort elements by ids...

hi, i want to reorder the sortable-list by ids.... but with the effect of the "sortable-ui"-component. how could i reorder the elements?... :-/ its pretty hard. ...

Change file extension if browser is IE

Hi, I'm looking for the best solution to dynamically change some images extension (from .svg to .png) only if the browser is IE. I don't know what's the best solution : parse the html code with PHP use jQuery with something like $("img.svg2png").attr("src", ...); dealing with htaccess and rewrite rules other solution ? Thanks ! ...

Return Activetab index for Safari 5 Extension

I'm trying to make an extension that closes all tabs but the active tab for the current window in Safari. I have gotten this far as to close all tabs but index 1. But I need to insert the activetab index and exclude that from the closings. If I get the answer I'd put it in the extension and publish it. <!DOCTYPE HTML> <script> safari.ap...

Hide/Show div via Radio Buttons

I'm trying to hide or show a div based on the value of some radio buttons, css defaults the div to display='none' Here's the input <input type="radio" id="payment_type" value="cash" checked="checked" name="payment_type" onchange="showhideFinancing(this.value);"/>&nbsp;Cash/Debit <input type="radio" id="payment_type" value="cheque" name...

why is gif not animating by itself?

Hello, I have a simple .gif image on my web page. In javascript i have :- window.onload = function(){ document.forms[0].submit(); } I am using Glassfish Server and basically the process takes little long even though i have submitted the form as soon as it loads. Thus, the control remains on the page for 2-3 seconds before it is re...

How to check if certain row in textarea is empty?

How to check if certain row in textarea is empty with javascript? <script type="text/javascript" src="../../../js/jquery-1.3.2.min.js"></script> <script> $(document).bind('keydown',function (e) { if(e.which==13) { function isRowEmpty( idOfTextArea , row ){ return $("#" + idOfTextArea )[0].value.split("\n")[row-1] == ""; } alert(isR...

Myspace app development, showing an external site in app canvas?

is it possible to redirect a user from the app canvas page to another website which is hosted on another site e.g. http://www.mydomain.com? i mean i have already done it but currently my app is in development mode so I dont know if its possible to publish it and get it approved or not? if it is not possible let me know how should i do it...

Text Change in a textbox

I have a text box that the contents change on page reload, but what I was wondering is how to make it change after a specified amount of time. Is this possible without flash? ...