Jump to content

Ajax URL Navigation Without JQuery


jimmyoneshot

Recommended Posts

Does anyone know of any good scripts for ajax navigation based on urls that only uses javascript and no JQuery?

 

i.e. I need to retrieve the relevant "sections" and "pages" from the following type of url to navigate my pages or more like to reload data into my page based on variables that are submitted in the url :-

 

http://www.mysite.com/#!/page/sectio...tion2/section3

 

so if the url was:-

 

http://www.mysite.com/profile/johnsm...johnshouse.jpg

 

These variables would be populated:-

 

$page would be assigned "profile"

$section1 would be assigned "johnsmith"

$section2 would be assigned "photos"

$section3 would be assigned "johnshouse.jpg"

 

And then I could load the relevant page and section and sub sections into my page.

 

Is this possible?

 

Link to comment
https://forums.phpfreaks.com/topic/242466-ajax-url-navigation-without-jquery/
Share on other sites

Yes ajax is javascript so you can use it. Do you need a link to code or a tutorial?

 

What you need to know is this - ajax calls a server side php script that puts together what you want to see and it's the resulting html code that is sent back down to you to paste unto your existing page.

 

So the first thing you need to do is format the html code you need and make sure it looks OK in the page your going to display it in. Then have your php script format it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.