The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Multiple pages within a new window, opening multiple pages within a new window
tyrellan
post Jun 23 2016, 07:06 PM
Post #1





Group: Members
Posts: 3
Joined: 23-June 16
Member No.: 24,356



Hi all,

I'm working on a project for our department at work, and we open 40 (or so) web pages (I have it written in a batch file currently) to check them and make sure they're working, etc... My boss asked me to create a portal and one of the features I wanted to add, is a button that will open all those webpages with the click of a button...

My problem I've run into: I can open all the websites in new tabs (which I'd rather not do) and I can open all the websites individually in new windows (which is worse) - but I can't figure out how to open a new window, and then add the 40 pages to that...

CODE

    <script type="text/javascript">
        function OpenWebs() {
            window.open("http://www.google.com");
            window.open("http://www.msn.com");
        }
    </script>


This is the test script I have now (which obviously just opens 2 new tabs) - but I want to open google in a new window, and then add msn to a new tab in that same window...

Any help? I haven't done any HTML work in like 2 years, so I'm really out of my element... Thanks!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 23 2016, 07:43 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,659
Joined: 10-August 06
Member No.: 7



Sounds like the iframe element could be used for this: http://www.htmlhelp.com/reference/html40/special/iframe.html
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
tyrellan
post Jun 23 2016, 07:55 PM
Post #3





Group: Members
Posts: 3
Joined: 23-June 16
Member No.: 24,356



Thank you - I will take a look at it and see if I can make it work.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 23 2016, 09:19 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,731
Joined: 9-August 06
Member No.: 6



If you have 40 iframes on one single page you will only see a tiny fraction of each framed page. Or if you make each iframe large enough too see most of every page you'd have to scroll the main page to eternity...

On the other hand, if you want to sort of flip through the pages by clicking links to each page or a next page link (with the help of a little scripting) an iframe could work.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
tyrellan
post Jun 23 2016, 09:42 PM
Post #5





Group: Members
Posts: 3
Joined: 23-June 16
Member No.: 24,356



Hmmmm... Thanks for the reply. I'm really just looking to open the webpage (like you would with window.open in javascript. It really just that simple (my current batch file is seriously 'C:\blahblah\firefox.exe website1 website2 ... website40'

It's seriously a case of it not having to be fancy - just opening the browser in a separate websites - in one window. (if I could figure out how to execute a batch file in Firefox - I'd seriously just do that and copy the batch file to the server...) smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Jun 24 2016, 05:13 AM
Post #6


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



If you wish to open a new window and add other tabs to that window, you need to use the "name" parameter in javascript, so you can easily address a window opened by javascript.

See http://www.javascriptkit.com/javatutors/index.shtml , scroll down to the Tutorial index and look for "Windows and frames".
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 24 2016, 05:46 AM
Post #7


.
********

Group: WDG Moderators
Posts: 9,659
Joined: 10-August 06
Member No.: 7



QUOTE(Frederiek @ Jun 24 2016, 12:13 PM) *

If you wish to open a new window and add other tabs to that window

This can also be done in some browsers without using a special portal page.

In Firefox, you can save all the pages in a bookmarks folder, then right-click on that folder and choose "open all in tabs".

In the (classic) Opera12 and (I think) the new Vivaldi browser, you can save the current windows and all their tabs as a "session", then load that session later.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Jun 24 2016, 09:30 AM
Post #8


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



Yes, I know. In Safari, it's the same (per session or per bookmark folder), though I personally never use it.

So, it depends on the purpose to open so many websites at the same time. Luckily, there's also a shortcut to close all tabs but the one you wish.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 24 2016, 12:46 PM
Post #9


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,731
Joined: 9-August 06
Member No.: 6



QUOTE(tyrellan @ Jun 24 2016, 04:42 AM) *

Hmmmm... Thanks for the reply. I'm really just looking to open the webpage (like you would with window.open in javascript. It really just that simple (my current batch file is seriously 'C:\blahblah\firefox.exe website1 website2 ... website40'

It's seriously a case of it not having to be fancy - just opening the browser in a separate websites - in one window. (if I could figure out how to execute a batch file in Firefox - I'd seriously just do that and copy the batch file to the server...) smile.gif



I'm lost now. You originally said you didn't want new windows or tabs. I'm afraid I don't understand what you mean. unsure.gif

Do you after all want new windows but you want all 40 to be spawn at the same time? unsure.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 04:09 PM