javascript

javascript videos duration

Hi friends I have got requirement for finding the duration of Videos using JavaScript. Can any one please help. ...

Is the JS SO comment character "limiter" avaliable somewhere?

Is the JavaScript that SO uses to display how many characters you can add to your comment available somewhere or is it "private", as it not available for download legally? I'm looking to do something quite similar. The reason I ask is mostly because I don't want to rewrite something that has been done hundreds of times and the SO one is...

Website won't display on IE, but source code is viewable.

My website doesn't seem to display any element or content when viewed on IE even though source code is viewable, but on firefox and chrome it loads fine. What is up??? http://uber-upload.com I don't remember ever trying to load my website with IE, so i can't confirm if it ever has worked with IE. Please help me debug =/. WADAFA!??! Tha...

render complex org chart similar javascript/flash/java graphic library

i am looking for javascript/flash/java graphic lib. that able to render nicely a very complex relationship where one node is relate to another node etc. for example a--> b---> c b--> d,e,f any recommandation library? ...

jQuery reports incorrect element height in Firefox iframe

Here a short test to demonstrate my problem. I have a page that loads an iframe: <html> <head> <title></title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"&gt;&lt;/script&gt; </head> <body> <iframe id="iframe" src="box.html" style="width: 100px; height: 100px"></iframe> ...

Automated Testing of Component Handlers in 3rd Party Javascript

I'm currently using WebAii and WatiN to try and automate some tests of a 3rd party web product, to see if some data migration will break the web portal. The problem I'm having is that they have used Component Handlers in their Javascript, and so invoking a Click on a web-part (SPAN, DIV etc) is not triggering the generic handler. /...

progress bar while waiting for server

hi Some operations are time costly and it takes long time while waiting them to finish. Sometimes timeout occurs. I want to use a real time progress bar, so I want to show the status to the user and also I want to prevent timeout. Which technologies must I use? JS, Ajax, multithread or both? and how can I iplement this? Please advice. ...

How to change statusbarpanel background color in firefox extension

I'm writing a firefox extension which displays a statusbarpanel containing some text. I want to change the background color of my statusbarpanel depending on the message. e.g. red background for errors. var pnl = document.getElementById("panelId"); pnl.label = "OK"; pnl.style.color = "white"; pnl.style.backgroundColor = "green"; All o...

Is it possible to detect when a user switches to a different browser tab?

I'm trying to detect when a user switches away from the current browser tab, to another tab. Listening for window.onblur works well in firefox for detecting when the user switches focus to another window, but it doesn't seem to fire when the user switches to another tab. However, it seems that onfocus is fired when switching to the tab...

Three level nested forms in rails using accepts_nested_attributes_for

Hi, I've been trying to implement a dynamic multi-model form with accepts_nested_attributes_for in my rails application. I've been following Eloy Duran's complex-forms example that shows a 2 level implementation, but I've been trying to expand this to 3 levels. Is there support with accepts_nested_attributes_for for a 3 level form? Ca...

Using JQuery, how can I make a <div> appear, then add some html, then remove the html and then hide the div?

<div id="message" style="display: none"> <!-- Here I want to place a message. It should be visible for 3 seconds.Then clear the div to get ready for the next message. --> </div> How can I do the following using JQuery ? 1.Insert a message into div with id="message" and make div visible. 2.Make the message visible for 3 seconds....

Move jQuery to the end of body tag?

My friend read an article on net which mentioned that move all JavaScript file to the end of body closing tag (</body>), this is a valid point to move all JS files to the end of body tag. I have moved all JS files to the end except the JQuery and the JS files which are attaching event to an element on page, like below; $(document).rea...

Dynamic width of Table as per column

I have one table which display data as from Dynamic Content, I want to make table width 100% when there is 6 cols. and table width auto if less the 5 cols. I tried with CSS but, when there is only two cols , it expand two cols to full width while have table 100% width and looks awkward. Is there any Javascript , jQuery script available...

dynamic updating of a web page

I need to change a part of my web page content dynamically without refreshing the entire page. Like Myspace or Facebook users gallery. Does anybody know of any useful scripts with a working back button and changing address URL accordingly? ...

How does alfresco's javascript( not webscript) mechanism

When I play with alfresco share, I found it is difficult to track the UI and javascript. you can only see some class name in the HTML tags, But you are difficult to know how are they constructed, And When, where and how can these scattered HTML code can render such a fancy page. Can someone help me ? Please offer several example and...

<select> tag optimization using Javascript

This is technically a repost of this question I tried my best but I could not get what I wanted.The CSS stuff did not work for me.I need your help from scratch to achieve something like the one here.Please help me This is my code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>...

Detect mouseover of certain points within an HTML canvas?

I've built an analytical data visualization engine for Canvas and have been requested to add tooltip-like hover over data elements to display detailed metrics for the data point under the cursor. For simple bar & Gaant charts, tree graphs and node maps with simple square areas or specific points of interest, I was able to implement this...

application that uses OAuth and javascript

I am planning to create an app that uses JavaScript and it needs to use OAuth to authenticate user for a website. Can anyone help me out please? Any sample code? I know about the Google Code Javascript OAuth library but I am not sure how to implement that.. ...

What tools are available for documenting JavaScript?

Hi, I have some JavaScript to document and am not sure which tool is best to use - ideally I would like to publish the docs online but also have an offline browsable version. I know there are more tools about than jsdoc nowadays - any experiences of different doc tools for JavaScript would be useful. If it has a maven plugin that would...

Add javascript event to jqGrid

Hi, I'm using jqGrid plugin and I want to add onKeyPress event to each field of edit form. This code works for IE8, but fails in FF and IE7 {name: 'name', index: 'name', width: 200, editable: true, sortable: false, search: true, editoptions: { readonly: false, size: 32, 'onKeyPress': 'if($("#cbLanguage").attr("checked"))to...