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

How can I load html page within page without iframes?

Participant ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

I have heard that iframes are not supported with some browsers and I am programming also for mobile sites.

I have the need to have a standard page which loads other pages into a sort-of-frame within it.

I do not want to use iframes since it apparently will not work for everyone.

No idea where to start - please can anyone assist me.

I am using Dreamweaver CS6

Thank you in advance

Views

396

Translate

Translate

Report

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

LEGEND , Jan 18, 2018 Jan 18, 2018

terryfoster  wrote

I have heard that iframes are not supported with some browsers and I am programming also for mobile sites.

I have the need to have a standard page which loads other pages into a sort-of-frame within it.

I do not want to use iframes since it apparently will not work for everyone.

No idea where to start - please can anyone assist me.

I am using Dreamweaver CS6

Thank you in advance

If the pages are yours and you have access to them (not hosted on someone elses website) and don't want to

...

Votes

Translate

Translate
Community Expert ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

If the content from an iframe is loaded from the same domain, this will ot be rejected.

Have a look at Include another HTML file in a HTML file - Stack Overflow for another way to achieve the same goal. Personally I use PHP includes to do the task, but this requires that you have access to a PHP server.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

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
LEGEND ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

terryfoster  wrote

I have heard that iframes are not supported with some browsers and I am programming also for mobile sites.

I have the need to have a standard page which loads other pages into a sort-of-frame within it.

I do not want to use iframes since it apparently will not work for everyone.

No idea where to start - please can anyone assist me.

I am using Dreamweaver CS6

Thank you in advance

If the pages are yours and you have access to them (not hosted on someone elses website) and don't want to use a server language like php you could use the jQuery load function to pull the pages in.

Votes

Translate

Translate

Report

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
Participant ,
Jan 19, 2018 Jan 19, 2018

Copy link to clipboard

Copied

How would I get the jquery code to load the section of html code into a  div?

Thank you for all feedback.

Votes

Translate

Translate

Report

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 ,
Jan 19, 2018 Jan 19, 2018

Copy link to clipboard

Copied

Have a look at the link in my reply.

<html>
 
<head>
  
<script src="jquery.js"></script>
  
<script>
  $
(function(){
  $
("#includedContent").load("b.html");
  
});
  
</script>
 
</head>

 
<body>
  
<div id="includedContent"></div>
 
</body>
</html>
Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

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
Participant ,
Jan 19, 2018 Jan 19, 2018

Copy link to clipboard

Copied

LATEST

Thank you everyone - that's got it for me.

Votes

Translate

Translate

Report

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 ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

What exactly are you trying to do?  You'll get better answers if we understand what the target file contains and what you're hoping to do with it.

For example, if you're tying to add a Facebook feed to your web page, you'll need to begin at the source site.

How to Embed Facebook Feed on a Website - EmbedSocial

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

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
Participant ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

I have a client with a website for a restaurant.

I want to write an admin page which will store the data in a csv file.

This file then gets used to generate the menu options for the customer (Food Menu)

I want to generate the Food Menu options page as an insert to the complete page.

Ideally I need access to a database but they don't want this - so I am finding workarounds so the admin page will read/store values in a csv and then create the food options in a seperate page which can then be displayed later.

Confused?! So am I!

Terry

Votes

Translate

Translate

Report

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 ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

OK.  I would use a PHP script with the fgetcsv() function to bring data into an HTML table.

PHP: fgetcsv - Manual

<?php
echo
"<html><body><table>\n\n";
$f
= fopen("so-csv.csv", "r");
while (($line = fgetcsv($f)) !== false) {
  echo
"<tr>";
  
foreach ($line as $cell) {
  echo
"<td>" . htmlspecialchars($cell) . "</td>";
  
}
  echo
"</tr>\n";
}
fclose
($f);
echo
"\n</table></body></html>";

Keep in mind the parent page will need a .php file extension and your server must support PHP code.

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

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