I'm not sure why this isn't working but probably because I'm not very familiar with javascript.
The following is initialised
$('#categoryList').find('.sideboxEntry').live("click", function() {
productBindToGrid();
});
productBindToGrid();
function productBindToGrid(filterBy) {
$("#productGridView").jqGrid();
}
productBindToG...
I have written the following javascript code to catch F5 key press and prevent the user from refreshing:
(I understand this is not a good idea but i am stuck with this whether any one likes it or not. Also the question i ask pertains to why the script below does not work with safari 4 but works for other browsers.)
var fn = function (e...
Hi all,
I have a form, in which I am disabling the submit button until an user has typed in all the mandatory fields. I was initially using onkeyup to keep a tab on the mandatory fields and enable the button when all the mandatory fields are filled.
But I had users complaining that they filled in the form using AutoFill button on the G...
My site has a trusted third party Javascript library. At runtime, the library will append various other blocks of Javascript to the page.
I had an issue where one of the blocks of Javascript really messed up my page in IE. The problem is that the script was calling "document.body.appendChild" before the DOM was loaded. IE really doesn...
Code below works in IE, but not in FireFox.
I have unsuccessfully tried all solutions proposed in link below.
Function is invoked when ENTER is pressed. Alert fires if placed in first line of function. But, first if statement is not processed.
Invoked via: onKeyPress="javascript:isEnter();" in control markup.
function isEnter(evnt)...
Hello,
I want to make some UI improvements to a page I am developing. Specifically, I need to add another drop down menu to allow the user to filter results.
This is my current code:
HTML file:
<select name="test_id" onchange="showGrid(this.name, this.value, 'gettestgrid')">
<option selected>Select a test--></option>
<option value=1>T...
I have a few textboxes and button to save their values on a webpage. The onchange event of the textboxes fires some js which adds the changed text to a js array. The ok button when clicked flushes this to the database via a webservice. This works fine except when the onchange event is caused by clicking the ok button. In this scenario th...
Hey all, I currently have created a pagination js class that will automatically paginate comments when you get more than 10 to a page. This works fine, but I'd like to set some css properties only if there are more than 10 comments on the page (add space for the buttons to switch between pages). This COULD be done in the ajax success, bu...
I'm using a product called DHTMLXGrid, which is a JS library for creating spreadsheet-like tables on a web page.
When I edit a cell, and then click outside the cell, an event is fired (they call it onCellEdit) and I do stuff to handle that event - an AJAX call to save the cell data to the DB.
But if the user edits a cell and clicks a b...
I have an "Add Person" form with a few fields (name, address, phone number, etc).
I want to be able to pre-fill some of the fields using information from other fields BEFORE submitting the form. For example, once the user puts in a city, an Ajax query will pull the area-code for the phone number (the Controller has a "city to area code...
I've created a very simple test page to replicate a problem I'm having within my application.Sorry if this looks long winded for something so trivial.
The .aspx page
<body>
<form id="form1" runat="server">
<asp:TextBox ID="tb" runat="server"></asp:TextBox>
<asp:Button ID="btnOk" runat="server" text="OK" Width="60px" UseSubmit...
I'm maintaining a web page and need to fix a very weird behavior under IE. The page has a table that displays a menu for each cell as the mouse moves over. Everything runs fine as long as you have the browser window 800px height at least. If you browse this page with Chrome, Opera or Firefox and the browser's window height is smaller tha...
Is there a way to check if an event exists in jQuery? I'm working on a plugin that uses namespaced events on made up events, and would like to be able to check if the event is binded to an element or not.
...
I'm using the YUI slider that operates with mouse move events. I want to make it respond to touchmove events (iPhone and Android). How can I produce a mouse move event when a touchmove event occurs? I'm hoping that just by adding some script at the top that touchmove events will get mapped to the mouse move events and I won't have to cha...
I like my menu to be interaction on :hover.
So here is the code:
$('#menu img').hover(function (){
$(this).removeClass();
$(this).addClass('menuon');
return false;
}, function(){
$(this).removeClass();
$(this).addClass('menuoff');
return false;
});
This code works fine, but the side effect is when the menuon s...
I have a project that uses drop-down menus that are nested ul's, like so:
<ul id="nav">
<li id="thome" class="navtab">
<a href="#" class="navlink lhome" id="nav_home" onclick="doCurrent('home');">HOME</a>
<ul id="subnav_home" class="submenu">
<li><a href="#">Dashboard</a></li>
<li><a href="#">SMS</a></li>...
I'm writing a firefox extension and as part of this extension I need to know when the page has fully loaded (including all images and flash etc). Does anyone know of an event that is triggered when the page has fully loaded? I'm thinking it would be the same event that controls the activity icon in the top right. If anyone knows what eve...
I have following 2 tables and a script having a function includePage(). Table with id=1 contains a menu whereas table with id2 is empty. It just contain one cell.
Now i want that when a user click on the first option in the menu of table having id=1, a dummypage1.html may appear in the table having id=2. Similary when she clicks on the ...
I'm trying to make a navigation dropdown with jQuery that looks like this:
<ul id="home" >
<li class="navtab"><a href="#">TABANME</a></li>
<li class="homesub"><a href="#">Some link</a></li>
<li class="homesub"><a href="#">Some link</a></li>
<li class="homesub"><a href="#">Some link</a></li>
</ul>
The <li> .navtab is vi...
IE has attribute readyState in document object, that indicates current state, e.g. "loading", "complete" etc.
Is there any way to find current loading state of document in Mozilla-based browsers?
I'm aware of DOMContentLoaded event, but it wont fit my situation, as my code can be executed after this event was fired.
Added: no, I can't ...