Jump to content

This topic is 8130 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

How can I use the find statement to search both (Userid and password) fiels at the sametime.!

-op=??? or -lop=??

Posted

Hi, the trouble with Filemaker is that it will return a result if you only fill in one of the fields. Use this little gizmo to force the user to fill in both name and password.

NOTE: it only checks fields called required_*something*, so that is how to name your FileMaker fields.

<HTML>

<HEAD>

<TITLE>enter the database</TITLE>

<SCRIPT LANGUAGE="JavaScript"><!-- Original: wsabstract.com -->

<!-- Begin

function checkrequired(which) {

var pass=true;

if (document.images) {

for (i=0;i<which.length;i++) {

var tempobj=which.elements;

if (tempobj.name.substring(0,8)=="required") {

if (((tempobj.type=="text"||tempobj.type=="password")&&

tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&

tempobj.selectedIndex==0)) {

pass=false;

break;

}

}

}

}

if (!pass) {

shortFieldName=tempobj.name.substring(8,30).toUpperCase();

alert("You must fill in both username and password");

return false;

}

else

return true;

}

// End --></script>

</HEAD>

<P><FORM ACTION="FMPro" METHOD="post" name=enterform onsubmit="return checkrequired(this)">

<INPUT TYPE="hidden" NAME="-DB" VALUE="namesandpasswords">

<INPUT TYPE="hidden" NAME="-Lay" VALUE="Layout1">

<INPUT TYPE="hidden" NAME="-format" VALUE="new.htm">

<INPUT TYPE="hidden" NAME="-error" VALUE="enter2.htm">

<INPUT TYPE="hidden" NAME="-max" VALUE="1"><INPUT TYPE="hidden" NAME="-lop" VALUE=AND>

<P><INPUT TYPE="hidden" NAME="-op" VALUE=eq>

name<BR>

<INPUT TYPE=text NAME="required_username" VALUE="" SIZE=26><BR>

<INPUT TYPE="hidden" NAME="-op" VALUE=eq>password<BR>

<INPUT TYPE=password NAME="required_password" VALUE="" SIZE=26><BR>

<INPUT TYPE="submit" NAME="-Find" VALUE="submit">

</FORM></P>

</BODY>

</HTML>

regards, jeff

  • Newbies
Posted

I tryd using your javascript and FM strings without succes. I copied it exactly.. I only changed the input values. I do not know anything about javascript. I am using Adobe Golive 6.

Maybe you know what I am doing wrong???

  • Newbies
Posted

If you use the web security database, you can specify to find the user name and password through text input:

<input type="hidden" name="-op" value="eq">Last Name:(text box)

<input type="text" name="LastName" value="">

Then have it submit

<input type="hidden" name="-find">

<input type="submit" value="Submit">

  • 3 weeks later...
Posted

Hi,

this FM code is not checking anything.When we press the submit button without entering login name and password it directly going to the format file.

Can any one give me code for login and password checking

Posted

Hi, sorry you couldn't get the java checker to work. In the sample files section of the forum, I posted some stuff about calendars and the logon pages to holiday booking in that use the password script. if you download those files, you can see it working and get the code.

regerds, jeff

Posted

Hi, look in the directory 'holidays' at the format file 'holidayenter.htm'

If the search is sucessful, it passes you through to the 'new.htm' page and the holiday database, if a match isn't found, you get another try at 'enter2.htm'

I'ts accessing the 'master contact list' database to check username and password. If you just load the whole lot into the filemaker web folder, you should be able to get it working from a browser on the same machine - see the 'links.htm' page for details.

regards, jeff

This topic is 8130 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.