javascript

Window.opener alternative when not opening a new window

Hi guys Small prob i'm using the following line of code customerName = window.opener.form2.custName.value; The problem is that I'm no longer opening the page in a new window, I'm opening it in the same window and thus replacing the older page. Is there anyway for me to get the same information? Thanks ...

Can a jQuery load event fire when adding a dynamic stylesheet in Firefox?

I'm running the following code in jQuery to dynamically load a stylesheet. Its purpose is to allow users to load a custom stylesheet and change the look of a JavaScript widget: this.loadStyleSheet = function(url){ $("<link rel='stylesheet' type='text/css' />").attr("href", url).appendTo("head"); } For a split second the screen app...

Firefox 3.6 Javascript custom scrollbar performance

Hi, I have written a custom scrollbar class in javascript for use in a "freezepane" structure. Performance in most browsers (including IE6!!!) is good. But in firefox 3.6 (beta 4 is fine) it is very jerky. When the scrollbar is moved, the onmousemove event calculates a position then sends the new position to a callback that is setting ...

Jquery : how to know which row is selected?

I have a table with dynamically changing rows items. Among the rows there is a small button / link for each unit. Eg Data1 | LinkButton Data2 | LinkButton Data3 | LinkButton Data4 | LinkButton Data5 | LinkButton Data6 | LinkButton What i want is that when i click on the link button ,i need to know which row is ...

converting String true/false to Boolean value.

I have a Javascript String containing true or false. How may I convert it to boolean without using the eval function? Thanks ...

windows.location.href and base tag in Opera 10.63

I have a page (for examle, localhost/catalog/) with select element on it. <select name="type" id="typeSel"> <option value="2" selected="selected" >Type 1</option> <option value="1" >Type 2</option> </select> Also there is base tag in the page: <base href="http://localhost/" /> I want to change page url when user click on l...

how to call javascript methods sequentially on onclick event

Hi All, I need to call two functions sequentially (means one by one) in javascript on onclick event. The requirement is to get the data from the backend and then make the cell highlight. Below code snippet is used for this: cell1.onclick=function() { getData("FileName"); setTimeout("setHighlight('FileName')", 500); }; Curre...

JQuery .show() and equivalent CSS modification not working with IE 8

There are several posts relating to this, but none actually gives a solution. What actually happens is as follows: function LoadSpinner() { $("#divSpinner").css('display','block'); // could have done with .show() } function UnloadSpinner() { $("#divSpinner").css('display','none'); // could have done with .hide() } function OnClickMyBu...

prototype JSON to Object

Hi, The following is part of a JSON string returned from the server: { col1: { caption: 'Workspace', combodata: { c_0: { id: 0, value: 'Filter...' }, c_1: { ...

How to get the id of textbox created at runtime in a gridview in javascript.

I have a editable gridview. When I click on edit button corresponding to a row in the gridview I provide two textboxes to enter two new values.2 textboxes as I have 2 columns. Now this textbox are generated at runtime.I want to access this textbox in javascript and perform validation on them.This is the html syntax. <table cellspacing="...

[node.js] new to node.js - "http.Server" events.

How can we listen to "http.Server" events? Or how can we instantiate a "http.Server" object? According to nodejs.org/api.html: "http.Server" is an EventEmitter with events like "request", "connection" .. etc. However I can't find a way to listen to these event as I am not sure how to instantiate a "http.Server" object. All examples I ...

Why won't this object's prototype's init function run

I use the following function for creating new objects. function newObj(o) { var params = Array.prototype.slice.call(arguments,1); function F() {} F.prototype = o; var obj = new F(); if(params.length) { obj.init.apply(obj,params); } return obj; } And it works well most of the time. However one of my base "classes" is now defi...

Unterminated string constant

My Description contains an apstrophe('). How to escape it. <a href='javascript:select("<%= pageBean.replace(list.getColumn(0), "'", "'") %>", "<%= pageBean.replace(list.getColumn(1), "'", "'") %>");' title="<%=selRpt%>"> <span class='img-view'></span></a> "<%= pageBean.replace(list.getColumn(1), "'", "'") %>" is the description part i...

Jquery: mousedown effect (while left click is held down)

I need a function that executes a function while a button is pressed and stops executing when the button is let go $('#button').--while being held down--(function() { //execute continuously }); ...

set value of dropdown lists in Gridview with javascript

I have a dropdownlist and a gridview with a drop down list in every row. I have removed other cols in Grid for simplicity. Whenever a new value in the dropdownlist is selected I would like to set all of the dropdownlists in the gridview to that same value via javascript. (Yea both the dropdownlist outside the gird and the ones inside t...

Using AutoCompleteExtender - detecting when wrong result is searched for

I have an issue with my webpage which although relatively small needs to be fixed asap. The user can search accounts on the page in either of 2 boxes - a simple ID search, or a text autocompleteextneder. When either of the fields are searched, the page posts back and displays the customers details. I have an issue where that if they ent...

ExtJS - Post date values as Unix timestamp

I use an editorgrid to edit elements from a JsonStore. The JsonStore uses a HttpProxy to update the backend database. My problem is that the backend API expects fromTs and toTs to be Unix timestamps, but when a record is updated, the resulting http post contains a date formatted like this: Wed Oct 20 00:00:00 UTC+0200 2010 I've search...

JavaScript - detecting if user is browsing the internet using Fullscreen mode

Hello again, I don't want to open my site in fullscreen mode (as it's not possible without using Flash) or to open it in 'kiosk mode'. I want to ask the user to press F11 on his/her keyboard to turn the browser into fullscreen mode. And I want to know if he/she did it. Is there a way to determine if the current window is being browsed ...

Can't get video works with javascript

Kindly i want anybody to tell me what am i supposed to do to let this work I have a lot of .mpg videos on my server and i show their names in .aspx page through Gridview ,which has a column hold a link for watching and another one for downloading ..the one which used to watch the video has a HTML code "<a href='WatchVideo.htm?fileName...

how to disable a control in javascript

document.getElementById("ctrl").disabled = true; this works in IE but does not works in mozila. What shoul I do? ...