javascript

Firefox extension that overlays persistent iFrame?

Is it possible to build a Firefox extension that displays a floating, persistent iFrame over the page content? I know it's possible to add iFrames using XUL. For instance, you can add an iFrame to a persistent sidebar. However, I want the iFrame to float over the page content, not cause the content to shrink. So far, my only option i...

Is is possible to bind a submit() function before any existing onsubmit/submit?

I have a form with an onsubmit attribute. I need to bind a new submit event and I need this one to be executed before any existing submit functions. The following code demonstrates the problem. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Test</title> <script type="text/javascript" src="http://ajax.googleap...

Wrapping up Elements with JQuery

Hi Everyone, I do have a element and its content some where on the page : <div style="padding-bottom:9px; font-size:13px;line-height:25px;"> Fine quality, full grain pebble leather <br> <div style="line-height: normal; margin-bottom: 6px; "> Sophisticated black with detailed accent lining </div> Tailored satin...

select a different element other than the one clicked

How do I select an element with jquery, when a different element is clicked, when you don't know the name of the element? The code below is looping over the all the categories. I don't know how many categories there are, or what the names will be. When the 'insertUrl' link is clicked, I need to select the text area. The only thing I ca...

js or Jquery - obtaining viewable area of scrollable div

Hello, I currently have a a scrollable div that is populated dynamically. I have a function that captures UpArrow and DownArrow keyPresses and changes the classes within the parent div to have one child selected at a time (basically this mimics a select input) Here is what I want to do: I need the div's viewable area to change (go down...

Limitations and future of HTML+JavaScript for web applications

I am a non-web programmer, but I am getting now more interested in web technologies. I know that HTML and JavaScript are today the fundamental technologies for web applications, but it also seems that actually they were not created strictly for that. (HTML was created for web pages, JavaScript to make them a bit dynamic). Does it have a...

Get ExternalInterface definitions in Javascript

Is there a way to get a list of the exposed functions from a Flash object? For example, you could get a list of all methods in an object by executing: for (var i in object) { if (typeof object[i] == "function") { console.log(i); } } The only issue is that this won't expose any methods registered through the ExternalInterfaces...

jQuery hide/show method behaviour in IE7

Hi, I'm having a problem with the jQuery hide() and show() methods. Below is a snippet from a project I'm currently working on. This code comes from a multi-page form which is loaded in it's entirety, then jQuery is used to show and hide the various pages. I should metion that this technique works in every broswer except IE7. //Hide al...

How to serialize a file in JavaScript?

I want to implement an asynchronous file upload for my asp.net application. My idea is to serialize the file into JSON client-side and call a web service to reconstitute the file server-side. My question is: How do a read a file as binary and serialize it into JSON? The solution can't require the use of Google Gears or "must-install"...

Show hidden div with bookmarks

Basically I hide all of the answer divs on the page, but I want to show a div if the a user has clicked a bookmarked link to it. Here's the javascript code <script type="text/javascript"> $(document).ready(function(){ //hide the all of the element with class msg_body $(".faq_answer").hide(); //toggle the com...

Remove element from HTML with jQuery

I am building a system where the user builds their own navigation system, the process is when the user visits the site there is a llist of available topics they can select slect a top creates and accordion that holds all that topics content, clicking the topic again should remove the top, currently I have this code, but it does not work,...

ASP.Net: can onload event apply to a control.

I have some code like this: return helper.DropDownList(data.ModelEntityId.ToString(), selectList, null, new { onchange = onChange }); Where the onChange variable can be nothing, or loaded from some metadata. This works, however I also want to apply the javascript function to an onload event for that control also. Is there a way way ...

Validating HTML text box with javascript and regex

The below code works to only allow alphanumerics and spaces. However, I would like to also allow an accented character (Ã). How should the regex be modified? Thanks <html> <head> <script type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; <script type="text/JavaScript"> $(fun...

Jquery menu and slideshow don't play together nicely.

I am using the superfish menu and also a jquery slideshow on the same page. For some reason they aren't playing together nicely, I have no idea why. If you mouse over the links at the top there should be a fade effect for the sub menu items. I've uploaded a file so you can see how the menu doesn't work. http://www.wilwaldon.com/jqu...

Storing HTML in datastore and Decoding during XSL transformation

I'm trying to store html object tags for video players in a datastore. This data will be serialized and passed back to client javascript where it will be transformed and displayed in the browser to show the video. I need to be able to htmlDecode the data so that it is evaluated properly in the browser. Any ideas how to accomplish th...

Is a colon safe for friendly-URL use?

We are designing a URL system that will specify application sections as words separated by slashes. Specifically, this is in GWT, so the relevant parts of the URL will be in the hash (which will be interpreted by a controller layer on the client-side): http://site/gwturl#section1/section2 Some sections may need additional attributes,...

ASP.NET: How to call non-static page method with client AJAX script?

How can this be done? Does this exclude the UpdatePanel functionality when it's done? ...

Writing a script to DOM and having it run before DOM is done rendering

My JavaScript (say File 1) needs to fetch another JS file (say File 2) from my server and have it finish executing before the DOM is done rendering. File 2 is actually an ad script (e.g. AdSense) which uses document.write. I have noticed that if I fetch File 2 by creating a new script tag from within File 1 and appending it to the head n...

How to post a HTML form using Javascript that has both "application/x-www-form-urlencoded" and "charset=UTF-8" in the Content-Type header

Hey, I need to be able to specify using Javascript how to post a form that contains both the enctype as "application/x-www-form-urlencoded" and charset as "charset=UTF-8" in the Content-Type header. Any ideas? I have a aForm object of type Form. Thanks! ...

2 jquery scripts aren't working together.

I've been working with these 2 Jquery files for a while, trying to debug them but I can't figure out why they don't work together. Any advice would be awesome and greatly appreciated. Thank you in advance! ========START JS#1===================== window.onerror=function(desc,page,line,chr){ /* alert('JavaScript error occurred! \n' ...