javascript

Moving Tiny MCE before the textarea

I want to customize tiny mce according to my needs. If someone have any idea about it please help me. The issue is when you add tiny mce to your page it is positioned after your textarea in HTML dom. ie. <textarea class="fckEditor required" name="data[Banneramend][summary]" id="data[Banneramend][summary]" style="display: none;"/> <sp...

jQuery UI number spinner event question

Hi, I've been stumped on this problem for over a week :( Any insight into this problem would be hugely appreciated! How do I link a jQuery UI number spinner/stepper (http://wiki.jqueryui.com/Spinner) so that a label text value changes as the spinner value increments or decrements? ... <script type="text/javascript"> ...

how to prevent multiple form submit from client side?

sometimes when the response is slow, one might click multiple times on the submit button. How to prevent this from happening? ...

how to get body content of iframe by javascript?

<iframe id="id_description_iframe" class="rte-zone" height="200" frameborder="0" title="description"> <html> <head> </head> <body class="frameBody"> test <br/> </body> </html> </iframe> Here,what I want to get is : test <br/> ...

Queuing and stop propogating a click event to inside a div in Javascript

I'm trying to implement a "wait for 3 seconds to do this operation" <div>. So, I have a <div> that has a bunch of elements in it that I want to be unclickable for say 3 seconds (a timer, or some other event), but somehow capture the events in a queue, and then fire them after the period (or some event of my choice) has elapsed/performed...

how to append a css class to an element by javascript?

suppose id is known, so the element can be specified by document.getElementById(element_id); but I don't know if there is a built-in function that can be used to append a css class to that element? ...

Aliasing a DOM function (Document.Write) and scripts on other domains

I want to force external 3rd party scripts (on seperate domains) to use my own custom implementation of document.write when I load them on my domain. ie: document.write = function(args) { // My custom Function } This works fine for scripts on the same domain, but scripts on other domains use the browser default. Can I overrid...

RegisterOnSubmitStatement after client-side validation

I need to insert a bit of Javascript into the process when a Web Form is submitted, but after the client side validation takes place. RegisterOnSubmitStatement seems to place the javascript before the validation. Anyone know how to get it to render after? Solution found: In a web control, I put something like this: protected overr...

How do you write a class in Javascript?

Possible Duplicate: What's the best way to define a class in javascript How do you write a class in Javascript? Is it even possible? ...

How to use PHP inside JS files (with Symfony)?

I found this: http://www.symfony-zone.com/wordpress/2008/12/13/use-routing-to-server-localized-and-dynamic-javascript/ But I saw that it has already been built into Symfony with the use_dynamic_javascript() AssetHelper. I can't find any documentation for using this helper though. Any examples, links, or anything to help? Thanks. ...

Javascript and CSS Lightbox that can view PDFs

Has anyone ever found any lightbox type javascript / css code that can display PDFs? I have tried many libraries and none have worked for me. The environment needs to be IE6/IE7 compatible. I am looking for something similar to this: Lightbox 2 ...

How can I create a javascript library in a separate file and "include" it in another?

First, a caveat. The main script is not run in a webpage. I will be running the .js file in Windows using Windows Script Host. The problem: I would like to create a javascript "library" containing a number of objects, each with a number of functions. I expect this library will get rather large with time and would like to keep it in a se...

Dynamically Preloading/Displaying Webcam Snapshots on a Web Page Using AJAX

I have an IP Camera that streams out live video to a web site of mine. Problem is, it is powered by an ActiveX control. Even worse, this control is unsigned. To provide a more secure alternative to the people that are using browsers other than IE, or are (rightfully) unwilling to change their security settings, I am tapping into the c...

Latest jqModal release: "live" link triggers won't work.

With the latest jqModal release (+r14), I'm having an issue with the new feature of live links. Whenever the live-loaded trigger link is clicked on, it redirects to the HREF instead of loading it via AJAX. How can I make it behave normally? I've searched around and other people seem to have this issue, but it's gone unresolved. $('a.mo...

JavaScript Background Perspective Library

I remember seeing this on Ajaxian and a couple other sites but I never bookmarked it, now i can't find it again. It's a javascript library that allows you to move your mouse over an image that's been chopped into layers and change perspective. Any links would be appreciated. ...

How to make a Firefox addon listen to xmlhttprequests from a page?

Background I have an existing extension designed to accompany a browser-based game (The extension is mine, the game is not). The extension had been scraping the pages as they came in for the data it needed and making ajax requests for taking any actions. Problem The game developers recently changed a number of actions on the site to use...

How to get value of a select option that was written on the fly with innerHTML = "<option>";

I have writen options to a <select> using something like Id.innerHTML = "<option value='foo'>Foo</option>"; But on submission i get no value from the option? How can i correct this? ...

jQuery/Javascript - How to fire an event when a button's value is changed?

I am working on a plugin for jQuery that will essentially style certain elements. Like jqTransform I could just replace the element but I chose to position the real element off screen and make a new element thats styled. This allows triggering the actual events of the real element. Also, if an onclick handler or onchange handler for a te...

How do I Inject Javascript with Firefox Extension

Hey guys, I am building a Firefox extension and have come a long way. One of the parts of my extension is where I display a DIV at the bottom of the page and I want to put an ad into the div, but for some reason every time it does so, it redirects to another page entirely with the ad on it. So it looks like its not allowing me to inse...

How do I keep Firefox from prompting for username/password with HTTP Basic Auth with JQuery AJAX?

I'm writing some browser side dynamic functionality and using HTTP Basic Auth to protect some resources. The user experience is very important and is highly customized. Here's a simple test JQuery method that eventually will test if a user has supplied the right credentials in a form: $(document).ready(function() { $("#submit").cl...