javascript

Trouble getting a reference to a ModalPopupExtender using javascript

I am trying to use the following code to get a reference to a modalpopupextender, but when I check the value of the javascript variable 'modal' it is always null. What is the proper way to get a reference to the AJAX control using javascript? .vb Dim myStringBuilder As New StringBuilder(246) myStringBuilder.AppendForma...

Import javascript dynamically with jQuery?

I'm trying to setup a widget framework using jQuery, so I need to import java script by parsing the widget's xhtml and including in the framework page. The problem is that this may lead to pollution of the namespace. Is it possible to load java script into a namespace at runtime? Perhaps there is some better method that I'm overlooking...

Where should I include a javascript reference for a view that inerhits from a Master view in ASP.NET MVC?

I have a bunch of pages inheriting from a master view. One one of these pages I want to use a popular jQuery plugin called "Uploadify". Where should I place the reference for the Uploadify javascript file? I only need it on one small page so it didn't seem right to place it in Master view. Is it 'Ok' to place it in the content tag ...

Rendering partial views (modal windows) in asp.net MVC

Sorry for the poorly-worded question. I was hoping to get everyone's ideas on the best way to handle this. I have a link on a master page that links to a contact form. If the user has javascript enabled, I want to open the form ion a modal window using jQuery. If not, the user will just be directed to the contact form page. The issu...

javascript date/time library recommendations?

Anybody have any? I want to be able to go from a Date object to something like "12:45 PM, Monday, June 11th, 2009". ...

Load Content On Tab Open Using Spry

Is it possible to load the content of a Spry tab when the tab is opened, rather than load all the content of all the tabs in the beginning? I would prefer accomplishing this without the use of an iframe. ...

Simple AJAX with GWT... I don't need widgets

Can GWT be used just for simple AJAX? I dont want the widgets, I just want to avoid coding javascipt. What I need is simple ajax, like clicking on a link and updating the contents of a div with data retrieved from the server, or things like that. Can GWT be used for that purpouse? if so, where can I get some help? All I find on the web i...

Using jQuery to select multiple values of attributes across a collection of objects

Hello jQuery Masters, In this example I am selecting a bunch of 'A's within 'LI's (it doesn't really matter what I am selecting, just know I am returning a group of 'A' tags that all have the same "attribute structure"). I was wondering how I would go about returning a comma delimited list (or object/collection) of "attribute values". ...

Emulating Google Keyboard Shortcuts

I'm really curious how Google (and now Facebook in the photo galleries) implemented shortcut keys such as J/K or Left/Right arrows. I'm afraid I don't have many details because I can't figure out by inspecting the source which piece makes those buttons 'tic', so to speak. What I'm specifically looking for is a way to bind buttons to Java...

In my ASP.NET app, registering a script from code-behind before a page has loaded throws an "operation aborted" error in IE

I understand that in IE 5.5, 6, and 7, when you modify a DOM element before it is 'closed', it throws an "operation aborted" error (this article has more information: http://www.clientcide.com/code-snippets/manipulating-the-dom/ie-and-operation-aborted/) In my ASP.Net application, I am registering a client script block on the page durin...

YUI Compression? gui? and comptible with european letterS?

Hi there, I am trying to find some sort of gui or batch utility where i can YUI compress a JS file i have.. I have a utility that sort of consolidates all my js into 1 single js .. and works great but i need to compress this file.. I was using something similar before to compress but it failed on european character i.e. character with ...

insert delet update xml file

Hey, I asked the almost the same question before also, but i have not yet been able to figure out how to solve this issue of mine. I have been assigned a project, in which I get a .xml file, which has field like, <TITLE>, <AUTHOR>,<ABSTRACT>, <COMMENT> and the <COMMENT> tag comes empty in the .xml, rest all the fields are already fil...

How do you clear a plain HTML form after onsubmit?

After the onsubmit event has fired and the form has been submitted (via an action="mailto:[email protected]") , is there a way to then clear the form, close the window or what? Is there a post submit that I can hook into via JavaScript. This must be a client side only solution. ...

What are the advantages to putting your Javascript in a .php file?

I occasionally come across pages where some Javascript is included via a PHP file: <html> <head> <script type="text/javascript" src="fake_js.php"></script> </head> <body onload="handleLoad();"> </body> </html> where the contents of fake_js.php might look something like this: <?php header('Content-type: text/javascript') ...

How do I parse content with regular expression using jQuery?

I am trying to use jQuery to break right ascension and declination data into their constituents (hours, minutes, and seconds) and (degrees, arc-minutes, and arc-seconds), respectively from a string and store them in variables as numbers. For example: $dec = "-35:48:00" -> $dec_d = -35, $dec_m = 48, $dec_s = 00 Actually, the data resi...

Write elements into a child iframe using Javascript or jQuery

I have something like this: <html> <body> <iframe id="someFrame"></iframe> </body> </html> And I would like to use jQuery to write elements such that the full equivalent HTML would be like this: <html> <body> <iframe id="someFrame"> <!-- inside the iframe's content --> <!-- <html><body> --> <div>A</d...

document.execCommand ..SaveAs issue with hidden elements.,

document.execCommand('SaveAs', false,'fileName' + ".txt"); I am trying to save the page in a file by using the above command in javascript. Issue: I have some hidden elements on the page..CSS Style [display:none], So when I try to save the pages content using the above command, it writes the hidden elements contents as well. Any ideas...

How can I detect if Flash is installed and if not, display a hidden div that informs the user?

How can I use javascript/jQuery/etc to detect if Flash is installed and if it isn't, display a div that contains information informing the user that they need to install flash? ...

How to get IFRAME to listen to same events as parent (and fire the same handlers)

I've got an HTML page (the parent) with an embedded IFRAME. The parent page has a couple of event listeners for mouse and keyboard events, as shown below (I'm using the Prototype library). var IdleMonitor = Class.create({ active: null, initialize: function(ii) { Element.observe(window, "mousemove", this.sendActiveSigna...

How to remove a Form.Element.Observer

I'm using Prototype 1.6. I create a new Form.Element.Observer, but is there a way to then remove it/stop it? Thanks ...