javascript

Using javascript to detect browser type

I'm trying to use this line to detect browser type: IE or Firefox. alert(isBrowser("Microsoft")); but I get absolutely nothing, the alert doesn't even pop up. Not sure what I'm doing wrong. What would be the best practice way to detect browser type? ...

Match returning a string instead of object

This simple regex matching returns a string instead of an object on every browser but the latest firefox... text = "language. Filename: My Old School Yard.avi. File description: File size: 701.54 MB. View on Megavideo. Enter this, here:" name = text.match(/(Filename:)(.*) File /); alert(typeof(name)); as far as i know ...

How to find what link we have clicked?

Hi I my application i am having three links, on clicking the link i need to find which link has been clicked and need to pass some unique information to the next page. Kindly help ...

Multiple ajax calls for included js files inside jsp fragment

I am including a jsp fragment by making an ajax call. Now this jsp frag happened to include several js files. When the ajax request is completed, it is loading each of the included js files (on fragments) using a separate get request. (I checked this using firebug.) Now is this the correct behavior (making separate get calls) or am I m...

difference between jquery and java script

what is the difference between jquery and java script ...

How can I reliably set the class attr w/JavaScript on IE, FF, Chrome, etc.?

Hi, I am using the below js code in order to change the class when a link is clicked. document.getElementById("gifts").setAttribute("class", "gkvSprite selected"); This is not working in IE but it does in FF and Chrome Then I changed the code to : document.getElementById("gifts").setAttribute("className", "gkvSprite selected"); Th...

How to run a local exe in my firefox extension?

I want to run a local exe in my firefox extension javascript file, but ActiveXObject("WScript.Shell") is work fine in IE,not in FF,how to run a local exe in js in firefox. ...

JQuery not removing added element

What I want to do is add and remove list items. I have got it to add new items to the list and I can remove existing ones but not the ones that have been added. It seem like it would work but it doesn't. Any help would be appreciated! Here the code: JQuery: <script type="text/javascript"> $(function(){ $('a#add').click(function()...

How to trigger event in javascript

Hi guys, I have attached a event to a text box using addEventListener. It works fine. My problem arouse when i wanted to trigger the event programmatically from another function. how can i do it? ...

Javascript function objects, this keyword points to wrong object

I've got a problem concerning the javascript "this" keyword when used within a javascript functional object. I want to be able to create an object for handling a Modal popup (JQuery UI Dialog). The object is called CreateItemModal. Which i want to be able to instantiate and pass some config settings. One of the config settings. When th...

How do I parse a UTC date format string to local date time?

I'm currently using the jQuery fullcalendar plugin but I've came across an issue regarding daylight savings time in Britain. After the daylight savings take effect the hours are being displayed an hour out of phase. The problem appears to be with the plugins parsing function. Can someone please provide me with the funciton to parse a U...

Remove tabstop from ButtonColumn inside DataGrid

Is there any way to disable keyboard tabStop for a ButtonColumn inside a dataGrid? I want the buttons there to be only enabled through mouse-clicks, because sometimes the grid can be large and I want that pressing "tabs" will skip the grid and move to the other controls on the page. ...

What happens to my web application if JavaScript is disabled?

Hello, I'm learning jQuery and am about to write some pages using intensively that library. I just learned that some user disable JavaScript on their browser (I didn't even know that was possible and/or necessary). Now, here's my question: What happens to my web application if a user disable JavaScript? For instance, I'd like to displ...

Tell me some Http-streaming tutorial or example.

Could you tell me some http-streaming tutorial or example ( used also by Gmail ) ? I want to create a simple chat for college project. Attention: I am talking about Http-streaming and NOT long-polling. Thanks ;) ...

remove element in javascript

In the below code how to remove the hyperlink after getting the innerHTML function test(obj) { var a=obj.innerHTML //remove obj element here } $p = $('<a id="name" onclick="var ele=test(this);">').html( "test" ); $('#questions').append( $p ); Thanks.. ...

Access the GWT generated javascript source in Eclipse

In eclipse IDE, how can I see the javascript source code GWT has generated ? ...

JQuery Animation Question

Hello, I have created a jquery animation that can be seen by clicking the Preview button on top: http://jsbin.com/anayi3/edit I have used the slideDown animation method. The problem is that all items slide down together. I want to each number to display after short delay. It should not be much of problem for experienced jquery develop...

Problems reading RSS feed with jQuery.get()

Hi there, I've been pulling my hair out trying to use jQuery.get() to pull in my dynamically generated RSS feed and I'm having nothing but issues, is my RSS feed the wrong format? If so can I convert it to the correct format using javascript? Here's my feed: http://dev.chriscurddesign.co.uk/burns/p/rc_rss.php?rcf_id=0 Here's my code: ...

Regular expression help needed.

Hi, Can anybody help me writting a regular expression to replace these characters with a empty string. Character list is given below. public static char[] delimiters = { ' ', '\r', '\n', '?', '!', ';', '.', ',', '`', ':', '(', ')', '{', '}', '[', ']', '|', '\'', '\\', '~', '=', '@', '>', '<', '&', '%', '-', '/', '#' }; Thanks. Subrat....

Jquery - intercept links created by ajax request

I have some jQuery code that intercepts links clicked on a page: $(document).ready(function() { $("a").click(function() { //do something here }); }); My problem is there are certain parts of the page that have not finished loading on document ready. They are populated via ajax calls. The links in these...