Click to See Complete Forum and Search --> : Using Tabular Binding in JavaScript


Banksy
04-10-2003, 08:31 AM
Here is my code...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

<HEAD>
<TITLE>Lori Banks ~ DRV ~ 10 April 03</TITLE>

<OBJECT ID = "Secret"
CLASSID = "CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83" VIEWASTEXT>
<PARAM NAME = "DataURL" VALUE = "Quiz4_DS_TDC.txt">
<PARAM NAME = "UseHeader" VALUE = "TRUE">
<PARAM NAME = "TextQualifier" VALUE = "@">
<PARAM NAME = "FieldDelim" VALUE = "|">
</OBJECT>

<SCRIPT LANGUAGE = "JavaScript">

var recordSet = Secret.recordset;

function move( whereTo ){
switch( whereTo ) {
case "first":
recordSet.MoveFirst();
break;

// If recordset is at beginning, move to end.
case "previous":
recordSet.MovePrevious();

if ( recordSet.BOF )
recordSet.MoveLast();

break;

// If recordset is at end, move to beginning.
case "next":
recordSet.MoveNext();

if( recordSet.EOF )
recordSet.MoveFirst();

break;

case "last":
recordSet.MoveLast();
break;

}// switch close

}// fnmove close

function Check(){

var matching = 0;

if (matching = 1) { alert("Entered Password Matches"); }


else if (matching = 0) { alert("Entered Password Not Matching"); }


}// fnCheck close



</SCRIPT>

</HEAD>

<BODY>
<P>
<SPAN STYLE = "position: absolute; left: 200; width: 270;
border-style: groove; text-align: center;
background-color: cornsilk; padding: 10">

Lori Banks ~ 10 April 2003
<BR>
<BR>
<BR>

Username:<INPUT DATAFLD = "Username" ID = "username" DATASRC = "#Secret" TYPE = "Text">
<BR>
Password:<INPUT DATAFLD = "Password" ID = "password" DATASRC = "#Secret" TYPE = "Password">

</A>
</P>

<INPUT TYPE = "button" VALUE = "First"
ONCLICK = "move( 'first' );">

<INPUT TYPE = "button" VALUE = "Previous"
ONCLICK = "move( 'previous' );">

<INPUT TYPE = "button" VALUE = "Next"
ONCLICK = "move( 'next' );">

<INPUT TYPE = "button" VALUE = "Last"
ONCLICK = "move( 'last' );">

<BR>
<BR>

<INPUT TYPE = "button" VALUE = "Check"
ONCLICK = "Check();">
</SPAN>

</BODY>
</HTML>

Can anyone help me out with this...I need something to work in the Check funtion that will allow the program to know if Yes, Passwords match or No, Passwords don't match...Thanks So Much!!!

SniperX
04-11-2003, 12:04 AM
Don't know if this will work:

if (userInput == currentRecord) {
matching = 1;
}


That might work...
Im not to good with databinding

Regards
MW


__________________
"Nothing is too wonderful to be true" - Michael Farraday(UCLA)