javascript

onpropertychange for a textbox in firefox ?

How to handle the onpropertychange for a textbox in Firefox using javascript? below is an example var headerBGColorTextBox = document.getElementById('<%= tbHeaderBGColor.ClientID %>'); if (headerBGColorTextBox != null) { headerBGColorTextBox.pluggedElement = document.getElementById('<%= trHeaderBG.ClientID %>'); headerBGColorText...

Does anyone knows any Train-table-api service?

Hi guys, im wondering if there is any online service who provide API about the train timetables (arrivals, departure, etch..), at least for the european stations. I know www.bahn.de, who provide the accurated timetables for many european countries, but i didin't find any similar to a api service. My goal (well, just a future-project) i...

How to submit a textarea using wysiwyg editor and jquery

Ok, because I am such a noob and have no idea how javascript works... My thinking was flawed. I am halfway there now. I have taken one of the poster's suggestions and set up a function and then in the html form tag, I call it. This works. I thought that I needed to have an id selector to have JQuery trigger but that isn't the case. I'm s...

Optimum query delay for autocomplete

In a yui AutoComplete or similar how many milliseconds are you using as query delay (time between the last key input and the request to the server)? I recently changed the default value of an autocomplete cotrol similar to yui's from 750ms to 280ms using Keystroke-Level Model as a reference. Any other useful references out there? ...

How can I apply prototype's toggle to content loaded via JSON, IE problem only.

I use PHP and javascript via prototype. i have a threaded comments page that on open by default via javascript call to a PHP file data returned via JSON, only parent comments are retrieved in the db. (in short only parent comments are fetched from db and displayed) then the parents are loaded and formatted to be shown on the page with a...

UI iphone submit a form to javascript

Hi all. I want to make a button in UI iphone (not web iphone) to submit a form (with elements) to Javascipt like the mention below: I have already a javascript file in my page: htpp:/www.myaddress/myfile.js This javascript contain a function called "doTransmit(PIOform)". I want to create a form in UI iphone application consists some f...

Does javascript force specific charset?

I am trying to use javascript, without framework(prototype, jQuery,etc), to insert data passed from a html form to an mysql database. I have managed to get this working but, get a problem with some special characters commonly used in my language(æøå). utf-8 supports these characters, and everything works fine when I skip the javascript. ...

Javascript/CSS Disable text select

Hello, I am trying to create a text button using simple span and formatting the text and providing onclick behavious. The problem is when a user clicks on the button, it sometimes highlights the text of the button. I want to avoid such behaviour because it looks damn ugly when the text is selected. Any css/javascript/(jquery) i can use...

Which keyCodes kan I safely use to make my website accessible?

Hi, update: Got a beautiful app with exclusive shortcuts for every view, all javascript. I'm gonna look into Fogbugz, i like the hovering shortcut-codes, thanks for the reference. i want to make my site accessible and more usable for visitors. Which keyCodes can I safely use to handle certain javascript actions? With safely I mean: ...

How come this function always returns 'undefined'

function getLongLat(address) { geocoder = new GClientGeocoder(); if (geocoder) { geocoder.getLatLng(address, function(point) { if (!point) { return "null"; } else { return point; } } ); } } If I put alert(point) in I get the longitute ...

Debugging the base URL element with Firebug

I'm adding the base URL tag to the document head using JS, so the relative links on the page work. But it does not take effect, and Firebug (debugging addon for Firefox) shows the <BASE /> element greyed out.. why? Does this mean Firefox cannot understand it or the syntax is incorrect? ...

Dynamic add row javascript function works in Firefox but not in IE

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html> <head> <title>:: Gharsansar Spices Order Form ::</title> <script language="javascript" type="text/javascript"> function addRow(tableID) { var rowCount; var rowno; ...

Javascript function not working in Mozilla

hi, Below function is working fine for IE, but not working for Mozilla and other browsers function CloseSession() { alert("Inside Close"); if ((window.event.clientX < 0) || (window.event.clientY<0)) { alert("Inside Events"); location.href = '/forms/sessionkill.aspx'; } } What...

JavaScript - Traversing the HTML DOM using childNodes causes errors in Non IE browsers

I have the following table being rendered in my browser. It's generated from the server side. <table id="tblQuestions" class="tblQuestionsContainer" border="0"> <tr> <td id="1" class="tdQuestion">Are u an indian citizen ?</td> </tr><tr> <td><table id="answer-1" border="0"> <tr> <td><input id="answer-1_0" type="radio" name="...

Read Session Id using Javascript

Is it by any means possible to read the browser session id using javascript? ...

How to calculate RadGrid cell value on Client side?

I have telerik RadGrid which is in edit mode. Each cell contains NumericTextBox. Is it possible to calculate one cell based on other cells in the same row (on client side). For example if I have a row which contains cells like price and item I want on every change to calculate total price but on client side, without going to server sid...

Selling Javascript Code

Hello, I am planning to sell a javascript code that I have written. Given the current state of browsers its quite possible to write complex code. I think I will face a couple of problems/have a couple of questions: Javascript being client-side can be easily copied as soon as I show someone a demo Are there any companies selling javasc...

How to create json by javascript for loop ?

I have array of select tag. <select id='uniqueID' name="status"> <option value="1">Present</option> <option value="2">Absent</option> </select> and I want to create a json object having two fields 'uniqueIDofSelect and optionValue' in javascript. I use getElementsByName("status") and I iterate on it. EDIT I need out pu...

jQuery Table to CSV export

I'm using the jQuery Table to CSV Plugin. I've altered the popup so that it tells the browser to download a CSV file. It was: function popup(data) { var generator = window.open('', 'csv', 'height=400,width=600'); generator.document.write('<html><head><title>CSV</title>'); generator.document.write('</head><body >'); generato...

javascript naming conventions

I know there is a lot of controversy (maybe not controversy, but arguments at least) about which naming convention is the best for JavaScript. How do you name your variables, functions, objects and such? I'll leave my own thoughts on this out, as I haven't been doing JS for long (couple of years, only), and I just got a request to crea...