Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I need to pass information to FileMaker, I have passed the information from a java applet to java script, but FileMaker does not seem to want the info...Kind of hurts my feelings.

Here is the source code:

<!-- saved from url=(0022)http://internet.e-mail -->

<HTML>

<HEAD>

<TITLE>HTML file Title</TITLE>

<script language="javascript">

function postInfo()

{

// get data from the applet

uidStr = document.PWApplet.getUid() ;

pwStr = document.PWApplet.getPw() ;

// validate the data

if (uidStr.length == 0) {

alert("User Name cannot be blank.") ;

return ;

}

if (pwStr.length == 0) {

alert("Password cannot be blank.") ;

return ;

}

// copy data from the applet into the hidden form

document.info.uid.value = uidStr ;

document.info.pw.value = pwStr ;

// post the data from the form to FMPro

document.info.submit() ;

// tell the applet to clear its form

document.PWApplet.clearForm() ;

}

</script>

</HEAD>

<BODY>

<APPLET NAME="PWApplet" CODE="Password4.class" WIDTH=320 HEIGHT=200 MAYSCRIPT>

</APPLET>

<FORM>

<INPUT type="button" value="SUBMIT" onClick="postInfo()">

</FORM>

<FORM name="info" action="FMPro" method="Post" >

<INPUT Type="hidden" Name="uid" value="">

<INPUT Type="hidden" Name="pw" value="">

</FORM>

</BODY>

</HTML>

If someone would be so kind as to tell me what I need to do I would be very thankful!

In Kindness

Stephen K Knight

Stephen Knight

FM WebSchool

www.fmwebschool.com

Posted

Stephen,

The "info" form still needs other parameters:

<FORM name="info" action="FMPro" method="Post" >

<INPUT Type="hidden" Name="uid" value="">

<INPUT Type="hidden" Name="pw" value="">

<INPUT Type="hidden" Name="-db" value="mydatabase.fp5">

<INPUT Type="hidden" Name="-lay" value="mylayout">

<INPUT Type="hidden" Name="-format" value="myformat.html">

<INPUT Type="hidden" Name="-find" value="">

</FORM>


Hope this helps.

Garry

Posted

Thank you guys for all of your help...I did this:

Here are a couple of things I modified:

document.forms[0].username.focus()

Here's how I reference a form (or a field in a form) with JavaScript:

document.forms[0].info.submit()

<FORM name="info" action="FMPro" method="Post">

<input type="hidden" name="-Lay" value="Layout #1">

<input type="hidden" name="-db" value="password.fp5">

<input type="hidden" name="-Format" value="login_succeed.html">

<input type="hidden" name="-Error" value="login_fail.html">

<input type="hidden" name="-op" value="eq">

<INPUT Type="hidden" Name="uid" value="">

<input type="hidden" name="-op" value="eq">

<INPUT Type="hidden" Name="pw" value="">

<Input Type="hidden" Name="find" value="">

</FORM>

I didn't have time to investigate how to add the "-find" command. will it be necessary for this form to complete the login?

Yet it still is missing a step I still get the database error 4

Posted

You're one character shy of perfection, from what I can see. Add a hyphen in front of Find, e.g.

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

Posted

Got it to work. Of all people I should know I scoured and scoured my code, I had left the "-" off in front of my find. I looked at the code 100 times and didn't see it.

Thank you to everyone that helped! The Applet and Java Script are working perfectly now.

Thank you once again!

Stephen

Posted

Funny... recently I was pulling my hair out trying to understand why a simple JavaScript wasn't working on one of my pages. As it happened I had used "If()" instead of "if()". I had nearly rewritten the entire code before I caught that one.

This topic is 8078 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.