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 6691349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:44:29+00:00 2026-05-26T05:44:29+00:00

Working on some dynamic pages and specifically we have profile pages for users. However

  • 0

Working on some dynamic pages and specifically we have profile pages for users. However there are several routs for them to get to these pages so its not practical to set up a specific rout for the back button.

here is my code:

<%= link_to_function "Back", 'javascript:history.back()', { :class => "button-back" } %>

and it generates this html:

<a href="#" class="button-back" onclick="javascript:history.back(); return false;">Back</a>

this is working in IE and Firefox but not Chrome….What gives? I have looked at the other stack questions that are similar but none of them are browser specific and according to them this should work. Any help would be appreciated.

Edit:
After further testing it turns out the real problem is that this is working in chrome but is not working when I drop the pages into an Iframe and try and use the button to navigate inside of a chrome extension. The reason I am doing this is because we are using these pages cross browser in different apps/extensions/toolbars depending on the browser. Its working in all of them except our chrome extension.

  • 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-26T05:44:30+00:00Added an answer on May 26, 2026 at 5:44 am

    The javascript: protocol it for hrefs, not for onclicks. If you take out the javascript: it might work:

    <%= link_to_function "Back", 'history.back()', { :class => "button-back" } %>
    

    It’s strange to me that IE and Firefox accept that though..

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

Sidebar

Related Questions

I'm working on a stored proc that executes some dynamic sql. Here's the example
I am working with some complex queries using the dynamic find_all method and reached
I'm working on a project which includes some slightly more complex dynamic layout of
I have been working on some legacy C++ code that uses variable length structures
I have used the following code to generate some dynamic checkboxes. This works for
I have an ASP.NET user control that I want to write some dynamic Javascript
On a page I am working on, I have several distinct pieces of PHP,
I have been working on a site that makes some pretty big use of
I'm working on a little project, basically I have some text on my PHP/HTML
Working on some tweaks for a build script, I noticed that the output from

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.