Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is it possible to load a local HTML file in a new browser window/tab?

Community Beginner ,
Mar 12, 2019 Mar 12, 2019

I am still working on this HTML5 canvas portfolio.  I want to pop a new window or tab to show some HTML and CSS work examples.  I'm able to open HTTP links, but is there any way to load a LOCAL html file in a new browser or window?

1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 12, 2019 Mar 12, 2019

use window.open, Window open() Method

Translate
Community Expert ,
Mar 12, 2019 Mar 12, 2019

use window.open, Window open() Method

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 12, 2019 Mar 12, 2019

That does the trick!  I wish I had known that a couple of months ago.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 12, 2019 Mar 12, 2019

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2024 Feb 03, 2024

Is it possible to open a new html above the main one without opening a new tab?
Would it be like opening a sequel without closing the first one?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2024 Feb 03, 2024

do you want to open a new browser window (which is pretty much opening a new tab)?

 

otherwise, i can't think of any way to concurrently open two html files other than using iframes (addendum: or load it.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2024 Feb 03, 2024

image.png

I would like to open another game in sequence in the same tab and not in another, it would be 1 html and ends up opening another html without a new tab in it. Has as?

If not, would I have to play 2 games in a row in the same club?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2024 Feb 03, 2024

I did this with window open and window close but there are browsers that don't work so I want to open them in sequence in the same tab

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2024 Feb 03, 2024

you could load another html file, but i'm not sure why you would do that if you haven't already created that html.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2024 Feb 03, 2024

and how do I do this? Would it work, after finishing the game, would you open the other one in the same tab? :]

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2024 Feb 03, 2024

the other html would appear over (if that's what you want), the current html.  but if they're both created by animate, you have all sorts of problems with which to contend.

 

why not do it the easy way and keep both games in the same project?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2024 Feb 03, 2024

I understand, I'm going to do the same thing. But there will be 10 games that will be for a school website.
Hey kglad, how do I make an xml that adds points for the games and that reads through the website's html to show that the 10 games have been completed?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2024 Feb 03, 2024

animate/js can read an xml, but to write to an xml you'll need a server-side file that can write (eg, php) to the xml file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2024 Feb 03, 2024

edited.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 06, 2024 Feb 06, 2024

Is there something like href to use when all games are finished to get back to the site panel without having to open another window with window.open?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 06, 2024 Feb 06, 2024

what's preventing you from putting everything into one html5/canvas project?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2024 Feb 07, 2024

It's all on one screen but I need to go to the website menu. The game is made in animat and the website in sublime. Oh, I would like to do this conversation with href without opening a new tab, I just don't know how to do this in animat.

Is there a way to make the entire website using animat?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2024 Feb 07, 2024

yes, animate can make websites, but if you've already put a lot of work into the website, it may make sense to keep the website and game(s) separate.

 

and you can use any javascript code/library you like in animate.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2024 Feb 07, 2024

Do you have an example: I have never seen a website through animat and then I would browse the pages without opening tabs. But for example, I have more than 15 gigs of HTML games, it would really work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 09, 2024 Feb 09, 2024
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines