Jump to content

How to activate a form while loading a page?


abkaplan
 Share

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

Recommended Posts

Dear Bman;

You are right, I want automatic submission of a form while loading a page.

(it may ask a confirmation message or may not.)Just like activating a JS

Dear Anatoli;

I said new record as an examle ( any action I want ) , but that new record shold be created automatically when somebody write url on the adress line and press enter.As far as I know it can be done automatically by the submission of a form while loading a page but how?

Thanks for your immediate answers.

Abkaplan

Link to comment
Share on other sites

Dear Anatoli;

Thanks for your message. But I haven't used an "inline" action yet. If you send me a specific sample code I will be very glad. ( where to put how to write that code.)

Abkaplan.

(I have already started to change all my scripts to new record or edit forms. a lot of thanks to all those that inform me about the scripts on the web )

Link to comment
Share on other sites

Use the onload event handler with the <body> tag. E.G. <body bgcolor="white" onload="top.main_head.document.location.replace('../FMPro?-db=v5pd.fp5&-format=/pages/head_agenc.html&-token=[FMP-Field:code]&-view');">

Hope this helps.

Garry

ps. I had to put around the word onload so that this message would work.

Link to comment
Share on other sites

quote:

Originally posted by abkaplan:

Dear Anatoli;

Thanks for your message. But I haven't used an "inline" action yet. If you send me a specific sample code I will be very glad. ( where to put how to write that code.)

Abkaplan.


Place somewhere in page:

[FMP-InlineAction: -db=prtzlog.fp5, key={CurrentToken: 3}, TZnSz=AK, Tzid={field:ID}, -New] [/FMP-InlineAction]

This is standard CDML for FM 5.

Inline is executed before sending the page to the browser. In this case the database used will be prtzlog.fp5, New record will be created and fields key, TZnSz and Tzid will be populated by values.

Then the control will be returned to the database, which is called by link triggering this page.

Link to comment
Share on other sites

This topic is 7505 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
 Share

×
×
  • Create New...

Important Information

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