2 of 2 people found this helpful
I ran into this problem, too. I did not like the new window (closing was problematic) in Web Direct. I solved like this:
1. I made sure there was some relationship (cross if necessary, in each of the files) that would allow you to navigate between the two files and get to something valid (must get to data).
2. I created a branch in the script (one for each file) so that it worked well in FMPro and FMGo, as well:
If ( PatternCount ( Get ( ApplicationVersion ) ) ; "Web" )
Go to Related Record ( from table: <<choose the relationship>> ; External ; Using Layout: <<other file's layout>> ; Show only related records ; New Window )
Open File ( <<other file>> )
Go to Related and New Window were key here. Sorry I can't show you screenshot(s), but hopefully the script helps. Remember that the script is in BOTH files with appropriate calls to the other file.
I did searches on this forum and elsewhere and got tips that ultimately helped, but don't think one source alone got me the answer. I had tried Web Viewer to show other file - did not work. I tried Open URL() which gave that second window. Open File is not supported in WD.
That works !! :>
Thanks a lot , Beverly.
I just ran into this as well, so I thought I would share my findings.
It turns out that the OPEN URL script step only messes up File A if the url is the same as File B, regardless of which server they are actually located on. For example, if a.someWebsite.com and b.someWebsite.com are actually the same server, and you open up File A using a.someWebsite.com and then use the OPEN URL script step for File B on b.someWebsite.com, it will work.
What exactly do you mean by "Remember that the script is in BOTH files with appropriate calls to the other file"
Each file has a script to open the other file. The change is in the GTRR (obviously) to the other files' related table::field & layout, etc.
Did you follow the instructions to that point?
I think I got it. so if I'm only ever going from A -> B, and not the other way around, then I'll only need the script in A? I think I was just over thinking it.
Yes. One way only? = one script to go there.
My clients needed to go back and forth.
Sent from miPhone
Using this method, is it possible to open in a new tab as opposed to same one?
What other methods have you tried?
This was to NOT open a new window (even tabbed).
Sent from miPhone
I was able to get a new database to open in the same window using the method you suggested, and have been able to get a new (well a true browser "popup") window to open using Open URL, however that approach doesn't automatically log the user in.
Correct (no automatic login), which is another reason I used the method I did.
Thank you for the update!
1 of 1 people found this helpful
Just for background on the original post... There was a known issue in 15 & earlier WebDirect where opening another file hosted on the same server via an Open URL script step would close the original file's session (and it would go blank if you then tried to interact with it. E.g. if I opened file A normally (http://myServerAddr/fmi/webd/fileA), and then from within file A, I executed script step Open URL[“http://myServerAddr/fmi/webd/fileB”], then fileB would successfully open in a new browser tab/window, but the session for fileA (in the original tab/window) would be terminated on the backend. However, this issue should now be fixed in 16 WebDirect.
So is it possible to open a new window/database in a new browser Tab by any method? (Even if they have to log in)?