Here is my modified iwp_auth.html (attached as pdf) and copied in below. The file does an auto login (from link like "domain_name.com/fmi/iwp/cgi?-db=testdb&-loadframes") as guest (no username, no password, no clicking) even if the database has more than the iwp_guest account open. The autologin page is plain white so the flashing by is not disturbing, just slows the login process a little.
Not tested on FMSA yet but works on FMPA
/Kjell
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" language="JavaScript1.4">
<!--
function getSid()
{
var url = window.top.location.href;
var result = "";
if ( url != null )
{
var sid = null;
var index = url.indexOf( "sid=" );
if ( index != -1 )
{
var end = url.indexOf ( "&", index );
if ( end != -1 )
{
result = url.substring ( index, end );
}
else
{
result = url.substr ( index );
}
}
}
return result;
}
var sid = getSid();
if ( sid.length > 0 )
document.write ( '<script type="text/javascript" language="JavaScript1.4" src="/fmi/iwp/cgi?' + sid + '&-authinfo' + '"><' + '/script>' );
else
document.write ( '<script type="text/javascript" language="JavaScript1.4" src="/fmi/iwp/cgi?-authinfo' + '"><' + '/script>' );
-->
</script>
<script type="text/javascript" language="JavaScript1.4" src="/fmi/iwp/cgi?-getstrings"></script>
<script type="text/javascript" language="JavaScript1.4">
<!--
function disableFields()
{
var acct = document.getElementById( "accnt" );
var pass = document.getElementById( "pass" );
acct.disabled = true;
pass.disabled = true;
}
function enableFields()
{
var acct = document.getElementById( "accnt" );
var pass = document.getElementById( "pass" );
acct.disabled = false;
pass.disabled = false;
}
function setup()
{
var ai = window.authinfo;
var name = document.getElementById( "thingy" );
var guest = document.getElementById( "guest-radio" );
var account = document.getElementById( "acct-radio" );
var login = document.getElementById( "login" );
var cancel = document.getElementById( "cancel" );
login.setAttribute( "value", iwp.strings.auth_btn_login );
cancel.setAttribute( "value", iwp.strings.stat_btn_cancel );
document.title = iwp.strings.home_ttl_iwp;
if ( ai != null && name != null )
{
var txt;
var sid = getSid();
var form = document.getElementById( "form-elt" );
if ( ai.realm.substring( 0, 9 ) == "FileMaker" )
{
txt = document.createTextNode( iwp.strings.auth_lbl_openfms );
var type = document.getElementById( "type" );
if ( sid.length > 0 )
form.action = "/fmi/iwp/cgi?" + sid + "&-authserver";
else
form.action = "/fmi/iwp/cgi?-authserver";
type.name = "-authserver";
cancel.style.visibility = "hidden";
}
else
{
if ( sid.length > 0 )
form.action = "/fmi/iwp/cgi?" + sid + "&-authdb";
txt = document.createTextNode( iwp.strings.auth_lbl_opendb + ai.realm.substring( 9 ) + iwp.strings.auth_lbl_with );
}
name.appendChild( txt );
if ( ai.guest == "no" )
{
account.checked = true;
guest.disabled = true;
}
if ( ai.retrycount > 0 )
{
if ( ai.retrycount >= 4 && ai.dbpath != null )
{
window.location = "/fmi/iwp/cgi?-home&reset";
}
var msg = document.getElementById( "msg" );
msg.removeChild( msg.lastChild );
var txt;
if ( ai.realm.substring( 0, 9 ) == "FileMaker" )
txt = document.createTextNode( iwp.strings.auth_err_server );
else
txt = document.createTextNode( iwp.strings.auth_err_incorrect );
msg.appendChild( txt );
}
if ( ai.dbpath != null )
{
var hidden = document.getElementById( "dbpath" );
hidden.value = ai.dbpath;
}
}
document.getElementById( "accnt" ).focus();
var obj = document.getElementById( "iwpTopBox" );
var txt = document.createTextNode( iwp.strings.home_ttl_banner );
obj.appendChild( txt );
}
if ( window.authinfo == null )
{
window.location = "/fmi/iwp/cgi?-home";
}
-->
</script>
</head>
<body onload="setup()">
<div id="bannerBox">
<div id="iwpBottomBox" class="bannerShadow"></div>
<div id="iwpTopBox" class="bannerWhite"></div>
</div>
<div class="center">
<div></div>
<h4><span id="thingy"></span></h4>
<form id="form-elt" name="autologin" action="/fmi/iwp/cgi?-authdb" method="post" autocomplete="off">
<input id="dbpath" type="hidden" name="dbpath" value=""><input id="guest-radio" class="txt" type="hidden" name="acct" value="guest" checked></input><input id="type" type="hidden" name="-authdb">
<script language="JavaScript" type="text/javascript"> document.autologin.submit(); </script>
</form>
</div>
</body>
</html>