Jump to content

Token Setting problems


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

Recommended Posts

Help. I have a page called new.htm . A person enters their street address and zip code (two fields in a database) and then clicks OK. I have code on this page as follows:

<P><FORM ACTION="FMPro" METHOD="post">

<P>

<INPUT TYPE="hidden" NAME="-Db" VALUE="StreetChecker3.fp5">

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

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

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

<INPUT TYPE="hidden" NAME="-token.1" VALUE="yes">

<INPUT TYPE="hidden" NAME="-token.2" VALUE="maybe">

<INPUT TYPE="hidden" NAME="-token.3" VALUE="no">

<CENTER><TABLE BORDER=0>

<TR>

I am trying to set some token values for use on down the line when some secondary searches will have to take place. In the format file called new_reply.htm I have some code to show me the value of the tokens only so I can see if they are being set properly.

<P><FONT SIZE="-1" FACE="Arial"><B> Thank -you!

Token 1 equals [FMP-CURRENTTOKEN:1], token 2 equals [FMP-CURRENTTOKEN:2], token 3 equals [FMP-CURRENTTOKEN:3] .

Setting tokens to TEXT values as shown above, seems to work and they pass to the format file OK. But if I try to use a FIELD value like this:

<INPUT TYPE="hidden" NAME="-token.1" VALUE="[FMP-FIELD:FullTextParserB]">

<INPUT TYPE="hidden" NAME="-token.2" VALUE="maybe">

<INPUT TYPE="hidden" NAME="-token.3" VALUE="no">

then the text values still pass but the field value shows nothing.

1. I had to fool around a bit with my IE version 5 to check for newer versions of stored pages in order to get the text values to show up.

2. I added:

<INPUT TYPE="hidden" NAME="-Db" VALUE="StreetChecker3.fp5">

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

to new_reply.htm too thinking that I needed it perhaps.

3. I started editing my pages using WordPad to strip out some of that funky HomePage stuff too.

4. I tried using a field value that was NOT a calculated value.

No luck.

Am I missing something obvious?

Link to comment
Share on other sites

My first form, NEW.HTM, is where a person enters the data for the new record. It is a starting point so it can't really be called from anywhere (right?) Then the person clicks an OK button that has this action under it:

<INPUT TYPE="submit" NAME="-New" VALUE="OK">

With this action, the second form, NEW_REPLY.HTM, comes up and currently the CURRENTTOKEN tag is not assigned or showing a field value (just the text values that I passed as a test) .

Do you mean that I have to "find" the address that someone just entered using a "jump page" or something? If so, would you be able to give me some guidance how that theory and code goes? Thanks.

Link to comment
Share on other sites

Use a page like this to start with:

<body on..load="javascript:document.startfm.submit();">

<form name="startfm" action="FMPro" method="post">

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

<input type="hidden" name="-lay" value="CGIfields">

<input type="hidden" name="-format" value="get_street.html">

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

</form></body></html>

The "on..load" should be "onload". I needed to do that so it would display.

Hope this helps.

Garry

Link to comment
Share on other sites

  • 2 weeks later...

I have experimented, and as Anatoli suggests, it seems as if I can set tokens from a second page once the record exists. The first or initial page is where a person enters the data for a new record and clicks OK. Then it jumps to a second page where the token are set. The user clicks on an OK button here to go to a third page so that I can get those tokens set. (I really do not want that step of clicking the OK button though --- any automatic way to do this? (meta tag)?)

Ideally, I would really like to be able to set tokens from the initial page, but is that impossible?

Garry, your responses to me seem to suggest that in loading the first page using java, it is possible. If so, what is the logic? Grabbing new record data somehow on first page?

Link to comment
Share on other sites

The first page, as I have shown, can be very simple. You can have it findany record,or all, use '-findall' as the action tag.

<form .....

.

.

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

</form>

</body></html>

Use 'onload', in the body tag with the simple Javascript to submit the form. This page will not be obvious to the user and loads very quickly. FMP needs to have a format file called before it can load the Replacement-Tags, such as [FMP-Field:xxxx] etc.

Hope this helps.

Garry

[ July 10, 2001: Message edited by: garrycl ]

Link to comment
Share on other sites

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