-
Ajax load different content from a single external page
Can anyone recommend a script that will load different content from a SINGLE external page?
I have 20+ sections (divs) in a single external page and want to load any one of the divs on demand into its relevant container on the 'main' page depending on the link selected.
The nerest I have found is the Ajax Pagination Script 1.22 but that calls the content from a different page for each link chosen.
I didn't want to declare 20+ different external pages just for a paragraphs worth of content in each. I was envisaging an inline call to just a specific section in one page.
I hope that makes sense.
-
-
That's not easily possible.
You could use Ajax then reparse the contents and look for a div with a certain ID, but it seems messy.
What I would do is use PHP or another serverside language to show only one of the divs. You can use a single page, but use a variable in the URL like ?div=4 to display the 4th div. Then use Ajax to call for one of those divs (actually now acting as separate pages).
In other words, this will be easier to handle on the content page, not the requesting page.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
Thanks djr33 for quick response and thanks for putting the problem into perspective.
Was trying to treat as a flat file db.
Rethink required,
handling on the content page is the way to go.
Cheers
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks