dhtml

table to horizontal bar graph in jquery

I cannot really tell more I have a table 1-joe-234 2-bob-432 3-sean-654 i like to take it and get a bar graph with it Not that there is no lib on the net, but is prototype or flash xml file -- the solution i am working on, is a jquery plugin that will generate a html link for google chart... not pretty but KISS (really simple) and...

Frames, scripts, and load order

If I have a document with a frameset and some javascript defined in a head tag, i.e something like this: <html> <head> <script> function foo() {} </script> </head> <frameset> <frame src="A.html"> </frameset> </html> I am already assuming that the frame (A.html) fires its onLoad event handler before that of its...

Deep cloning vs setting of innerHTML: what's faster?

I'm trying to figure out the most performant way of deep-cloning a DOM tree within the browser. If I start out with var div = document.getElementById("source"); var markup = div.innerHTML; What will be faster, var target = div.cloneNode(true); or var target = document.cloneNode(false); target.innerHTML = markup; I understand th...

Frameset problem in html

Hi friends, I have created a website with multiple no of pages with in a same folder (i mean all those pages are with in a folder). I have developed this design under the frames. I have used 3 frames top for banner, left side for menu and and right side for main page. While clicking the left side menu frame i just navigate the main page...

Change textNode value

Is there any way to change the value of a DOM textNode in web browser? I specifically want to see if I can change the existing node, rather than creating a new one. To clarify, I need to do this with Javascript. All text in the browser is stored in #textNodes which are children of other HTML nodes, but cannot have childr nodes of their...

Why is my TinyMCE hidden textarea acting up?

I have about 7 textareas on a web page, all of them are rich text editors using TinyMCE. However at page load only 1 of them is visible and the rest of them hidden. The user can click a 'show' link which would display the remaining textareas one by one. However, I have a weird problem. All the textareas are setup like this: <textarea c...

Flash-like visual effects in JS / jQuery

I know there are thousand of visual effects made in JS that can be found on Google. But most of that effects are useless in web-design, or are outdated like "clock following mouse cursor" :| Also I know sites like http://www.chromeexperiments.com and http://www.dhteumeuleu.com but those examples make web-browser uses 100% CPU power and m...

Boolean HTML Attributes

There are some attributes in HTML which are "boolean" - browsers treat them as "true" if they are present, regardless of the value. An example of such an attribute is selected on the <option> tag. Another is checked on <input type="checkbox">. If you have a call to setAttribute() for such an attribute, there seems to be no value you can...

HTML layer over YouTube player

Anyone here have success with layering HTML content on top of the YouTube player embedded using swfobject (v1.5 or 2.0)? I'm able to layer HTML over flash in other areas of the site. Problem is specific to YouTube's player and IE6/7. I'm using absolute positioning and z-index on the HTML layer. I'm passing wmode=transparent in as a pa...

How to create a modal popup using javascript

hi everyone how to create a modal popup window with background with gray color using javascript and css. can any body show me the example. it's urgent Thanks & Regards Ravi Kumar ...

raise javascript events or get an object from XY coords

Hi, I can get an object if it's moused over. I can get the coordinates of the mouse at any given time. How do I get an object given it's coordinates - if they are different from the mouse? Essentially the user is dropping a div on a certain place on the screen. Since the div is wider than the mouse cursor, I need to know what object ...

Adding options to a select using Jquery/javascript

What's the easiest way to add an option to a dropdown using javascript? Can this work? $("#mySelect").append('<option value=1>My option</option>'); ...

JQuery Modal Popup after window.location

Below is the information required for this problem. default.aspx /test/default.aspx When default.aspx loads the user clicks a button which should then redirect to /test/default.aspx. I have the modal popup working just not with the redirect and ideas? I have tried doing window.location = "/test/default.aspx"; and using a custom settim...

html parsing errors when dom is dynamically updated to new html content

I have recently started upgrading my website to send and receive requests/response through ajax. I'm using the protoytpe library. My exisiting html code contains certain img and input tags that aren't closed. When i try to update the content of a element (say "div") with such html code by using the innerHTML property, i get parse error...

How to get value of textboxes, textareas, and radios in the same way in Javascript?

I want a function/code which will return the value that the user submitted for the field whose name/id is passed on to it. It shouldn't matter whether the field is a textbox, textarea, radio, or select. For example, the field could be: <input type='radio' name='a_21' value='test' id='a_21_0' /> <input type='radio' name='a_21' value='tes...

javascript WYSIWYG HTML editors?

What are the options for something that will let users make text bold/italic/underline/etc as they are writing in a textarea and work in all browsers? ...

How to find selection in HTML document that contains iframe or just frames

Is there a way to find the selected text in an HTML document if the text may be within one of its frames (or iframes)? If the document has no frames it's simple: var text; if (document.getSelection) { // Firefox and friends text = document.getSelection(); } else if (document.selection) { // IE text = document.selection.createRange...

how do I programmatically click on an element in firefox?

In IE, I can just call element.click() from javascript - how do I accomplish the same task in Firefox? Ideally I'd like to have some javascript that would work equally well cross-browser, but if necessary I'll have different per-browser javascript for this. ...

Javascript function objects

I edited the question so it would make more sense. I have a function that needs a couple arguments - let's call it fc(). I am passing that function as an argument through other functions (lets call them fa() and fb()). Each of the functions that fc() passes through add an argument to fc(). How do I pass fc() to each function without h...

How to create a modal popup using javascript and CSS

Actually, two questions: How can I create a modal popup with background color of gray? Also I need to create for a cover background color only to table itself. Not to overall page. How do I do this using javascript and css? Thanks & Regards Ravi ...