Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6371531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:05:03+00:00 2026-05-25T01:05:03+00:00

I have an ajax navigation system in my app. Each ajax link is of

  • 0

I have an ajax navigation system in my app. Each ajax link is of class ajax and the page it needs to load is saved in an aurl attribute, for example:

<a class="ajax" aurl="/user/posts/3/edit">Edit Post</a>

The aurl is given to the element using symfony’s url_for method in the server-side.

I thought about more elegant way of saving the element’s aurl attribute, like jQuery.data(), but how can i use it from the server side? creating a script after each element to set it’s aurl doesn’t seem like a good solution..

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:05:04+00:00Added an answer on May 25, 2026 at 1:05 am
    <a class="ajax" data-aurl="/user/posts/3/edit">Edit Post</a>
    

    Then you can access it through .data('aurl') if you use a recent jQuery version (1.5 or newer AFAIK).

    However, why don’t you simply set the href (which should be set anyway) and then use $(this).attr('href') to get the url and use e.preventDefault(); (with e being the first argument of the click handler function) to prevent the link from loading without AJAX?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an AJAX navigation and I would like to scroll the page to
I want to have the jQuery AJAX load to insert before the navigation as-is
I have an ajax navigation similar like here . now if a menu is
I'm developing this website: http://parkoura.tk/a/sandbox/ I am using an ajax navigation. I have a
I have an ajax application that uses hashbanging for navigation and I keep track
I have an Ajax site where I have browser navigation hooked up to ajax
I have this jQuery ajax navigation tabs plugin that I created using some help
I have a javascript error at the Safari 4.0.4 browser. I'm using AJAX navigation
I have the following example where when a user clicks a navigation line it
I have a navigation system that I wanted to make compatible with both javascript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.