Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

two quick questions

Featured Replies

i have two questions that i think i know the answer to. I just want to make sure. With either one, if someone would like me to expand the issue, i will.

1. Am i correct that i can only run a script from a search page? I need a "button" to insert the current day and time on a record detail (editable) page.

2. If i choose restrict IP address in the application prefs, does that apply to ALL databases open on that machine? If so, how can i restrict just one DB's IP addressess?

Unfortunately for me, both of these problems are for the same solution. Any help on either one would be greatly appreciated.

Jeremy

[This message has been edited by yafreax (edited September 14, 2000).]

You can run a script from *any* page as long as there is an action specified. You can use the "Clayton's" action -View which just gets Web Companion to process the instructions and generate the next page. If you want or need more security, specifying -findany or any othet action tag besides -view will prompt the user for a password if you database is so configured.

Also, you don't need to use a form to run scripts, all the actions can be strung together as a URL and specified as a link. (This is a technique I like and use a lot for "canned" actions.) They are fugly but work, even in meta redirect tags. a typical such url would look like:

http://www.yadayada.com/admin/FMPro?-db=db.fp3&-lay=web&-format=menu.htm&-error=error.htm&-Script=Check%20Guests&-findany

Note the %20 symbols for spaces in file names. BTW any resemblemce of this url to real web sites is coincidence. ???

--

As for the second question, I haven't started using FMP5 yet (that's one of my "Olympic" projects over the next two weeks as I work from home).

In FMP4 I think you can restrict access on a db-by-db level using the Web Security databases.

An alternate process that I used was a simple [FMP-If] conditional at the top of the opening pages that checked the IP numbers and returned a "sorry" page if they failed.

If I had to do it again -- I don;t restrict access by IP number any more on any of the databases -- I'd explore the Web Security database method first.

[This message has been edited by Vaughan (edited September 14, 2000).]

Here is a bit of javascript that I use to automatically paste the date and time in a form when loaded (I put the html stuff in too)???

<HTML>

<HEAD>

<SCRIPT>

function SystemDate(){

//current system date

var time=new Date()

var x=time

var dd=x.getDate(); (dd<10) ? dd="0"+dd : dd

var m=x.getMonth();

var yy=x.getYear();

var mm=m+1; (mm<10) ? mm="0"+mm : mm

var yyyy=yy+1900; (yyyy>3000) ? yyyy=yy : yyyy

SD= mm + "/" + dd + "/" + yyyy;

return SD

}

function SystemClock(){

//simple clock for current system time

var time=new Date()

var x=time

var hs=x.getHours(); (hs<10) ? hs="0"+hs : hs

var ms=x.getMinutes();(ms<10) ? ms="0"+ms : ms

var ss=x.getSeconds();(ss<10) ? ss="0"+ss : ss

ST= hs + ":" + ms + ":" + ss;

document.CallBoard.Call_Time.value=ST;

id=setTimeout("SystemClock()",1000)

//displays system time

}

function showIt(){

document.Blues.Clock.focus();

SystemClock();

document.CallBoard.Date.value = SystemDate();

}

</SCRIPT>

</HEAD>

<body onLoad="showIt()"">

</body>

</HTML>

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.