javascript

common login component

Hello I have a server side component which performs user authentication with the LDAP server. My organization has got a set of different web applications and all of them depend on this component for user authentication. Now I need to make a common login UI component so that individual web application pages just need to include this on ...

set back the focus in GWT

I have four text boxes and one ListBox placed in a FlexTable. I make a request to server to get the list of data to populate the ListBox. When the response comes back, I populate the ListBox. This is stealing focus from the TextBox where I am giving input. What I want is after populating the ListBox, return the focus back to the exact ...

How do I assign a real function into a javascript object to use as a callback?

I've got a Javascript mess that looks something like: Note: Not working code, just trying to illustrate my problem... $(function() { $(foo).Something( { //Something is a grid control buttons: { add: { onClick: function() { //Build dialog box to add stuff to grid $('<div></div>...

Session information not maintained while AJAX requests

i am creating session while rendering the page. After that i am calling the AJAX page every 4 seconds. the AJAX page doesnt gettign the Session information. What may be the reason. Whether ajax requests dont maintain Session information? Code: Normal HTML <body onload="timerint(11)"> <div style="display:none;"> <button id="prev">...

How to fix cromeless youtube player js error in IE

I'm trying to add multiple cromeless youtube player using function playVid() { ytplayer = document.getElementById("ytPlayer"); ytplayer.cueVideoById("dceW9l72mTE"); } <a href="javascript:void(0);" onclick="playVid();">Play</a> it is playing good but showing error in IE8 "Object not supporting this... ". Any sugg...

Trying to track number of clicks in user's emails

Hi everyone. My issue is as follow: I'm trying to count the number of clicks on ads in our newsletter. The thing is I can't include js in emails - it's understandable. So I found a way around this by writing this small piece of code: <script type="text/javascript" src="http://www.factmag.com/wp-content/themes/modularity_/js/jquery-1.3....

Joyent vs Heroku for Node.js?

Has anyone used both Joyent and Heroku and could share your thoughts about each one of them? First I used Heroku with Rails but since I switched to Node.js in the backend I haven't made up my mind where to host my future node applications. It seems that the best candidates are Joyent and Heroku. Heroku has closed it's Node.js registra...

Best way to put delay after calling javascript functions

Hi,I'm using jquery to call some javascript functions with a delay between them. Also I'm using Jquery Wait When I call below function,all functions are called recpectively,there are no delays between each other. $(this) .call(f1) .wait(5000) .call(f2) .wait(5000) .call(f3); Here call function calls some function as I did $.fn.call ...

Node.js on Heroku?

I wonder if all Heroku addons - that are currently working for Rails - will work for Node.js once the support is there? And what is the ETA for the launch of Node.js support? ...

jQuery selector: Firefox recognize but IE not

This is my element with a custom attribute: <input type="radio" status="B" name="OPT_PARENT"/> My script: Alert($(this).attr("status")); Alert($(this).attr("test")); Output: Firefox 3.0.10 --> "B" and "undefined" IE 8.0.7600.16385 --> "true" and "undefined" My observation: IE will return the option button "checked state" which is tr...

select box issue in IE when using BOXOVER.js tool tip

Hi All, I am using boxover.js tool tip: http://www.koders.com/javascript/fid8780CBE6D1BEE164FC239AA55DCB13A53B3536E8.aspx?s=document#L6 The tool tip works well with all the elements except SELECT box in IE. I have a code where i need to show some image as a tool tip on selecting the option in a select box. Ex: <select name="categor...

"var variable" returns undefined?

When I run "var variable = true;" in chrome console I get "undefined" returned: > var variable = true; undefined But when I run without "var" it returns true: > variable = true; true Why is it returning "undefined" with "var"? It's confusing cause I expected it would return true. ...

disable js script with jquery or js

Hi, in one page function i want disable js script. How make that? I try jquery: hide(), but this not' work Thanks ...

How to remove the attribute "disabled" from input siblings when i click on a submit input

Hi, i have this problem: i need to remove the "disabled" attibute from the siblings inputs of submit input. Here is the html: <td> <input type="hidden" value="2000000000002_STATUTO_07_10_2010.gif" name="nomeDocumento" disabled="true"> <input type="hidden" value="811ecdd0-65e9-49d6-8d9d-8b7c9d9b6407" name="UUID" disabled="true"> <inpu...

find the height of a div and change the current div height to match

I'm trying to make a div the same height as the parent (if the parent is larger) or make the parent the same height as the current div (if the current div is larger) Here's what i've got so far $(this).parents().find('.address').slideToggle(function() { $(this).parent().height($(this).parent().find('.address').height()) }) It mak...

Regular expression for url matching

Hi All, I have a text field have value http://localhost/Send/test.php?s/?a=1&amp;o=2 . Another three text boxes . If we enter three values the above url will change like http://localhost/Send/test.php?s/?a=1&amp;o=2&amp;s1=a&amp;s2=b&amp;s3=c . The value for s1,s2 and s3 will not save anywhere . My question is how we check is the value ...

how to refresh the asp.net Label every second automatically using Java script instead ajax?

how to refresh the asp.net Label every second automatically using Java script instead ajax? ...

Trigger event on body load complete js/jquery

I want to trigger one event on page load complete using javascript/jquery. Is there any way to trigger event or call a simple function once page loading fully completes. Please suggest folks if you any reference. ...

Returning the response from an Jquery AJAX call

I have written a function, which has to check whether a username has been taken or not. Now when I call the function from another function, and alert it's return value: alert(checkusernameavailable('justausername')); it says 'undefined'. I've searched high and low, but can't find what I'm doing wrong. I guess it should just return th...

XmlHttpRequest.responseText while loading (readyState==3) in Chrome

Hi, I am trying to "streaming" (from server to client) in Javascript by ajax (by XmlHttpRequest (=xhr). I am using modified handleResponse function described in http://stackoverflow.com/questions/1112413/cross-browser-implementation-of-http-streaming-push-ajax-pattern function handleResponse() { if (http.readyState != 4 && http.readySta...