Highlighted

How can I load html page within page without iframes?

Participant ,
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

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.

Views

269

Likes

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

How can I load html page within page without iframes?

Participant ,
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

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.

Views

270

Likes

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
Jan 18, 2018 0
Adobe Community Professional ,
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.


Ben

Likes

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
Reply
Loading...
Jan 18, 2018 0
LEGEND ,
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.

Likes

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
Reply
Loading...
Jan 18, 2018 0
Participant ,
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.

Likes

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
Reply
Loading...
Jan 19, 2018 0
Adobe Community Professional ,
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>

Ben

Likes

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
Reply
Loading...
Jan 19, 2018 1
Participant ,
Jan 19, 2018

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jan 19, 2018 0
Adobe Community Professional ,
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, ACP
Alt-Web Design & Publishing

Likes

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
Reply
Loading...
Jan 18, 2018 0
Participant ,
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

Likes

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
Reply
Loading...
Jan 18, 2018 0
Adobe Community Professional ,
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, ACP
Alt-Web Design & Publishing

Likes

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
Reply
Loading...
Jan 18, 2018 1