javascript

z-index IE issue

i m assigning z-index for a div like this, Obj.style.zIndex = "2000";//obj{ position:absolute} FF has no problem with this syntax but IE its not applying this property at all. how can i achieve same thing in IE. ...

Performing click event on a disabled element? Javascript jQuery

Hi, I would like to perform the click event of a element: jQuery('input#submit').click(function() { if ( jQuery('input#submit').attr("disabled") ) { alert('SUP'); } }); However this will not work as the element is required to be enabled for the click even to be executed. Any help would be appreciated, Thanks ...

How can I make dynamic text scroll on a curve in HTML/Javascript/CSS?

I'm trying to make dynamic text scroll on the page. I want it to scroll on a curved and angled surface just for design sake. Will I have to use flash for this? Because I'd rather not. ...

How to monitor all XmlHttpRequest POSTs from Javascript on IE6?

I am building an ASP.NET site including third party controls (e.g. ComponentOne WebGrids) which do partial page updates. I want to monitor these updates, in order to reset a client-side timer, mirroring the server-side session timer. The aim is to provide an online-bank style dialog - "Your session is about to timeout.. click this button...

How to send more 5000 character to next page

Hi friends, I need to save a content into a file. The content is more than 5000 character. I cant able to send this through url as query string. Its showing Unspecified error. How to achieve this. I am using PHP here. So, i tried to send this content value's through ajax concept to another php file for storing. After a button click i wan...

How to loop all the elements that match the regex?

Here is the case: I want to find the elements which match the regex... targetText = "SomeT1extSomeT2extSomeT3extSomeT4extSomeT5extSomeT6ext" and I use the regex in javascript like this reg = new RegExp(/e(.*?)e/g); var result = reg.exec(targetText); and I only get the first one, but not the follow.... I can get the T1 only, b...

select random p-node via jQuery

Someone got a nice code snippet? ...

focusing the text field

Hi, How to focus the calender after selecting the date from calender.. I am selecting the date and calender is also closing but after that focus is missing. Please help me on this issue.. Regards Sk ...

Displaying an Image in a WebBrowser Control without accessing external Files

I am using the WebBrowser Control in C# in an application to display HTML. All the data comes from a database, so I am generating a full page with Inline-CSS in Memory and sending it to the browser. But now I want to support images, which seems to be a problem because I do not want to store the images on Hard drive, not even in a Temp D...

Which symmetric encryption algorithm is the fastest for smaller messages?

I am interested in help selecting one of the common symmetric encryption algorithms (Twofish, AES, etc) based on performance criteria (fastest encryption/decryption). We are currently leaning toward AES, but since the communications we are sending back and forth don't really need that level of encryption, a less secure algorithm would b...

Jquery/Javascript Setting the attribute value of a textfield

I have a <input type='text' id='text' value='' /> How do I programmatically set the value attrribute using JQuery/Javascript ...

Unit testing Javascript/JQuery with JSUnit vs Qunit vs XUnit

We are using JQuery and some bit of Javascript in our project. We are thinking of writing some unit test around it for which there are different ways like JSUnit, Qunit, XUnit Can anyone suggest which is the best way to unit test javascript/jquery and if possible with some good link? ...

Class.create and this keyword

Hello, I'm trying to use the Class methods of prototype.js to manage my object hierarchy on my current project, but I have some trouble with the this keyword in conjonction with Class.create. Here is a piece of old-fashioned plain js code to create inheritance: var Super1 = function () { this.fu = "bar"; } var Sub1 = function () ...

What is the way to load an image on top of your webpage using a seethrough layer?

check this webiste: http://www.ramziarabi.com/portfolio/art-portfolio/ when you click on an image it opens itself on top of the webpage without hiding it or opening new page. I'm assuming this is done by JavaScript, but can someone explain how? provide some code I can use to do that? ...

How to access asp:Image from Javascript?

Hi all.. I got an asp:Image in my server-markup like this: <asp:Image ID="Img1" runat="server"/> Now, I want to find this img in my javascript, but seem to run into the problem of ASP.Net obfuscating my names. The client-markup will look something like this: <img id="ctl00_Content_Img1"/> I imagine this is because everything is in...

use php date string in javascript

i have a date entry in yyyy-mm-dd format in mysql database. Using php i could get the date value $row = $myresult['date']; now i wish to alert this value in javascript so i tried var temp_date = <?php echo($row)?>; alert (temp_date); but that didn't work for me. The problem i feel i am facing is to maintain the string format of th...

Trigger flash events using the default browser scrollbar

I'm not sure if this is possible but I want to achieve the following. Using the default browser scrollbars, I would like to either control a timeline in flash or send _global variables into flash. I also need to detect if the scrollbar is going up or down. Any help would be much appreciated. Thanks ...

Any way to prevent Safari and Chrome to show loading animation while XHR is active?

I'm using XMLHTTPRequest binding to receive asynchronous events from the server. XHR opens a server URI and then hangs until an event comes or timeout occurs, in any case JS fires a new XHR on the same URI immediately. This works fine, but there is an annoying problem in Safari and Chrome: both keep showing "page loading" animation whil...

Is it ok to manipulate dom before ready state?

This is generally how I manage progressive enhancement whilst keep the experience clean, but how safe is it? is there potential for a race condition and this not working? Imagine the simple abstract scenario, you want to display something differently if you have javascript support.. this is generally what I will end up doing: <div id="...

Use jQuery to check if all div's are hidden

How would I check if all the div's with class test are hidden. And if they are all hidden set wrap1 to hidden. Thanks. <div id='wrap1'> <div class="header">Header 1</div> <div class='test'><a href="#">Test 1</a></div> <div class='test'><a href="#">Test 2</a></div> <div class='test'><a href="#">Test 3</a></div> </div> UPDATE: Thanks ev...