javascript

Retrieving original row data from jqGrid

It is possible to use the getRowData method to retrieve the current of a cell but this retrieves the current cell content rather than the original data before it went through the formatter. How do I retrieve the original content before the formatting transformations are applied? FYI I am populating the table using JSON. ...

Popup and change location at the same time...

Basically here is my code (Authenticator.jsp): window.location.replace("Login.html"); // replace method also takes care of history window.open ("Main.html", "Welcome logged in user"); Expected behaviour: We basically open the Main.html in a popup once a user has logged in. The current window must point to Login.html and main should ...

How to disable or encrypt "View Source" for my site

Is there any way to disable or encrypt "View Source" for my site so that I can secure my code? ...

Hide Addressbar

how to hide address bar from popup window opened with window.open? ...

Javascript doesn't work in IE8

I am trying to create this html elements dynamically on the onload of my page,however;when I run it the code wont work on IE8 but okay in firefox,safari,and others. function getmovie() { var container = document.getElementById("container"); if (!container) return; var object = document.cr...

Convert time to 24 hours format in Javascript

Hey all Please let me know, how to convert 10:30 Am to 24 hours format. Thanks in advance Kishh ...

Is it possible to group jqGrid column?

I need to group three columns header to one column in jqGrid, Is it possible? Thank ...

Passing control's ID to javascript via ScriptControlDescriptor

I create a control in CreateChildControls(): HtmlGenericControl mycontrol= HtmlGenericControl("li"); mycontrol.ID = "controlID"; controlId = mycontrol.ID; protected virtual IEnumerable<ScriptDescriptor> GetScriptDescriptors() { ScriptControlDescriptor descriptor = new ScriptControlDescriptor("Project.TEditor", this.ClientID);...

JS : Compatibility problem with Safari

Hi, I have a small portion of code which works well on FF but I can't seem to get it to work on Safari unless I put an alert instruction anywhere inside of the whiles. Anyone knows what may be the problem ? var liste_ele = document.getElementsByClassName('accordion_content'); i=0; while(i<liste_ele.length) { var j=0; var...

Bypassing event.stopPropagation

Hi, I'm writing a Javascript add-on (not in jQuery) which starts working when a certain event has been triggered. It works fine on most of the sites, but I encountered problems in sites that use stopPropagation(). Is it possible to bypass this and attach the event anyway? Thanks! ...

What is the best way to cut the file name from 'href' attribute of an 'a' element using jQuery?

For example I've got the simple code: <ul class="list"> <li><a href="http://www.aaa.com/bbb/ccc/file01.pdf"&gt;Download file 01</a></li> <li><a href="http://www.bbb.com/ccc/ddd/file02.pdf"&gt;Download file 02</a></li> </ul> and I wish to store in variables only the file names: file01.pdf and file02.pdf, how can I cut them? Many t...

Javascript Ternary operator

I cant seem to wrap my head around the first part of this code ( += ) in combination with the ternary operator. h.className += h.className ? ' error' : 'error' The way i think this code works is as following. h.className = h.className + h.className ? ' error' : 'error' But that isn't correct because that gives a error in my consol...

audio comparison

How to compare two audio files to see the difference of them ...

How to show/hide gif image when button click in asp.net

Hi, I have a asp page where i have a button.When i click on the button i should display a gif image.When the process is completed ,again the images has to be hidden. Please find my below code behind <head runat="server"> <title>Untitled Page</title> <script type="text/javascript" language="javascript"> </script> </head>...

Gridview item preview using .net 2.0

Hi, I have a GridView control that for each item has a Hyperlinkfield with a URL to an aspx page. I want to (using AJAX libraries) to display the page preview in an inline window as the user hovers over each GridView row hyperlink. Can anyone suggest the best way to implement a preview of each row's hyperlinked aspx page as the user ...

Ruby bindings for a server-side javascript engine ?

I'd like my rack application to be able to interface with a server-side javascript engine. As of now the only way i know this could be possible, is by running JRuby and Rhino on the JVM, but I'm hoping for a leaner solution. Has anyone heard of another, more rubyish perhaps, option ? Edit : Reading the comments I'm starting to think ...

Web Application with jQuery, deployed to WS 2003 and IE not working.

I have been developing a web application on XP and FF (with occasional IE checks through IE 8), but today when I deployed it to a WS 2003 site, running IE 7, my jQuery code to dynamically size divs doesn't execute, and even stating explicit div sizes (e.g. "width: 95%") doesn't seem to work. I'm doing this via VPN and Remote Desktop, an...

Calling multiple javascript functions on event

I'm using the ajaxcontroltoolkit and trying to call a couple of functions on a tab changed event. I want to call more than one js function from my OnClientActiveTabChanged function but keep getting the error Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET ...

access parent object in javascript

var user = { Name: "Some user", Methods: { ShowGreetings: function() { // at this point i want to access variable "Name", //i dont want to use user.Name // **please suggest me how??** }, GetUserName: function() { } ...

Jquery get all input values and create an array (with names)

Hay guys, I'm doing some work where i have a large collection of forms. Seems these aren't 'posted' the traditional way (i.e using a submit button). I need a way to collect all the names and values of all form data when clicking a link (document.location is then used for redirects). I want names to stay intact so that i can used a simpl...