ibiubu Posted December 8, 2002 Posted December 8, 2002 I am currently useing frames to hide certain URL information. For example, my main page loads which is comprised of 2 frames. The top frame contains nothing and is for all intensive purposes invisible. The bottem frame contains my CDML contents. On this page there is a find field with a submit button. When a find is completed the resulting information comes up in the bottom frame. But since it is in the bottom frame, none of the URL information such as record id, database name, layout name and the likes are shown in the address bar since it is still controlled by the top frame. This all works perfectly for what I want it to do (hide all the URL information). But here is my quandry. After my find is performed, my bottom frame contains links to all the records that matched the find. click on any of those links and their appropriate page is loaded into the bottom frame, thus hiding their URL info as well. But what if I want to have those links open the page in a new window? I can do this, but the new window will then have all the URL information in it that I dont want to show. Is there a way to have the link open the new page in a new window, but without showing all the URL information. I have not quite figured out a way to do this...and this is something I would like to be able to do so as to not show the critical URL information such as database name, layout, record id and such. Any help anyone can provide to point me in the right direction would be greatly appreciated. Larry
Garry Claridge Posted December 8, 2002 Posted December 8, 2002 You can use some Javascript to open a "chromless" window. You can use this in your <a href= like this: <a href="" onclick='Javascript:window.open("place the cdml URL here","mywin","width=600,height=460,status=no,resizable=no,menu=no");'>New Window</a> However, a tidy method is to use a form and a Javascript function to modify it with the desired RecID. Hope this helps. Garry
ibiubu Posted December 9, 2002 Author Posted December 9, 2002 The first part of your suggestion I understand: <a href="" onclick='Javascript:window.open... Although this does open the link in a new window without a address bar, all the user has to do is choose View: Address Bar from the browser menu to show the URL address menu, and it still contains all the informtion I dont want to show (ie recid, database name, ect). I am not quite sure I follow the second suggestion. My find results are in a single row table with about 5 cells across. The first cell is a link to the particular FM record in the row. A find may yield 10 rows of matches. Click on any link to go to that record. I guess what you are saying is that link in the first cell could be a form with hidden values that when clicked on, goes to that particular record. OK, so my old url link that worked looked like this: a href="#" onclick="openBrWindow('[FMP-linkrecid: layout=Notes, Format=notes.htm]','Popup','scrollbars=yes,resizable=yes,width=690,height=525')"> So in trying to switch the link over so that it acts as a form I tried: <form action="http://username:[email protected]/FMPro" method="Post"> <a href="" target="_blank">[FMP-field: Project]</a> <input type="hidden" name="-db" value="@hand.FP5"> <input type="hidden" name="-lay" value="Notes"> <input type="hidden" name="-format" value="notes.htm"> <input type="hidden" name="-op" value="eq"> <input type="hidden" name="-max" value="1"> <input type="hidden" name="-RecID" value="[FMP-Field:Record ID]"> <input type="hidden" name="-error" value="errors.htm"> <input type="hidden" name="-find" value="Submit" target="_Blank"> But this just comes up with a blank window with a FileMaker generated error type 4. Any suggestions? Larry
Garry Claridge Posted December 9, 2002 Posted December 9, 2002 The second method still produces a window from which the user can change the view to see the address bar. However, the html/cdml would look like this: In the <head...: <script> function showdetails(recid) { document.detailsfm.elements["-RecID"].value = recid ; document.detailsfm.submit() ; } </script> In the <body...: <form name ="detailsfm" action="http://username:[email protected]/FMPro" method="Post" onsubmit="return false;"> Each row would have <a .....: <a href="#" onclick="Javascript:showdetails("[FMP-CurrentRecID]");>[FMP-Field Project]</a> As a third option, you could use a DHTML Layer as the target with the current page. This would hide the URL details. All the best. Garry
Anatoli Posted December 9, 2002 Posted December 9, 2002 RE: all the user has to do is choose View: Address Bar from the browser menu to show the URL There is no browser menu in NN and IE in chromless window. And if you use "forced frames" all the time, visitor will never be able jump out from frame.
ibiubu Posted December 9, 2002 Author Posted December 9, 2002 I am not sure I know what a chromless window is? I understand how to open a new window with a link and how to set the scroll, location, address ect to =no. But in doing so the user can alway choose to show these items under the View menu in the browser. I have been playing around with forced frames the past few days. I had hoped to use it in such a way that if the user clicked on a link, this would open the new page in a new window, and using the force frame this would force the new page into a frameset. Have not had much luck with it, but I am sure it is because I have not used it correctly. I will have to keep messing with it.
ibiubu Posted December 9, 2002 Author Posted December 9, 2002 Gary, I tried your suggestion above, but my resulting link does not do anything... Here is the pasted text out of my page. Is there anything you can see I configured wrong? <html> <head> <script> function showdetails(recid) { document.detailsfm.elements["-RecID"].value = recid ; document.detailsfm.submit() ; } </script> <form name ="detailsfm" action="http://username:[email protected]/FMPro"method="Post" onsubmit="return false;"> <a href="#" onclick="Javascript:showdetails("[FMP-CurrentRecID]");target="_blank">[FMP-Field: Project] </a> <input type="hidden" name="-db" value="@hand.FP5"> <input type="hidden" name="-lay" value="Notes"> <input type="hidden" name="-format" value="notes.htm"> <input type="hidden" name="-error" value="errors.htm"> <input type="hidden" name="-op" value="eq"> <input type="hidden" name="-RecID" value="[FMP-field: Record ID]"> <input type="hidden" name="-max" value="1"> <input type="hidden" name="-find" value="Submit"> </form> Larry
Garry Claridge Posted December 9, 2002 Posted December 9, 2002 Larry, Give this a try: <html> <head> <script> function showdetails(recid) { document.detailsfm.elements["-RecID"].value = recid ; document.detailsfm.submit() ; } </script> </head> <body>Projects<br> <form name ="detailsfm" action="http://username:[email protected]/FMPro" method="Post" onsubmit="return false;"> <input type="hidden" name="-db" value="@hand.FP5"> <input type="hidden" name="-lay" value="Notes"> <input type="hidden" name="-format" value="notes.htm"> <input type="hidden" name="-error" value="errors.htm"> <input type="hidden" name="-op" value="eq"> <input type="hidden" name="-RecID" value=""> <input type="hidden" name="-find"> </form> [FMP-Record] <a href="#" onclick="Javascript:showdetails('[FMP-CurrentRecID]');" target="_blank">[FMP-Field: Project] </a><br> [/FMP-Record] </body></html> I've fixed-up a few odds-and-ends. All the best. Garry
ibiubu Posted December 10, 2002 Author Posted December 10, 2002 Gary, I gave what you posted above a try. In fact, I pretty much copied it and pasted it into a blank new html page. Here is the results I got: Did my search. My page with the search results comes up (this is the page with the above CDML code). Four records match the search. I go ahead and click on one of the links...a new blank page opens with the error message "encountered an unexpected condition...error 4". Yet the original page from which I clicked on the link, (now hiding under the new blank page) has actually gone to the linked page. So basically the link opens a new blank page that does not work, and links to the page in the parent window. A bit odd?? Larry
Garry Claridge Posted December 10, 2002 Posted December 10, 2002 Whoops, that's what I get for rushing. Here is a better solution: <html> <head> <script> function showdetails(recid) { document.detailsfm.elements["-RecID"].value = recid ; var detwin = window.open("","detwin","width=600,height=460,status=no,resizable=no,menu=no"); document.detailsfm.submit() ; } </script> </head> <body>Projects<br> <form name ="detailsfm" action="http://username:[email protected]/FMPro" method="Post" target="detwin"> <input type="hidden" name="-db" value="@hand.FP5"> <input type="hidden" name="-lay" value="Notes"> <input type="hidden" name="-format" value="notes.htm"> <input type="hidden" name="-error" value="errors.htm"> <input type="hidden" name="-op" value="eq"> <input type="hidden" name="-RecID" value=""> <input type="hidden" name="-find"> </form> [FMP-Record] <a href="#" onclick="Javascript:showdetails('[FMP-CurrentRecID]');">[FMP-Field: Project] </a><br> [/FMP-Record] </body></html> Now the target for the form is the window created in the Javascript function. This should be better. All the best. Garry
Anatoli Posted December 10, 2002 Posted December 10, 2002 RE: View menu in the browser. I don't see that in IE or NN on Windows. There is nothing at all. Maybe on Mac? Forced frames mean IMHO, that not a single page can exist outside of frame. Visitor must follow designer
ibiubu Posted December 10, 2002 Author Posted December 10, 2002 It must be something specific to the Mac. It is the case with both Explorer and Netscape. For example, in Explorer under the menu "View" there are choices for: Button Bar Address Bar Favorites Bar Status Bar Explorer Bar So even if a web page is opened in a chromless window, I can choose to show these items at will. To bad. Would be nice if it was consistent across platforms. Larry
Garry Claridge Posted December 10, 2002 Posted December 10, 2002 I can expose the address bar on Macs I'm not sure about the term "Forced Frames". However, we can always preload a Frameset into the new window and target the form to one of its frames. All the best. Garry
ibiubu Posted December 10, 2002 Author Posted December 10, 2002 Gary, Thanks for the indepth html code you provided above. It took me a while to get thru it all, but once I did I was able to incorporate it into my existing solution. This worked like a charm. I am now able to hide the critical URL information that I dont want available. This has turned out to be one of the best tips I think I have come across in these forums. Larry One question...I did try a variation of the above code for one of my pages: Re: Complicated question about frames [re: ibiubu]
Garry Claridge Posted December 10, 2002 Posted December 10, 2002 Does it just sit there, i.e. no new window etc? Can you view the source in your browser to see if the [FMP-field:files 2::ID] has been replaced OK for each Portal row. You can remove the 'onsubmit="return false;"', that may be affecting it. I usually have that there when a <input type="text" tag exists, so that when people press "Enter/Return" the form does not submit. All the best. Garry p.s. Have you been drinking too much coffee, you seem to have been up all night!
ibiubu Posted December 10, 2002 Author Posted December 10, 2002 Gary, here is the code I used in a clean virgin document: <html> <head> <script> function showdetails(recid) { document.detailsfm.elements["-RecID"].value = recid ; var detwin = window.open("","detwin","width=600,height=460,scrollbars=yes,status=no,resizable=no,menu=no"); document.detailsfm.submit() ; } </script> </head> <body>Projects<br> <form name ="detailsfm" action="http://username:[email protected]/FMPro" method="Post" target="detwin"> <input type="hidden" name="-db" value="budgets.FP5"> <input type="hidden" name="-lay" value="budgets"> <input type="hidden" name="-format" value="budgets.htm"> <input type="hidden" name="-error" value="errors.htm"> <input type="hidden" name="-op" value="eq"> <input type="hidden" name="-RecID" value=""> <input type="hidden" name="-find"> </form> [FMP-Portal:Budgets] <a href="#" onclick="Javascript:showdetails('[FMP-field:Budgets::RecordID]');">[FMP-field:Budgets::inty] </a><br> [/FMP-Portal] </body></html> The results I received were varied. 1) on the mac when the link is clicked on, the correct record comes up...but it does not come up in a new window. It comes up in the parent window. 2) on the pc when the link is selected...absolutely nothing happens. No error, no new window, the parent window does not even redraw. So I am not quite sure how to get the above to work so it will open the related record in a new window. I know the old way I would do it when not trying to run it thru a javascript to hide the url would be something like: [FMP-Portal:Budgets] <a href="FMPro?-db=budgets.fp5&-layout=Budgets&-Format=budgets.htm&-RecID=[FMP-field:Budgets::RecordID]&-find">[FMP-field:Budgets::inty]</a> [/FMP-Portal] Larry
Garry Claridge Posted December 10, 2002 Posted December 10, 2002 Larry, Try changing this line: var details = window.open("","detwin","width=600,height=460,scrollbars=yes,status=no,resizable=no,menu=no"); I've realised that I had the variable name the same as the window name. This may fix the problem, as I have similar pop-ups which work fine. I used the same name when I amended it to insert here. Good Luck. Garry
ibiubu Posted December 10, 2002 Author Posted December 10, 2002 Gave that change a whirl...still same results. Linked is the html page in question. It is pretty basic and stripped down to the bare minimum. I am not quite sure what is wrong. http://63.226.105.147/budget.zip Larry
Garry Claridge Posted December 11, 2002 Posted December 11, 2002 Larry, I modified the file slightly to use a test database of mine. Here is the modified page: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <script> function showdetails(recid) { document.detailsfm.elements["-RecID"].value = recid ; var details = window.open("","detwin","width=600,height=460,scrollbars=yes,status=no,resizable=no,menu=no"); document.detailsfm.submit() ; } </script> </head> <body>Projects<br> <form name ="detailsfm" action="FMPro" method="Post" target="detwin"> <input type="hidden" name="-db" value="combotest.FP5"> <input type="hidden" name="-lay" value="web"> <input type="hidden" name="-format" value="hworld.html"> <input type="hidden" name="-error" value="errors.htm"> <input type="hidden" name="-op" value="eq"> <input type="hidden" name="-RecID" value=""> <input type="hidden" name="-find"> </form> [FMP-Record] <a href="#" onclick="Javascript:showdetails('[FMP-CurrentRecID]');">[FMP-CurrentRecID] </a><br> [/FMP-Record] </body></html> I tested with OS X {Netscape 7.0, IE 5.2} and with Win2k {IE 5.5} and all worked fine. Something must be breaking the form or the Javascript. Maybe try some localhost access. Also, check the page source when it is loaded in the browser to see if the cdml replacement tags are working OK. Got me puzzled! All the best. Garry
ibiubu Posted December 11, 2002 Author Posted December 11, 2002 Gary, After messing around with your code above, here is the change I made that got it to work: <form name ="detailsfm" action="FMPro" method="Post" target="_blank"> For some reason replacing target= with blank instead of detwin did the trick. If I left it detwin, it seemed to work ok on the Mac, but not the PC. But by replacing detwin with _blank...works correctly on both platforms. I was wondering one thing...I tried using _parent instead of _blank, just to see if it would open in the same window instead of a new one. Worked on the Mac but not the PC. Do you think a variation on all of this could be used to make the link open in the same window instead of a new one? Thanks again for all the help. It seems now that I have gotten this to work for all my pages correctly. Larry
Garry Claridge Posted December 11, 2002 Posted December 11, 2002 Which PC OS are you using? And which browser? It dosen't make sense that it does not work. Unless, it is a very old browser! You could try: <form name ="detailsfm" action="FMPro" method="Post" target="window.detwin"> It will be something silly like that Good Luck. Garry p.s. I just had a thought that because you are using frames you may need to use something like "parent.detwin" or "top.detwin" or "top.window.detwin"
ibiubu Posted December 11, 2002 Author Posted December 11, 2002 Gary, Well it looks like I might have to shelf this one and come back at it later. I seems to work fine when I have the summary page open in my bottom frame, the links there are to records in the same database. Click on one of those links and that record opens in the new window as it should. Where it doesn't seem to work is in the new window now open, there are links to related database files. If I try to use the same method with those links, it just does not want to play nice. i gues it is something to do with the fact that the links are for related files and records. I will keep messing with it to see if I can figure out why it works one way, but not the other. Thanks. Larry
Recommended Posts
This topic is 8009 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 accountSign in
Already have an account? Sign in here.
Sign In Now