dhtml

How to resize html canvas element?

I have a canvas element defined statically in the html with a width and height. If I attempt to use JavaScript to resize it dynamically (setting a new width and height - either on the attributes of the canvas or via the style properties) I get the following error in Firefox: uncaught exception: [Exception... "Illegal operation on Wra...

How to create a javascript floating div signup form

Hi, I'm building a site which will have a 'Login/Register' link on every page. Whenever someone clicks this link, I want a javascript/div based signup form to float ontop of the content with a link to 'close' it if they want. I also want the capability of the div showing up near the position of their mouse, i.e so if they click the lin...

How to create a DHTML menu?

I need to create a DHTML menu with the specified features, but I can't figure out how to do it. Here's what I need: All items are layed out horizontally. If they would be wider than the screen, two little arrows appear on the right side of the menu that allow to scroll it. Something like this: +--------+--------+-------+---+---+ | Item...

JavaScript: given a list of image URLs, how would one display the first non-broken image?

I receive a list of image URLs and currently I have several hidden img elements on my page (one for each URL in the list). When the page has finished loading, I use JavaScript to check the images and display (i.e., set myImage.style.display="inline") the first one that is not broken. This is quite simple. However, it requires that I requ...

How to create an HTML CSS Page with Header, Footer and Content

There are 3 parts to the page. Header, which has unknown content at design time as it is populated with text at runtime. All the text must be displayed, no scroll bars.( I think height : 100% does this) Content, the content should fill the page below the bottom of the header to the top of the footer. if there is more text in the cont...

Programatically execute a SPAN's Class from DOM Element?

This is a .NET program, and I am accessing the HTMLElements individually. There are pieces of markup that have a "More..." / "Less..." in a SPAN tag, that when Clicked will show more/less of the preceding content, A code snippet: <dd> Product Manager, Business Analysis & Web Design Manager, Global Portals at Dun & Bradstreet <span cl...

ASP.NET/DataList: Client-side postback by clicking list elements

Hi, I have a DataList control that displays a set of elements. Can anyone point me in the right direction on how I can add some client-side functionality for submitting/doing a postback when the user clicks an element in the list (e.g. anywhere in the that is the root of the list element. I've seen some examples by adding a hidden Link...

jQuery: invoke <a /> sub element of table cell.

Hi, Is it possible to add a jQuery function so that a click in a table cell will invoke a hidden <a href="javascript: ..." /> element (that is a descendant of the TD) ? I've tried with $('#table td').click(function() { $(this).find('a').click(); }); An other variants, but to no luck. --larsw ...

DHTML: Get updated element size

I'm updating the src attribute of an <img> tag in javascript. After I've done this, I need to get the new height of its parent <div> so that I can update the size of other elements on the page. If I retrieve the parent's offsetHeight property directly after updating the image's src, however, I get the height before the change was made....

column expands with "textbox width given in percentage" within table

I am using the following code --- EDIT @annakata : Adding the complete code <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> <table id="additionalContactsTable" name="additionalContactsTable" width="100%" > ...

Hide/Show Column in an HTML Table

I have an HTML table with several columns and I need to implement a column chooser using jquery. When a user clicks on a checkbox I want to hide/show the corresponding column in the table. I would like to do this without attaching a class to every td in the table, is there a way to select an entire column using jquery? Below is an exa...

change image-border on mouseover

hey there i have a problem, i'm working on a gallery php script and need help, i have a picture, it has a lightgray border around, and if theres a mouseover event, i want the border to turn gray. how can i do that? thanks in advance ...

Print <div id=printarea></div> only?

How do I print the indicated div (without manually disabling all other content on the page)? I want to avoid a new preview dialog, so crating a new window with this content is not useful... The page contains a couple of tables, one of them contains the div I want to print - the table is styled with visual styles for the web, that shoul...

HTML Text Input allow only Numeric input

Any quick way to set an HTML text input (<input type=text />) to only allow numeric keystrokes(plus '.')? ...

Very Advanced Javascript WYSIWYG editor

I need a solution where a user could enter the URL of a web page in my system. The page would load, and then the user could click a certain section that he wants to change. So basically what I need is, a way to display a web page inside my app (could possibly be done with frames but I'd prefer not to have a horizontal scroll bar), and th...

Could someone list the common javascript frameworks/libraries and the pros/cons of each?

So I have a lot of projects coming that could use a little dhtml pizzaz and I don't know which frame work to use for which project and any help would be appreciated. ...

Prototype plugin for dynamically expanding textarea

Does anyone know of a good plugin for prototype which allows textareas to automatically expand / contract based on how much text there is in them (e.g. a line is added the area gets bigger, a line is removed it gets smaller)? I need one thats free to use (e.g. some form of GPL type license). ...

Cross-browser way to determine whether a DOM event was cancelled

Is there a cross-browser way from a javascript event handler to determine whether the event has been cancelled by a previous handler? IE and other browsers like Chrome etc. have an event.returnValue property that can be tested, but FireFox doesn't appear to have any such property. Here's an example of the scenario I'm talking about. You...

DHTML menu not displaying

I am trying to display the menu using DHTML but I am getting a Javascript error and menus are not getting displayed. <script language="JavaScript" vqp_datafile0="Welcome to Epicenter Fitness_files/epicenter_nav.js" vqp_uid0="61625" vqptag="doc_level_settings"> cdd__codebase = "Welcome to Epicenter Fitness_files/...

Best technique for DHTML windows/dialogs in Prototype?

I love Prototype but it doesn't come with any widgets. In particular, it provides nothing for window/dialog creation. I've tried the Prototype Window add-on library but found it unreliable and it hasn't been maintained for a long time. Anyone have any recommended solutions? Or any recipes/patterns for creating a dialog from first princ...