Jump to content

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

Recommended Posts

Posted

I am only posting one database via IWP and would like to eliminate having to send people to that not-so-attractive web site that links the DB. I know I could go dress up the web page, but I really have no need for it.

So does anyone know of a way to send people straight to the DB?

Thanks,

Brad

Posted

Try:

http://xxxxx/fmi/iwp/cgi?-db=yyyyy&-startsession

Where:

xxxxx = your server name or IP address

yyyyy = your database name (without the extension).

You could also copy the link on the main page and give that to your users.

The only time they will ever see the main page is after a session timeout, which unfortunately throws them back to it (haven't found a way to avoid that yet).

Cheers,

Sean.

Posted

Unfortunately I can't do that.

My solution is on a server shared with several others's which I don't administer.

If mine was the only one I figure I could replace that file with a redirect to the startsession page.

C'est La Vie!

  • 2 weeks later...
Posted

The only time they will ever see the main page is after a session timeout, which unfortunately throws them back to it (haven't found a way to avoid that yet).

Or, do not use the ''-startsession'' command, instead use http://<yourserveraddress>/fmi/iwp/cgi?-db=<yourdatabasename>&-loadframes to start a session from a static webpage. Then modify the IWP Homepage iwp_home.html (after backing it up...) as follows for a closing page:


<HTML>

<HEAD>

 <script>

  parent.location.href='http://www.mypage.com/';

</script>

</HEAD>

</HTML> 

This will lead the user back to a static page of your choice.

Regards,

Tammo

Posted

It doesn't show up because it's inside the FM Web Publishing.app bundle. So you have to use the terminal to get to it.

On OS X on Server Advanced the path is:




/Library/FileMaker Server 7/Web Publishing/publishing-engine/wpc/FM Web Publishing.app/Contents/Resources/iwpres/iwp_home.html







on FMP(D) it's







/Applications/Filemaker Pro (Developer) 7/Extensions/Web Support/FM Web Publishing.app/Contents/Resources/iwpres/iwp_home.html







I don't know where it is on Windows, but I've never looked for it.



I've been playing around with adding javascript to the page so it will redirect you a specific site depending on the referring database page, but I can't get it to work reliably with all browsers (Esp. IE 6 on Windows)



Here's what I have so far:







<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

    <meta name="generator" content="HTML Tidy for Mac OS X (vers 12 April 2005), see www.w3.org">

<script language="JavaScript" type="text/javascript">

if ((navigator.userAgent.indexOf("Mac") != -1) && (navigator.userAgent.indexOf("MSIE") != -1))

{

   alert(navigator.userAgent);

   if (window != top) top.location.href = location.href;

}

else if ((navigator.userAgent.indexOf("Windows") != -1) && (navigator.userAgent.indexOf("MSIE") != -1))

{

  // alert(navigator.userAgent);

  // alert(document.referrer);

   if (document.referrer.indexOf("chemistry") != -1)

   {

      window.location.replace("http://mslab.chem.umn.edu");

   }

   else

   {

      window.location.replace("http://www.minnmass.org");

   }

}

else

{

   if (window != top) top.location.href = location.href;

   var refarray = new Array();

   refarray['chemistry_mslab'] = "http://www.chem.umn.edu/services/massspec/";

   refarray['iwp_home'] = "http://www.chem.umn.edu/services/massspec/";

   refarray['minnmass'] = "http://www.minnmass.org";

   refarray['status'] = "http://www.minnmass.org";

   for (var i in refarray) 

   {

      if (document.referrer.indexOf(i) != -1) 

      {

         window.location.replace(refarray[i]);

      }

   }

}

</script>

    <title>MS Lab Database Server</title>

</head>

<body>

<p>If you are not redirected, choose from the following links:</p>

<p>The University of Minnesota Department of Chemistry <a href="http://www.chem.umn.edu/services/massspec/">Mass Spec Facility</a></p>

<p>The Minnesota Mass Spectrometry Discussion Group <a href="http://www.minnmass.org">MinnMass</a></p>

</body>

</html>



The frames used in IWP seem to mess up the document.referrer property on some browsers so that it's not specific to the DB you logged out of.

Anyone else got a solution for this (besides doing all CWP pages)?

Posted

My initial hope was that when a user clicked the logout button in the status area or in a scripted button, the document.referrer property would contain the URL for the db that they came from. Then you can have a conditional redirect using javascript in your new iwp_home.html page.

The problem is that some browsers (IE6) don't keep the URL when the logout button is pressed (I think it's because the status are frame has a different URL than the page itself, and it's constant for any DB.

The only way I got it to work for my 2 databases was to use a scripted button for one and the status area for another, along with some browser detection in the javascript to make IE6 work like Mozilla, Firefox, Safari, etc. But this won't work for more than 2 DB at a time.

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