javascript

Onmouseover sound in Firefox

Hi, I'm using the following script for onmouseover sound effects on menu buttons on a site. <script LANGUAGE="JavaScript"><!-- var aySound = new Array(); aySound[0] = "s.mp3"; document.write('<BGSOUND ID="auIEContainer">') IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0; NS = (navigator.appName=="Netscape" && n...

How do you embed a javascript image gallery to iphone webapp in dashcode?

I have several pictures i would like to display in a javascript image gallery for my iphone webapp. Any ideas or sample code will help alot. ...

Nested class in javascript, inheritance of private methods.

Hi to all, i'm quite a newbie in javascript, and i'm spending some time trying to create namespaced objects in js. Now, that's what i'm trying to do: MainObject = function() { var privateVariable = "i'm private"; var privateMethod = function() { // doSomething } this.publicMethod = function() { // doP...

Scroller object not working in IE7 But Working in IE8

Hi guys, i am having difficulties trying to solve a runtime error that i get in IE7 but its working fine in IE8, it says that this.scroller is nutll or not an object for a scroller that i use.but what surprises me is that it is working on every browser. Please guys i need a solution.if i have not clarified my question please let me know....

Copy contents of one textbox to another

All, If suppose an entry is made First textbox can we retain the same entered text in second text box.IF so how is this done. <html> <label>First</label><input type="text" name="n1" id="n1"> <label>Second</label><input type="text" name="n1" id="n1"/> </html> Thanks. ...

Why is chrome so fast?

I was reading this article and Chrome seems to be way ahead of the pack. But why is it so good? It's only been around for about a year but it's much better than any of the others. Can anyone shed any technical light on this? ...

How to filter items and show items.

Hello, this is what I am planning to do. Suppose I have a list of names (in DIVs) <div class="person"> Mike Mulky </div> <div class="person"> Jenny Sun </div> <div class="person"> Jack Kickle </div> I would like a text box, where the user can type "Jenny", and filter out the DIV's with "Jenny" in them. What JQuery plugin can allo...

how to use decodeURIComponent in asp?

hi friends, From my javascript i try to post data to my asp page using encodeURIComponent var dd = encodeURIComponent(document.getElementById("Remarks").innerHTML); How i decode my encodeURIComponent in asp page using vbscript? hoping your support ...

How to show dropdown expanded automatically so that it displays all the options when page loaded

I have the need to show the DropDown (HTML select element) expanded initially when it is loaded so that all the options in the DropDown are shown. I searched quite a bit, but suprisingly, I did not find an answer to such a simple problem. I am using ASP.NET MVC with jquery. ...

Detect when a user arrives at the end of a readonly textarea in an html page

I need to detect when a user arrives at the end of a readonly textarea in an html page. The textarea will display a very long log for an application. The logs files are so big that is impossible to load all the text in one time (some log files are almost 200 MB). So I will load the first, say, 1000 lines, and then I need to detect when ...

How to unbind a function from an event among multiple functions?

Say for example, we don't know how many functions already binded to an event. In that case we can bind our own function like below var old = (element.onclick) ? element.onclick : function () {}; element.onclick = function () {old(); myOwn()}; Now how to unbind myOwn function alone without disturbing others? ...

Track any asp.net web services calls from javascript

I am writing a control that will warn a user that their session is about to timeout. I can easily track standard postbacks and post packs in update panels, but I'm struggling to see how I can track calls made to any / all web services. Is there a mechanism for this, or will I have to try and override the Sys.Net.WebRequest invoke code? ...

Is !document.cookie reliable?

I'm wondering if using the following Javascript code is reliable: if (!document.cookie) { alert('Cookies are disabled.'); } I've tested this in IE, Firefox and Chrome and it seems that when you disabled cookies, the document.cookie object becomes unavailable. Does anyone have any experience with this method working/not working? M...

HTML disappear after been created with javascript

Hi, I'm having another problem after solving this Trying to read XML file but he is always the same I'm creating HTML elements dynamically, and giving the values that i read from the XML file, the elements are always disappearing but after them been created. Any reason why that is happening? My Code is this in cs file script = "funct...

Joomla + Mootools XMLHttpRequest problem.

I'm building a Joomla extension and i'm trying to send some data to a php script, with MooTools, to be saved in a database. This is the code for the request : myReq: new Request({ url: '/index.php?option=com_calculator&task=saveData', method: 'post', onSuccess: function (responseText, responseXML) { ...

add bookmark in Firefox without any dialog box

Using JavaScript, is it possible to add a bookmark in Firefox directly, without opening any dialog box? That is, I want the user clic on a link and that the bookmark is automatically created, without the need to any further step. ...

how to create a loop in a function with another function?

Thanks for the help guys ...

Prepending html makes Google Chrome jumpy

Hello, Currently I have a site where a bar (with various links) is prepended to the body (actually appended to the source, but it is rendered on top of the page, so prepended to the result) using javascript. This Javascript is dynamically loaded trough an init script (which loads jquery, etc). Once jquery has been loaded the script is r...

Tile 2 popup windows

Hi all I have struggled with this for a week now and seem to hit walls everywhere I go...so here i am looking for some help with this....hopfuly it is possible. I need to TILE 2 popup windows....dont worry...not annoying ones and they will be at the request of the user ok...to the point. What im trying to is have a link on my site th...

Javascript Image object without instantiating

This question is about javascript performance. Consider 3 examples for illustration: function loadImgA() { new Image().src="http://example.com/image.gif" } function loadImgA1() { Image().src="http://example.com/image.gif" } function loadImgB() { var testImg = new Image(); testImg.src="http://example.com/image.gif" } ...