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

  • Home
  • SEARCH
  • 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 8271683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:54:38+00:00 2026-06-08T06:54:38+00:00

I am using a button on my Django template, After click on the button

  • 0

I am using a button on my Django template, After click on the button it should open a link offering by reverse url( template tags ). I tried with the following code but it didn’t work

<input type= "button" style="float: right;" value="Next Graph" onClick="javascript:location.href = 'reverse(graph_view)';"></input>

I know that some thing is wrong with the above syntax. What will be the right one?

PS: I don’t want to use any external library

  • 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-06-08T06:54:39+00:00Added an answer on June 8, 2026 at 6:54 am

    Just use the actual template tag for this {% url %}. See: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#url

    UPDATE

    It should look like this:

    <input type= "button" style="float: right;" value="Next Graph" onClick="javascript:location.href = '{% url graph_view %}';"></input>
    

    If it still doesn’t work, you have some other problem. Create a new question and make sure post any errors and stacktraces you get.

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

Sidebar

Related Questions

I've created a button using HTML/CSS and a Java script. The button should direct
I am trying to display a button using jQuery template. The code is as
All right so I tried using the button set. So fair, I have been
sing django and jQuery I am trying to implement a button that, using the
I dynamically generate my html using the django form template everything works fine except
I want to create a rollback button in my django project using MySQLdb. I
I am using two button s Date and Time .They are working well .
I've started using the button element to submit my forms <button type=submit>Send</button> I know
Actually I created a button using the cobogw widget library. But the button does
I'm trying to style a button using <input type=button> instead of just <button> .

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.