Jump to content
Server Maintenance This Week. ×

URL to open a layout or run a script on opening


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

Recommended Posts

I was hoping to have my iwp file (Hosted on FMSA) open to a different layout or run a particular script by the url link I supply

 

I have tried

 

<TheIPaddress>/fmi/iwp/cgi?-db=<TheDatabaseName>&-loadframes?script=<TheScriptName>

 

and

 

<TheIPaddress>/fmi/iwp/cgi?-db=<TheDatabaseName>&-loadframes?layout=<TheLayoutName>

 

But all I get is either an error message saying "Bad request - The server could not process your request due to an illegal parameter:"-loadframes?script"".

Sometimes I just get a blank page but no error message.

 

Is it because I already have an opening script and an opening layout defined for the file?

 

Or is it my url?

Link to comment
Share on other sites

  • 3 weeks later...

If I understand your question right, you can determine if the user is connecting via the FM Pro client or the web and take action appropriately with that information.

 

For example

  If [Position( Get ( ApplicationVersion ); "Web" ; 1 ; 1 ) > 0]

  Go to Layout ["Web Layout"]

  Else

  Go to Layout ["Client Layout"]

  End If

should do the trick.  

The Get ( ApplicationVersion ) function returns information on which vehicle is being used to access the database.

Link to comment
Share on other sites

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