Set a Cookie





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

8
Date Submitted Mon. Nov. 6th, 2006 9:19 AM
Revision 1
Scripter Casper42
Tags JavaScript | MDI | Portal | utility
Comments 0 comments
This code is used in an Educational Portal product but can be tweaked to fit your need.

This code adds a small icon next to the title of a 'portlet' that resides on the page. By clicking the portlet title, the portlet usually maximizes within the constraint of the portal template - but the extra icon allows for the portlet to be opened in it's own window.

This simulates an MDI interface.
(REQUIRES PopItUp snippet)
11
Date Submitted Mon. Nov. 6th, 2006 9:12 AM
Revision 1
Scripter Casper42
Tags JavaScript
Comments 3 comments
I found this to be a neat little trick for hiding(somewhat) source javacscript code from peering eyes...

This function will unload all linked javascript files so that when you view source - you see no javascript files! (Especially helpful when using FF and using web-developer tools - no linked js files are displayed) The files remain resident in memory - allowing for the functions to work.

Just call the function in the tag
11
Date Submitted Mon. Nov. 6th, 2006 8:33 AM
Revision 1
Scripter Casper42
Tags conditional | JavaScript | loader
Comments 0 comments
This script will allow for conditional loading of javascript libraries. The example here only has one condition to check for IE or Firefox then loads the appropriate .js file.

This is part of an .aspx template for an educational portal product.

Usage for loading the script:

12
Date Submitted Mon. Oct. 30th, 2006 2:23 PM
Revision 1
Beginner Mattkins
Tags CSS | DHTML | JavaScript
Comments 3 comments
Allows you to hide all elements on an HTML page by their tag name. Extremely handy in getting around the "Windowless Elements" problem in IE, which is a bug that puts certain elements, most commonly select boxes, on top of any other element, no matter what. As you can imagine, this causes real problems with DHTML drop-down menus and such like. This is the simplest and quickest fix I've come up with, I simply set this function to run alongside the drop-down and all of the select tags vanish before a menu drops, then I run the show function when the menu retracts.
11
Date Submitted Sun. Oct. 29th, 2006 12:52 PM
Revision 1
Scripter SCoon
Tags JavaScript | PHP | Web
Comments 0 comments
Enforce loadig fresh script code for the external javascript files. Compatible with HTTP 1.0.
6
Date Submitted Thu. Oct. 26th, 2006 6:59 PM
Revision 1
Helper brendo
Tags forms | JavaScript | message | textarea
Comments 3 comments
This snippet also you to limit the input in a form field to a specified number of characters. It displays a counter so users can see how many characters they have left, and once they reach the limit the field just trims the length to your limit.

The following is a snippet from what I used when I implemented a tagboard to my site. Further revisions could/should read the LIMIT from the maxlength attribute
-10
Date Submitted Tue. Oct. 17th, 2006 3:25 PM
Revision 1
Helper jeremec
Tags Attribute | div | JavaScript | Name
Comments 7 comments
One way to group elements in HTML is to assign them a name attribute. Multiple elements can share a name, then you can easily access them as an array using the getElementsByName() method.

The problem is that some DOM parsers aren't keen on, or are ignorant to, this use of the name attribute, so a simple object.name returns undefined. In my case, it was a DIV in Firefox 1.5 that was behaving this way.

There is a simple work around for this that works in Firefox, I haven't tested it in others. It is to use the getAttribute method that is an extension of any element object.

This ability can be useful if you have a function that performs a transformation on the active element, and another transformation on closely related elements.
11
Date Submitted Mon. Oct. 9th, 2006 6:19 PM
Revision 1
Beginner strykstaguy
Tags firefox | JavaScript | xul
Comments 0 comments
Just a little code to make a window in XUL
18
Date Submitted Mon. Oct. 9th, 2006 3:36 AM
Revision 1
Syntax Master sundaramkumar
Tags JavaScript
Comments 4 comments
Add dragging to your div elements. just adding class="drag" to the div element will make it draggable.

Here i'm adding an example for a draggable dialog box
7
Date Submitted Sun. Oct. 8th, 2006 9:28 PM
Revision 1
Beginner trevis
Tags Array | JavaScript | setTimeout | String
Comments 3 comments
I use this function when passing an array to a function being called from setTimeout();