javascript

jqGrid columns width seem to go off after clicking on paginator

Using jqGrid version 3.6.5 Current pager extended options: { add: false, del: false, edit: false, search: false, refresh: false, position: "left" } Current grid options: $("#tblID").jqGrid({ url: '...', datatype: datatype, datastr: GridJsonData, mtype: 'GET', ...

open a new window from another pop up javascript window

I'm trying to open a new window from another pop up java script window via writing html code in this pop up window, but it doesn't work, please help me as soon as possible. <html> <head> <style> .larger{ width:750px;} .standard{ width:600px;} .orginal{ width:10px;} </style> ...

jQuery .keyPress() - How to get value of input which triggered event?

Hi Guys, Trying to do some jQuery validation (without the plugin - please no answers like "Just use the validate-js plugin"). I'm wiring up a client-side event handler keypress for each "required field" on doc ready: $(document).ready(function() { $('#myform input.required').each(function() { $(this).keypress(onRequiredFieldKeyP...

How to get the value of a disabled radio button input field

I have a radio button something like this, <input type="radio" value="A" name="NodeLevel" /> When not disabled I could get the value of a pretty easily using, $("input[name=NodeLevel]").click(function () {}, but when the input type is disabled, how can I get the value of a radio button ? any work arounds ? ...

Google Maps API - Resizing generates blank white space

Hi, I'm working on what it looked to be like a very simple feature which is causing a little bit of a headache. I work with a GIS and we integrate it with Google Maps. One of the clients requested to be able to open a separate pop up window showing only the map. Opening the window wasn't a problem, but as I try to expand the width of t...

Displaying DOM element events and their handlers

Is there a tool - such as a browser extension, jQuery console script, bookmarklet or Firebug plugin - that displays all events that can be fired by a particular DOM element, and include any event handlers currently listening to those events? ...

find which li was clicked

suppose i have 3 li. what i want to do is when i click any li then i want to know which li was clicked and add an event according to it. how do i do it with jquery, any help or suggestions please ...

Populating another array from array - Javascript

Very simple thing I am trying to do in JS (assign the values of one array to another), but somehow the array bar's value doesn't seem affected at all. The first thing I tried, of course, was simply bar = ar; -- didn't work, so I tried manually looping through... still doesn't work. I don't grok the quirks of Javascript! Please help!! ...

I have to disable button when page is loading ,,after full loading page i a have to enable using jquery or javascript how to do?

I have to disable button when page is loading ,,after full loading page i a have to enable using jquery or javascript how to do? ...

Form validation with PHP and Javascript security

I was wondering if it is really necessary to validate in both JS and PHP? I have my submit button with JS document.myform.submit()sending with PHP POST to the same page.  If a user disables JS he can not send the form anyway. So I wanted to ask about security, can someone send the variables in another way bypassing the javascript? How wo...

jQuery - getJSON data to array

How do you store the data received from jQuery getJSON to an array for later usage? Here's a sample snippet - somehow the loop's data is not being stored to the global haikus. $(document).ready(function(){ var haikus=[]; alert("begin loop"); $.getJSON('http://haikuennui.com/random.php',function(data){ var i=0; ...

How do I use javascript control ipad to scroll uniformly (without friction)

I would need to listen to onscroll, and know how fast it is scrolling. Any one have any ideas how this should be implemented? By using onmousedown and onmouseup? And how should I calculate the speed? ...

Check url parameter using javascript

If two url are like: http://localhost:1113/Project/TestCourse.aspx?id= http://localhost:1112/Project/TestCourse.aspx How to check whether 'id' is present or not using javascript? ...

url parameter to save is in JavaScript

Hi all, I would like to insert a parameter value found the url into my javascript code.. So basically i have the following url www.rene-zamm.com/mp-dthanks.asp?gglid=123123123 Now i have the following javascript code in the same page and i want that number in the url to be visible also in the javascript code below: var gwoTracker=_gat....

[JQUERY] fancybox onStart onComplete status not working

hi,i'm trying to keep working onstart and onComplete method on fancybox (jquery plugin) they doesn't works for me ...do yo know why? this is the code: $(document).ready(function(){ //top-menu highlight link $(".photos").removeClass().addClass("active"); $("a.fancybox").fancybox({ 'overlayShow' : true, 'opacity' ...

jstree select element which contains exact string

I must check some nodes of my jstree (checkbox plugin) on page load $j("#tree_data").jstree("check_node",'a:contains('+tool_name+')'); but if tool_name = "aa" all nodes abaa, aaa, blaah will be checked. I need to check only the node that contains exactly "aa". ...

Save highlighted text position in HTML using javascript

I'm able to select the text using window.getSelection() How can I get the character position of the start and end of the selection in the HTML code? So this information can be saved to the server. ...

How to disable the onclick event once it happens?

I had a image which calls add_cart() javascript function when onclick() <img src="images/add.png" onclick="add_cart()"> I want the user to click the image only one time. When the user clicks it first time, add_cart function should be called. If he clicks second time NO EVENT SHOULD HAPPEN Plz help, any help will be appreciated ...

How safe is "the future of browser gaming"?

HTML5 will be widely adopted as a way to design games, is the prediction. But I have my questions about this: how can an online HTML5 game ever be secure? Let me give you an example: imagine this platform game where you gain badges when you win, for example, an extremely hard level. When you have actually won this badge, a request is ma...

url parameter to save it in JavaScript code

Hi all, I would like to insert a parameter value (AS A NUMBER) found the url into my javascript code.. So basically i have the following url www.rene-zamm.com/mp-dthanks.asp?gglid=123123123 Now i have the following javascript code in the same page and i want that number in the url to be visible also in the javascript code where i have w...