How to change class of textbox?
my textbox has a class='cssText'. I want to change this class to 'blck' at runtime. How can I access the class attribute of textbox and change its value using jQuery? Thanks ...
my textbox has a class='cssText'. I want to change this class to 'blck' at runtime. How can I access the class attribute of textbox and change its value using jQuery? Thanks ...
Hey Folks: I know there should be an easy way to do this but I guess my brain isn't working today. I need to refresh a page in x number of seconds. I can do that in .NET using the following: Response.AddHeader("Refresh", "300"); This is fine except I also need to display the number of minutes and seconds until the next refresh. So...
I have a Google map and street view based on provided lat/lng coordinates, zoom, yaw and pitch. I need to invoke a javascript to update a hidden field for each of these values whenever any of the details change from their default or when a button is clicked. So whenever the map/street view is zoomed in, panned, tilted etc it outputs the...
Hi, I currently have the following in JQuery 1.3.2 for (i = 0; i < totalPages; i++) { var newDiv = $("<a href=\"#\">").append(i+1).click(function() { alert(i+1); }); $('#pageLinks').append(newDiv).append(" "); } This outputs a list of numbers as required, but the alert when clicking the generated element is return...
I regularly observe obsolete classes and methods in Java API. I did not find Java API without obsoletes. It suggests me that you need to filter Java API by your browser to get it more readable. Javascript is apparently a good solution in filtering Java API. How can you get Java API without Obseletes by Javascript or by other method? ...
Is it possible using jQuery (or any other JavaScript function) to detect when an onmouseover event is fired? I have a page where existing javaScript calls a onmouseover/out events to re-write the contents of the div. I'm actually only interested in getting at what the div contains while the mouse is hovered over it. The onmouseover ev...
I'm using the jQuery datepicker to select dates. It works fine, except there is 1 default behavior that I would like to change. When you select a day, the selected day is highlighted (which I like). The current day is also highlighted, but using a different css style (which I also like). However, if you select the current day, the hi...
I'm trying to open the zip code lookup page on the usps website and fill out the form using javascript, and I get the following error: 'Permission denied to get property Window.document' Here's my script: function lookupZipCode(line1, line2, city, state, zip) { var usps = window.open('http://zip4.usps.com/zip4/welcome.jsp'); us...
I have rather a complex UI. However, for the purpose of this question, let's say that there is a HTML table that renders UILayout1 by default (say default mode). There is a button that a user can use to toggle between the default mode and a preview mode (UILayout2) When in preview mode, there are some columns in the table that are invis...
I have a python script that runs continuously. It outputs 2 lines of info every 30 seconds. I'd like to be able to view this output on the web. In particular, I'd like the site to auto-update (add the new output at the top of the page/site every 30 seconds without having to refresh the page). I understand I can do this with javascrip...
I have a simple single page setup. Under a root folder, I have 3 subfolders (js, css, and images). In the root folder, I have an index.html page with the following content: <html> <head> <title></title> <script language="javascript" src="js/jquery-1.3.2.min.js"></script> <script language="javascript" src="js/myscript.js"></script> </h...
I am generating the following html form with this php: echo "<form name=\"userForm\"> Username: <input type=\"text\" name=\"username\" /> <br /> First name: <input type=\"text\" name=\"firstname\" /> <br /> Last name: <input type=\"text\" name=\"lastname\" /> <br /> <input name=\"Submit\" type=\"submit\" value=\"Update\" onclick=\"submi...
I want to disable the hover event on a particular list when another event occurs. ...
In addition to the explanation, what does the $ mean in javascript? Here is the code: var ZebraTable = { bgcolor: '', classname: '', stripe: function(el) { if (!$(el)) return; var rows = $(el).getElementsByTagName('tr'); for (var i=1,len=rows.length;i<len;i++) { if (i % 2 == 0) rows[i].className = 'alt'; Even...
I've got the following code: <span style="margin:0px 2px 0px 2px;"> <asp:Label ID="labelPromptText" runat="server" Text="Selected Location:" /> <span id="spanSelectedLocation" style="padding:2px 2px 2px 2px; cursor:pointer;" onmouseover="javascript:SetBackgroundColor('spanSelectedLocation', '#E0E0E0');" onmouseout="javascript:Se...
I'm coding up a small Vista/7 sidebar gadget for our web based employee schedule system and I've run into a Javascript problem that my Google-FU can't solve. I can't figure out how to fill in a login form from the client. I'm creating a new ActiveXObject, navigating to the site, but lost as to where to go from here. var conn = new Acti...
I have nested sortable list that can have items dynamically added or removed and can be nested n-levels deep. On nesting, a new ul element is injected into whatever li element is selected to be the parent. The initial state of the list is something like the following: <ul id="parent"> <li id="One"><a href="" class="listLink"><span c...
We have written a data store / grid widget system in JavaScript that automatically updates all widgets associated with a data store whenever some of the data changes. Its nice features are: it supports sorting by multiple attributes (for example, by status, then priority descending, then date ascending, or whatever) the sort order is...
Hi, I can get an object if it's moused over. I can get the coordinates of the mouse at any given time. How do I get an object given it's coordinates - if they are different from the mouse? Essentially the user is dropping a div on a certain place on the screen. Since the div is wider than the mouse cursor, I need to know what object ...
I know how to listen for keystrokes CTRL+F, alerting me that the user has probably asked to bring up the "find in page" search option in their browser. Is there a way to listen for when the user has brought up the "find in page" search option using the browser menu item? ...