Hi
On my webpages I have replaced the submit button with a rolling submit
button using the script below (Script 1). This script is used by many
of my webpages and is included in a external file.
There are two webpages that use onSubmit event handler to fire a script
in an external file but the event handler is no longer firing.
onSubmit ="return validating_user name_and_passwo rd()"
How would I change the script below so that it will fire onSubmit event
handler or any other event handler?
Script 1
<!--
// copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but keep this
// notice with the code.
var submitRolls = new Object();
function submitroll(src, oversrc, name)
{
this.src=src;
this.oversrc=ov ersrc;
this.name=name;
this.alt="Submi t Query";
this.write=subm itroll_write;
}
function submitroll_writ e()
{
var thisform = 'document.forms[' + (document.forms .length - 1) + ']';
submitRolls[this.name] = new Object();
submitRolls[this.name].over = new Image();
submitRolls[this.name].over.src = this.oversrc;
submitRolls[this.name].out = new Image();
submitRolls[this.name].out.src = this.src;
document.write
(
'<A onMouseOver="if (document.image s)document.imag es[\'' + this.name +
"'].src=submitRoll s['" + this.name + '\'].over.src"' +
' onMouseOut="if (document.image s)document.imag es[\'' + this.name +
"'].src=submitRoll s['" + this.name + '\'].out.src"' +
' HREF="javascrip t:'
);
if (this.sendfield )
{
if (! this.sendvalue)
this.sendvalue = 1;
document.write( thisform, ".elements['", this.sendfield, "'].value='",
this.sendvalue, "';");
}
document.write( thisform + '.submit();void (0);"');
if (this.msg)docum ent.write(' onClick="return confirm(\'' , this.msg,
'\')"');
document.write( '>');
document.write( '<IMG SRC="' + this.src + '" ALT="' + this.alt + '"
BORDER=0 NAME="' + this.name + '"');
if (this.height)do cument.write(' HEIGHT=' + this.height);
if (this.width)doc ument.write(' WIDTH=' + this.width);
if (this.otheratts )document.write (' ' + this.otheratts) ;
document.write( '></A>');
if (this.sendfield )
{
document.write( '<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
document.forms[document.forms. length -
1].elements[this.sendfield].value='';
}
}
//-->
Your help will again be appreciated. (This is my secong request for
assistance today).
Regards
Bundy