These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:04 pm Advanced search

Load Div content from one page to another.

If you are stuck or have questions regarding HTML or other Web technologies, ask your questions here. No question too dumb!

Load Div content from one page to another.

Postby handemmet » Fri Sep 13, 2013 3:47 pm

Hi
I'm trying to load the content of a div from one html page to another. It works in FireFox and IE but not in Chrome. I used the following in the Head:

<script src="js/jquery-1.10.2.min.js"></script>

<script>
$(document).ready(function(){
$('#timetable').load('workout.html #printview');
})
</script>


It grabs the DIV 'printview' from the 'workout.html' page and places it in the DIV 'timetable'
<div id="timetable"></div>

Can anybody see why it won't show up in Chrome?
Thanks for your help
Emmet
handemmet
<h5>
 
Posts: 10
Joined: Thu May 31, 2012 8:50 am

Re: Load Div content from one page to another.

Postby zcorpan » Mon Sep 16, 2013 11:09 am

Are you testing this locally (with a file: URL)?
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Re: Load Div content from one page to another.

Postby handemmet » Mon Sep 16, 2013 3:39 pm

I have it on a test link:

http://www.ajna.ie/testing/stott_pilate ... table.html

It take the div (printview) from the above link and places it at:

http://www.ajna.ie/testing/stott_pilate ... print.html

It works in FireFox but not Chrome.

Thanks for your help
Emmet
handemmet
<h5>
 
Posts: 10
Joined: Thu May 31, 2012 8:50 am

Re: Load Div content from one page to another.

Postby zcorpan » Tue Sep 17, 2013 9:15 am

The jQuery script URL gives 404.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Re: Load Div content from one page to another.

Postby handemmet » Wed Sep 18, 2013 10:33 am

It's ok, I got it working. Thanks
handemmet
<h5>
 
Posts: 10
Joined: Thu May 31, 2012 8:50 am


Return to Help & Advice

Who is online

Users browsing this forum: No registered users and 1 guest