Jump to content

FMP-Link with browser redirection

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

Recommended Posts

I have a page conatining a form to carry out a search and displaying results of an earlier search (search.html). However it is necessary to redirect users arriving at this page according to their browser (search2.html for IE5+, search3.html for Safari, etc). How can I carry the results of the original search onto the page to which they have been redirected but not to the new search results page (search_results.html).

Is there some way of including an [FMP-Link] tag into the redirect javascript in the header? The browser seems to stall on search.html when I make [FMP-Link]&-Format=search2.html my redirect url.

Does anyone have any suggestions?

Link to comment
Share on other sites

In response to Unable, you're absolutely right. As you point out the correct tag should be [FMP-Link: r] to omit the original format file - that was a typo on my part I'm afraid.

The javascript detects IE or Safari browsers and redirects accordingly, the default being for Netscape and others. The following works fine but obviously loses the FM results that are displayed on the original page (search.html)

<script type="text/javascript"><!--

function Is() {

agent = navigator.userAgent.toLowerCase();

this.major = parseInt(navigator.appVersion);

this.minor = parseFloat(navigator.appVersion);

this.ie = ((agent.indexOf("msie") != -1)&& (agent.indexOf('opera')==-1));

this.winie = (this.win && this.ie);

this.ie3 = (this.ie && (this.major < 4) && !this.ie6);

this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 4")!=-1) );

this.ie401 = (this.ie && (this.major == 4) && (agent.indexOf("msie 4.01")!=-1) );

this.ie4up = (this.ie && (this.major >= 4));

this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5")!=-1) );

this.ie51 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.01")!=-1) );

this.ie55 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.5")!=-1) );

this.ie5up = (this.ie && !this.ie3 && !this.ie4);

this.ie6 = (this.ie && (agent.indexOf("msie 6.0")!=-1) );

this.mac = (agent.indexOf("mac")!=-1);

this.safari = (this.mac && (agent.indexOf("safari")!=-1));


var is = new Is();

if (is.ie4up||is.ie5||is.ie55||is.ie5up||is.ie6) //for IE


if (is.safari) //for Safari



I tried changing the redirect to:

window.location.href="[FMP-Link: r]&-format=search2.html"


window.location.href="[FMP-Link: r]&-format=search2.html&-view"

Both attempt to redirect but either it has completely stalled or I'm just not patient enough (in which case its taking too long for our clients anyway).

Any thoughts?

Link to comment
Share on other sites

Hi Jeff

I hope that is not the case, as that would make javascript useless in this scenario, and I will have to carry out the browser detection at a point before the initial search is sent to FM.

It appears that Explorer ignores the [FMP-Link] redirect completely, while Safari attempts but fails to redirect, so unless you have some workaround hidden up your sleeve, I'll try a different approach.

Thanks for your help guys!

Link to comment
Share on other sites

  • 4 weeks later...

also consider if ur using frames and perhaps have a script to block pop-ups. If the target to frame is not specified it will behave as a new window.

But above all....Why are u redirecting?

there are ways to achive cross-browser-platform compatibility without redirection...it depends on design.

window.location.href="[FMP-Link: r]&-format=search2.html"


window.location="[FMP-Link: r]&-format=search2.html"

All the best!

Link to comment
Share on other sites

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