Why does data.url report as undefined? (How to determine the page URL)
-
Would you help teach me why
data.urlis reporting back asundefined?This is my code snippet:
$(window).on('action:ajaxify.end', function(data) { console.log('url is ' + data.url); });The output in my browser console is:
url is undefined nodebb.min.js:15:22076Edit: My goal is to determine the URL of the "page" that the user is currently at.
Thank you.
-
@baris @bentael helped me out last night. Amongst other things he confirmed that too, that being on the index page results in an empty
data.url. He did get me going using thelocation.href.I have to say every one on this forum has been super helpful. I intend to make a donation to Nodebb in the near future.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login