client-scripting

Getting the text from a drop-down box

This gets the value of whatever is selected in my dropdown menu. document.getElementById('newSkill').value I cannot however find out what property to go after for the text that's currently displayed by the drop down menu. I tried "text" then looked at W3Schools but that didn't have the answer, does anybody here know? For those not su...

Javascript events

I'm aware of things like "onchange", "onmousedown" and "onmouseup" but is there a good reference somewhere that lists all of them complete with possibly a list of the elements that they cover?...

Removing elements with Array.map in JavaScript

I would like to filter an array of items by using the map() function. Here is a code snippet: var filteredItems = items.map(function(item) { if( ...some condition... ) { return item; } }); The problem is that filtered out items still uses space in the array and I would like to completely wipe them out. Any idea? ...

Best way to fix CSS/JS drop-down problem in IE7 when page includes Google Map

I have a page using < ul > lists for navigation (Javascript changes the styling to display or not on mouseover). This is working fine for me except in IE6 and IE7 when I have a Google Map on the page. In this case the drop-down simply does not work. However, the page continues to work in FireFox 2. I have done a little bit of research...

What's a good bit of JS or JQuery for horizontally scrolling news ticker

Hi, I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list. The produced HTML needs to be standards compliant as well. I have tried liScroll but this has a habit of breaking (some content ends up on a second line at the start of the scroll), especially with longer lists. I ...

Xsl relative path for xsl:import or xsl:include

I am trying to use VBSctipt to do an xslt transform on an xml object. The xsl file I'm translating includes the <xsl:import href="script.xsl"/> directive. If I use the absolute href (http://localhost/mysite/script.xsl) it imports the style sheet fine; however, if I use the relative path (script.xsl) it reports "resource not found". I ne...

What are alternatives to ExtJS?

So what I'm looking for is a javascript framework I can use that has several UI controls. I have taken a look at jQuery but those controls are very basic compared to ExtJS. Are there any other competitive alternatives? ...

ASP.NET AJAX: How to get a client instance created with the $create method?

Hi, Using the client-side ASP.NET AJAX library, I have created an instance of a client component with the $create shortcut-method (http://msdn.microsoft.com/da-dk/library/bb397487(en-us).aspx). The object is attached to a DOM element. Now I need to get a reference to the instance, but it is neither registered on window or on the DOM ele...

Sending emails with Javascript

This is a little confusing to explain, so bear with me here... I want to set up a system where a user can send templated emails via my website, except it's not actually sent using my server - it instead just opens up their own local mail client with an email ready to go. The application would fill out the body of the email with predefin...

How can I debug JS code in CSSEdit??

Yeah, sounds silly but I'm a designers and the site I'm working on is not working in CSSEdit. Which is bad for me, very bad. The site has a massive JS/Ajax client and works in all browsers, IE, Firefox and Safari that uses the same browser engine as CSSEdit! Since MacRabbit has no customer service (they don't really answer email) this i...

Override members on a built-in JavaScript object

I would like to override the default behavior of the offsetParent member of all html elements. I would like to do something like this if it's possible: // For <div id="foo"></div> var oFooElem = document.getElementById("foo"); oFooElem._offsetParent = oFooElem.offsetParent; oFooElem.prototype.offsetParent = function() { window.statu...

Why doesn't my form post when I disable the submit button to prevent double clicking?

Like every other web developer on the planet, I have an issue with users double clicking the submit button on my forms. My understanding is that the conventional way to handle this issue, is to disable the button immediately after the first click, however when I do this, it doesn't post. I did do some research on this, god knows there'...

Access DOM elements after ajax.load

I am inserting the HTML response from an AJAX call into my page, but then when I try to access those elements after they have been created, it fails.. This is how i retrieve and insert the HTML: $.ajax({url: 'output.aspx', data: 'id=5', type: 'get', datatype: 'html', success: function(outData) {$('#my_container').html(out...

Data processing in HTML without server code (using just Javascript)

I was just wondering whether there is some way to do this: I have a form in a web page, after the user submits the form, the page is redirected to another static HTML page. Is there any way to manipulate the data in the second HTML page without the help of any server code? I mean can I display the form data that the user submitted in ...

How do you avoid duplication of validation on the server and client-side?

How do you avoid duplication of validation on the server and client-side? Is there a web programming platform that generates one from the other, so I don't have to keep the two in sync? ...

Generate HTML Table Client Side

(ASP.NET Web Application) I'd like to create a page which allows the user to build an HTML table. The user will be provided with the following controls: a textbox used to define the amount of rows in the table, a textbox used to define the amount of columns in the table, and a bulleted list of shapes (ex. Square, Octagon, etc) which wil...

How is callback with arguments executed?

Hi I got acquainted with jQuery a few days back and am beginning to realize the little magic it can do. I am curious to know how exactly a callback with arguments is executed in jQuery i.e. what is the exact execution sequence? I went through the link http://docs.jquery.com/Tutorials:How_jQuery_Works and it speaks of a wrong way i.e....