geke hand
E Z B O A R D
Preview Button Instead of Checkbox

<< updated: 8/31/2003

Summary: Use a preview button instead of a checkbox so that previewing is a one-click operation instead of two-clicks.

HEAD: (box #1)

<script type="text/javascript">
/* BEGIN EZURL */
ezURL = document.location.href.match("http:\/\/((?:pub|b|p)([0-9]+)|beta|vanchau|inbox)\.ezboard\.com\/(b|f)([a-zA-Z0-9]+(?=frm[0-9]+)|[a-zA-Z0-9]+(?!frm[0-9]+))(frm[0-9]+|)(?:(?:[\.]{1})([a-zA-Z0-9\=\+\&\.]+)|)(?:(?:[\x3F]{1})([a-zA-Z0-9\=\+\&\.]+)|)(?:.*)");
try {
if (ezURL.length > 0) {
ezPub = ezURL[2].length > 0 ? ezURL[2] : ezURL[1];
ezFullPub = ezURL[1];
ezIsBoard = ezURL[3] == "b" ? true : false;
ezBoardID = ezURL[4];
ezForum = ezURL[5];
ezPage = ezURL[6];
ezQuery = ezURL[7];
}
} catch (e) { }
ezURL = null;
/* END EZURL */
</script>

HEAD Notes:

This script is used in many of the other scripts offered here. Only one copy should be installed.

HEAD: (box #1)

<script type="text/javascript">
/* PREVIEW BUTTON FUNCTION */
function preview_button() {
document.getElementsByName("preview").item(0).id = "preview";
document.getElementById("preview").style.display = "none";
document.getElementById("preview").parentNode.removeChild(document.getElementById("preview").nextSibling);

prevbutton = document.createElement("input");
prevbutton.type = "submit"
prevbutton.tabIndex = 5;
prevbutton.value = "Preview";
prevbutton.className = "inputbutton";
prevbutton.onmouseup = new Function('document.getElementById("preview").checked = true;');

document.getElementById("preview").parentNode.insertBefore(prevbutton, document.getElementById("preview"));
}
/* END PREVIEW BUTTON FUNCTION */
</script>

FOOTER: (box #4)

<script type="text/javascript">
/* PREVIEW BUTTON INSTEAD OF CHECKBOX */
if ( ezPage.match("showAddPollScreenFromWeb|addPollFromWeb|showAddTopicScreenFromWeb|addTopicFromWeb|showAddReplyScreenFromWeb|.addReplyFromWeb|showEditScreen|editMessageFromWeb")) {
preview_button();
}
/* END PREVIEW BUTTON INSTEAD OF CHECKBOX */
</script>

History:

8/31/2003 - updated for new version of ezURL
5/23/2003 - written by phalen180

Credits:

suggested by greeneyedgal67
written by phalen180

E Z B O A R D

design by G E K E . N E T
best viewed in 1024x768 screen resolution using a standards compliant browser
logo based on a public domain drawing of a hand making the sign of the cross, no disrespect is intended
all other contents and code copyright © 2002-2005 jonathan cook

Valid HTML 4.01! Valid CSS!