javascript

JQuery works in Firefox, but not in IE

Anyone know why the following JQuery expression works in Firefox but not in IE or Chrome? $('form :hidden:last').attr('name') An alert statement reveals that in IE the expression is undefined. UPDATE: Here is some HTML that fails. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict...

Control an embedded into website flash player with Python?

Hello, I am trying to write few simple python scripts, which will allow me to control one of the Internet radio (which I listen) with an keybinded python scripts. I am now able to connect and log into the website, I am able to get out the song data ( that is - all the data which are passed to the player). I noticed, that the player is...

javascript: how to check if an array element only contains new line?

A plain text file made up of paragraphs and some blank lines is loaded into an array via Ajax. The array is split into elements by new lines, such as: var infoArray = new Array(); infoArray = response.split("\n"); Then the array is put through a for loop, with various tests for keywords in various elements, which indicate the next n-e...

Safari is returning incorrect width using jQuery

Here is the problematic part of my jQuery var tickerWidth = 0; var padding = 10; firstList.find('li').each(function() { $(this).append(' &mdash;'); tickerWidth += $(this).width() + padding; $('body').prepend($(this).width() + '<br />'); }); firstList is a variable that holds an ul elemen...

Server controls event does not woks after calling page_clientvalidate() method

when i calling Page_ClientValidate('Add1') function using javascript, the server controls of asp.net event not working .'Add1' is validation group. ...

Is this a correct way to call a javascript function?

Is this the correct way to call my javascript function with jquery? I have spent the last 5 hours trying to figure out why this won't work. <form class="rpt" id="rpt" action=""> $(function() { $("#rpt").submit(doSave); }); </script> Here is the small snippet of code in the javascript wysiwyg editor. I'm still using the exact s...

javascript commands not all firing

I have a very simple JavaScript function: function insertPost() { document.postsong.submit() parent.document.getElementById('postSongButton').disabled = true; } Both commands in it work but only the first one will fire. This is true when they switch places also. Only the first one will fire... ...

Client-side pagination with jqGrid

I know it's possible to do client-side sorting in jqGrid by setting loadonce = true but is it possible to do client-side paging as well? I want to pass all the data (about 80 pages of JSON) to the client initially during page load and then, I don't want any server calls. I want jqGrid to handle both the paging and sorting. ...

Get image data in Javascript?

I have a regular HTML page with some images (just regular IMG HTML tags). I'd like to get their content, base64 encoded preferably, without the need to redownload the image (ie. it's already loaded by the browser, so now I want the content). I'd love to achieve that with Greasemonkey and Firefox. ...

Javascript method

Hi, I am making a favorite list where you can add items through javascript and remove them again. The values are stored in cookies to remember the list when the user returns. The problem I have is that the method to remove the items from the list doesn't get run, unless there has been a postback first. My code to remove items look like t...

Javscript debugging in Visual Studio

I have script debugging enabled in IE .. I have put the debugger keyword in the file and it gets caught too.. The debugger is already attached to the ie process and type is script .. When ie prompted "Would you like to debug" I pressed yes and choose Visual Studio 2008 (With my project opened) . When Visual Studio opens up, i get an ale...

javascript slide slick_accessible_slideshow

hi everyone, i have three div's in an HTML page. the page look like this HTML Page: leftArrow(>) div rightArrow(<) i need to move the div from left to right and right to left. using javascript and DHTMl or JQuery. Is it Possible to Move in that direction ? Thanks & Regards Ravi ...

Internationalization inside Javascript

Hi all, I have a JSP page which accepts user string in more than 23 languages.So a user in English gives 8.5 the javascript function should accept as well as user from Russia gives 8,5 it also should be accepted it as valid input. In this scenario how do we validate in Javascript for all the languages ...

Java script - Confirmation box. | Yes? > delete data from mysql / No - do nothing

Hello. I don't have much experience with Javascript. However i wanted to do a small thing with js and mysql. And i could use some help. I have a page in PHP wich you search for something and its gives the results based on the search query. For each result he adds 3 images, one which as a url where you can view the content. other where ...

html & javascript: How to store data referring to html elements

Hello, I'm working on a web application that uses ajax to communicate to the server. My specific situation is the following: I have a list of users lined out in the html page. On each of these users i can do the following: change their 'status' or 'remove' them from the account. What's a good practice for storing information in the pag...

Is there any Javascript feature that lets you check if an element was closed?

Is there any parameter/function in JS that tells you if an element was closed with an ending tag? ... for this purpose. ...

Javascript - write links to new tabs

Hi, Using Javascript in a firefox extension, I have opened a new tab. I am unaware of how I can write a link to www.google.com and other links (a whole list) in this tab, where the user can click a link and this page will open. Thank you for your help so far I had typed in : var newTabBrowser2 = gBrowser.getBrowserForTab(gBrowser.sel...

Most useful jQuery plugins

Which are the most useful jQuery plugins you have used. List out one per answer(to rank the best plugins individually), and describe what it does as well. BlockUI - Can block certain elements (or the whole page) during ajax requests. Form Plugin JQueryUI JQuery Validation TableSorter Taconite ...

asynchronous file upload with java servlet

Here's I want to do, I want to upload a file that will be processed by a servlet. I would use Apache Commons - File Upload to handle the file to be uploaded. I've seen the gmail-like AJAX file upload, where there would be a hidden iframe that would later be populated with a javascript to stop showing the upload image or displaying a mes...

Is it possible to check if the caps lock button is active while typing in form ?

I was wondering if it was possible to know if the caps lock button is active while filling a web form ? Sometimes, when you are asked to enter your password, softwares notice you that's active, and you be careful. I would have liked to do the same in web forms. Any ideas ? ...