Click here to Skip to main content
15,881,797 members
Articles / Web Development / HTML

JavaScript Regular Expression Tester

Rate me:
Please Sign up or sign in to vote.
4.67/5 (15 votes)
19 Oct 2004CC (ASA 2.5)5 min read 112.4K   1.5K   30  
A tool for testing regular expressions in JavaScript.
/*
 * support.js
 * Frame Support functions
 *
 * Copyright 2003,2004 Anthony M. Humphreys <anthony(at)humphreys.org>
 *
 * Permission is granted to use and modify this script for any purpose,
 * provided that this credit header is retained, unmodified, in the script.
 *
 */

 // Walks through all of the frames starting at the very top level
function CopyUpFrames(theFrame) {
	for (i=0;i<theFrame.length;i++) {
		// Call copyUp() in each page of the frameset
		if (theFrame[i].copyUp) {
			theFrame[i].copyUp();
		};
		// if the page contains frames, walk through those too
		if (theFrame[i].frames.length) {
			CopyUpFrames(theFrame[i].frames);
		};
	};
};

// Walk through all of the frames starting at the very top level, which this is
function CopyUp() {
	if (top.frames.length) {
		CopyUpFrames(top.frames);
	};
};

// Walks through all of the frames starting at the very top level
function CopyDownFrames(theFrame) {
	for (i=0;i<theFrame.length;i++) {
		// Call copyDown() in each page of the frameset
		if (theFrame[i].copyDown) {
			theFrame[i].copyDown();
		};
		// if the page contains frames, walk through those too
		if (theFrame[i].frames.length) {
			CopyDownFrames(theFrame[i].frames);
		};
	};
};

// Walk through all of the frames starting at the very top level, which this is
function CopyDown() {
	if (top.frames.length) {
		CopyDownFrames(top.frames);
	};
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Creative Commons Attribution-ShareAlike 2.5 License


Written By
Canada Canada
I am a former Witango (aka Tango from Pervasive/Everyware) programmer.
Now programming is my avocation.

Comments and Discussions