Dev0ps's avatar

how to set mannual url (href) in pagination

i have a page which support both direct load and asyn ajax load

when ever i load page directly its working fine with pagination

http://127.0.0.1:8000/UID/gui454ui4g/Photos?page=2

but whenever i load page via ajax its not working due to link is changed.

http://127.0.0.1:8000/cdPhotos?page=2

cdPhotos is my asyn route.

how i set pagination url mannually force to get href url everytime

0 likes
3 replies
michapietsch's avatar

Do you use Ajax to get the data and then insert it into the page and now you also want to update the URL in the address bar?

Dev0ps's avatar

i use this function to update my url

function changeurl(url)
    {
        var new_url="/"+url;
        window.history.pushState("data","Title",new_url);
        document.title=url;
    }

but still i face this issue

Cronix's avatar

What does url look like when you pass it to your function? How do you retrieve the url?

Please or to participate in this conversation.