javascript

jQuery UI Tabs - link to tab

Hi There, I am trying to add links to skip to step 4 on my jQuery UI tabs. Can anyone see why this is not working? <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="/js/jquery-ui-1.7.custom.min.js"></script> <script type="text/javascript"> $(function() { var $tabs =...

Notifying iFrame page from Firefox extension?

I'm writing a Firefox extension and need to notify an iFrame page of certain events. The iFrame page is contained within a sidebar created by the extension, and this iFrame page is controlled by me. When I load the iFrame page, the extension code needs to send a notification and trigger something to happen within the iFrame page. To a...

Getting Parent Page name

How to get the parent page name of the modal popup dialog? I have one page that is using in two or more pages by using modal popup. When the close button of the modal popup dialog window, it will redirect to the orgin. But where from we will get the parent page name by programmatically? ...

Javascript tabs widget with drag and drop reordering

Do you know of a tab widget that has built-in drag+drop reordering? I'm building an editor-like interface and want to allow the user to reorder their tabs. So far I've been using ExtJS with a community plugin, but it's buggy and usually needs updating with every new ExtJS release. ...

Way to tell if a map tile image has loaded successfully using OpenLayers

Using OpenLayers, is there an easy way to tell if a map image has loaded correctly, perhaps using the “loadend” event? We are reading map tiles from GeoServer, and using OpenLayers to display them. Most of the time, the image displays in a reasonable time. Occasionally (especially when scrolling back and forth using the mouse wheel), ...

Style switcher help

I need some help I have made a style switcher, but I cannot work out how to replace the stylesheet, at the moment my code empties the <head> where I need it to just replace the previous stylesheet, this is my code, Menu and javascript <ul id="options"> <li><a class="option" href="<?php echo base_url();?>welcome/setBackground/red">Red</...

copy html div in javascript variable using jquery

in my aspx page i have a div which contains simple html ,has some id(say 'datadiv') using jquery i want to get the html of that div (entire div) into a JavaScript variable how can it be done? thank you. ...

Place content in JavaScript (HTML files)

Hi, How to place content (example: simple text) in JavaScript? I need it to be like youtube, where the video is only visible on JavaScript enabled browser. Thanks. ...

How to access element by index name by Jquery?

I have several INPUTs: <input type="text" name="entry[1]" value="aaa" id="firstEntry" /> <input type="text" name="entry[2]" value="bbb" id="secondEntry" /> <input type="text" name="entry[3]" value="ccc" id="thirdEntry" /> How to get "2" when I know that element id is "secondEntry"? var name = $("#secondEntry").attr('name'); // name =...

SharePoint strange behavior?

Hi everyone I have a strange Behaviour issue with Sharepoint. I'm testing some javascript in the content editor web part and ran accross this issue. When Creating DOM Elements dynamically in a normal HTML Page as shown below, I am able to retrieve the values from the created Element. When I however try this in a Sharepoint Content Edi...

web base online diagramming (how are those software implemented)

could someone guide me on how web based online diagramming software's work. i would really appreciate if you could point me example resource to get some knowledge on this. Following are the some of the samples web based online tools that i have been trying to studying www.creatly.com http://smoot.sourceforge.net/smoot/ this second ...

how wmd avoid the js injection?

How to avoid the wmd editor's js injection? Code like below: < a href="http://www.abc.com"&gt;abc&lt;/a&gt; <br /> <script>alert('hello')</script> ...

changing of text color and image background color using css and javascript

hi everyone, i want to write a script for changing of text color and image color on click .. here i want to call the external style sheets (which i ll be creating) to the function .. each color ll be ve ng differnt .css page. so that when i click the orange color the text and the image background should change to to the orange color if i...

[jquery] Auto Calculating for input field values

Hello, My Html is like this: <input class="gbTransform" type="text" name="maxdl" value=""/> And javascript like this: $('.gbTransform').change(function(){ var sz = $(this).val().match(/(\d+)gb/i); if(sz.length > 1){ $(this).val(parseInt(sz[1])*1024); } }); What this does is when a user types 1...

Message box like Facebook

How to create those message box in php, just like the one in facebook. Or any reference that you could give me that deals with designing. ...

JavaScript for loop not working

I have the following scenario First I get the total rows in my html table with JQuery as follows var rowCount = $('#update_menu_items tr').length; and then I get a result back. Now I want to loop threw values with a for loop that should not exceed the rowcount, but I do not get a result back, since loop does not work. Not sure if I ...

YUI - Pros and Cons

I'm about to begin a new project and plan to use YUI and my JS and CSS framework for the following reasons: Treeview with tri-state checkboxes (seems to be the best implementation I could find) Calandar (seen others, but since #1 is on YUI, I'm glad it also has calendar) CSS framework (was going to use 960, but might as well go 100% Ya...

JQuery Treeview with Tri-State Checkboxes

Does anyone know of a JQuery solution for treeview with tristate checkboxes? I'm looking at using YUI, but have more experience in JQuery. ...

Display Loading Image before a page gets loaded completely

Hello, I want to show a loading image before the content of the whole page is loaded. How to achieve this? I'm working in ASP.NET. Thank you. NLV ...

intercepting javascript alert()..? is it acceptable?

Hi, I just found we can intercept the javascript alert() native call and hook the user code before the actual execution. check out the sample code.. function Test(){ var alertHook=function(aa){ this.alert(aa); } this.alert("aa"); this.alert = alertHook; alert("aa"); } so everytime i call alert("aa") ...