javascript

Is possible to have more granular control over jQuery UI Dialog Widget's show/hide method?

Currently it seems that I can only use effects in their most basic form when using the Dialog widget. For example, the following will use the drop effect for both showing and hiding the dialog box: $('#dialog').dialog({show:'drop', hide:'drop'}); However, the default for the drop method always drops to the left. What I really want i...

jQuery forms.js with multiple forms per page

I would like to submit information to a mySql database using php and ajax. The page that the info is being sent from (form.php) has multiple forms that are generated from a "while()" loop. On success, I would a response to update a div above the particular form from which the data was submitted. I am currently using jQuery and the jqu...

getAttribute cannot return class in IE7?

I need to find random nodes according to random attribute values. To do that I use getAtrribute on nodes from getElementsByTagName. It seems like when I look for class name as attribute it does not work on IE (works on FF). Anyone know if getAtrribute doesn't work only on 'class' or other attributes as well? (if its only class I'll d...

gridview asp.net mouse over TR find which row was clicked on server side code

Hi all, I am pretty new to the whole javascript thing. I have a gridview that I want the user to be able to hover over the whole row (believe its the whole TR) and be able to click anywhere and that would be able to select that row. I need teh server side code to be able to know which row was clicked. I don't really know where to sta...

elegant solution for automatic downloads

I am currently using the meta http-equiv='Refresh' to automatic start PDF downloads. however this has different effect on each of the browsers. The main problem is with IE (6 & 7) once the user is redirected to the PDF if the user click the back button they are sent back to the page that initiated the download and then promptly redirec...

javascript function arguments in Jquery

Dear all I am using the JQuery and Javascript.I have onclick event ,that calls the javascript function. How to extract the arguments of function_A and function_B in JQuery And Is it Any Best way to do It? I need to Do ajax Call after javascript Click.Is any performance based issue ...

How do I know when the browser is being closed?

I am writing an ASP.NET application that tracks the user's scores and info (it is a training application) to an access database, if any one closes the browser directly I want to display an alert message. My problem is that I cannot use the unload event because When I pressed any ASP.NET button at that time unload event occurs. What even...

How to compare locale dependent float numbers?

I need to compare a float value entered in a web form against a range. The problem is that the client computers may have various locale settings, meaning that user may use either "." or "," to separate the integer part from decimal one. Is there a simple way to do it? As it is for an intranet and that they are only allowed to use IE, a ...

How to read the applied css-counter value?

Say you have a css 2.1 counter like ol { counter-reset: section; list-style-type: none; } li:before { counter-increment: section; content: counters(section, ".") " "; } <ol> <li>itemA</li> <!-- 1 --> <li>itemB <!-- 2 --> <ol> <li>itemC</li> <!-- 2.1 --> <li id="foo">itemD...

Can an iPhone xcode application read cookies previously stored by Safari Mobile?

Can an iPhone application read cookies previously stored by Safari Mobile? ...

div hide and show javascript having blinking problem in mozilla

My javascript is function Show1() { //document.getElementById("Popup_tooltip").style.overflow="auto"; document.getElementById("Popup_tooltip").style.display="block"; } function Hide1() { /* hide the pop-up */ document.getElementById("Popup_tooltip").style.display="none"; } my css for...

Prompt dialog ??

How to open a prompt dialog box in WSH usig JSacript?? The only pop-up dialog I've found in the doc is the WshShell.Popup() method. But I need a way to request the user to enter a string, like the window.prompt() method in DOM. Thanks. ...

GPL, javascript and online gaming

I am working on a game interpreter in javascript for sierra adventure games of the 80s. I ported bits of the existing reverse-engineered C interpreter called Sarien, which is GPL licensed. Making my work GPL too. So far so good. However, my aim is creating a website where people can play these games online, with added multiplayer suppor...

Is there a better way to write this javascript regex/replace?

The following code works, but I'm sure there is a more compact way to achieve the same result, particularly the string replacement: $('#nav-main .nav-sub').each(function() { var name = $(this).attr('id'); $(this).children('li').children('a').each(function() { var text = $(this).text().toLowerCase(); var spaces = / /g; var sub...

How do I implement a screen scraper in PHP?

I have a user ID and a password to log in to a web site via my program. Once logged in, the URL will change from http://localhost/Test/loginpage.html to http://www.4wtech.com/csp/web/Employee/Login.csp. How can I "screen scrape" the data from the second URL using PHP? ...

Best replacement for var flashElements = document.getElementsByTagName("EMBED");

I want to find all flash objects on a random page (to make them wmode=transparent so they wont hide a menu). IE does not support EMBED in: document.getElementsByTagName("EMBED"); Any idea what is the most efficent to find all embeds (no jQuery...) Also for the more advanced: I came across sites where the embed tag was written as eMBE...

Javascript Countdown

I have searched the web but all the ones readily available are where you specificy a date and it counts down to that date. What I need is something which will simply count down from "27 minutes and 43 seconds" (in that format) all the way down to 0 from whenever they land on the page, anyone got any snippets available? ...

Javascript Cookie with no expiration date

Hello, I would like to set up a cookie that never expires. Would that even be possible? document.cookie = "name=value; expires=date; path=path;domain=domain; secure"; I don't want to make the date really large, I am just wondering if there was a value for the expires parameter on the cookie that told it never to expire. Thanks. ...

Misuse of the CSS class attribute, or valid design pattern?

As you most likely already know, it's simple in JQuery to select all elements in the document that have a specific CSS class, and then, using chaining, assign common event handlers to the selected elements: $(".toolWindow").click(toolWindow_click); $(".toolWindow").keypress(toolWindow_keypress); As usual the class "toolWindow" is also...

jQuery click event for document but ignore a div

I have a online Slide Show I'm working on using jQuery. I have use $(document).click event to detect when a user clicks on the page to know when to show the next bullet point in the slide or to move to the next page. The problem I'm running into is my job had me insert a comment box on the bottom of the page and when ever someone clicks...