ibiubu Posted June 24, 2002 Posted June 24, 2002 This might be off the subject, as well as a bit odd, but it is something I have been curious about for quite a while. It is easy enough to include in an html link the code required to have a browser open that link in a new window. But is there a way to include something in an acutal URL address to do this? Now I don't mean include it in the HTML, but to include some sort of text string in the actual URL address that you type in your browser to force it to open the URL in a new window. Strange question, I know, just wanted to know if it could be done. LR
Brett_D Posted June 24, 2002 Posted June 24, 2002 You can do what you want with a simple line of javascript: <a href="javascript: void(window.open('yourpage.htm'))">open window</a> There are some additional attributes you can define such as size and whether the browser displays scrollbars, but this should do what you want.
Keith M. Davie Posted June 24, 2002 Posted June 24, 2002 "Now I don't mean include it in the HTML, but to include some sort of text string in the actual URL address that you type in your browser to force it to open the URL in a new window." Ok, that piqued my curiosity. I tried adding target=blank to a url and of course it did not work. Normally what I do is just open a second (or third or fourth depending on what I'm doing) browser and enter the url there.
ibiubu Posted June 25, 2002 Author Posted June 25, 2002 Kind of an interesting one. I also tried the =blank in the URL, but like you I could not get it to work. May be limitations in the browser (security reasons) that wont allow you to call actions like this in a URL address typed directly into the browser. Obscure reason I was wondering if this could be done. Although I do most of my stuff in Custom Web Publishing, I still like messing around with Instant for simple solutions. There is a LOT in Instant that you can do with the Go To URL command in Filemaker. You can include all sorts of information in the URL. Things like the layout the link goes to, pre-defined find, sort order, related recid information, and so forth. Just wanted to figure out if the URL information could also include opening the link in a new window. LR
The Bridge Posted June 25, 2002 Posted June 25, 2002 I believe the correct syntax is target="_blank". Try that and see how it goes.
Brett_D Posted June 25, 2002 Posted June 25, 2002 My mistake; I didn't read the originial post correctly. All you have to do is type the following into your address box: javascript: void(window.open("yourpage.htm"))
ibiubu Posted June 26, 2002 Author Posted June 26, 2002 Holly Molly... javascript: void(window.open("http://www.address.com")) Works. Would have never guessed. You mentioned being able to add items such as window size, scrollbars, and address bar. What format is used to add these into the URL string above? LR
ibiubu Posted June 27, 2002 Author Posted June 27, 2002 javascript: void(window.open("http://www.address.com")) Any further details as to how to expand on this to include window size and whether there is a scroll bar or address bar? LR
ibiubu Posted June 27, 2002 Author Posted June 27, 2002 OK, got this one to work: javascript: void(window.open("http://www.apple.com","Apple","height=640,width=750,scrollbar=no,menubar=no,toolbar=no,statusbar=no,addressbar=no")) Again, useful for when using instant web publishing in conjunction with Open URL. Trying to find a string to add for resize. I tried something simple like resize=yes, but it did not work.
Brett_D Posted June 27, 2002 Posted June 27, 2002 Here's a site with a listing of all the attributes for the window.open() javascript method. http://www.devguru.com/Technologies/ecmascript/quickref/win_open.html Edit note: the addribute you were looking for was "resizable=yes"
ibiubu Posted June 27, 2002 Author Posted June 27, 2002 Thanks for the link. Useful information. I will add it to my favorites. LR
Keith M. Davie Posted June 27, 2002 Posted June 27, 2002 Yes Brett, thanks for the code and link. And Larry, thanks for being persistent. I like learning things. This should provide some options.
jonesy17 Posted November 22, 2002 Posted November 22, 2002 I'd love to know how you guys got this to work because it sure doesn't work for me! I copied and pasted exactly what was in these posts and got zero results. When I replaced the pasted text with a straight URL it works fine. (This applies to both Mac and PC versions of IE 5.5.) Could the difference be that I'm trying to connect to a FTP site? Robert
Garry Claridge Posted November 23, 2002 Posted November 23, 2002 Re: javascript: void(window.open("ftp://www.clarsys.com.au")) I just tested this with IE 5.2.1 and Netscape 7.0 on Mac OS X. It worked fine in both. All the best. Garry
Recommended Posts
This topic is 8376 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