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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:06:25+00:00 2026-06-16T03:06:25+00:00

I have what seems like a straight forward problem, I want to be able

  • 0

I have what seems like a straight forward problem, I want to be able to change arguments on a link_to to something the user picks. My app does not require a login so the usual methods of setting user prefs on login arn’t appropriate. The user selects an option from a select_tag like so (I’m using Haml);

 = select_tag('bible_version', options_for_select(['NIV','ESV', 'MSG'], :selected => @bible_version))

Here is part of my index view with the link_to;

  - @verses.each do |verse|
    %tr
      %td= verse.gospel_verse
      %td= link_to 'Read', 'http://www.biblegateway.com/passage/?search=' + verse.gospel_verse + '&version=' + @bible_version

What would be the best way to change the @bible_version variable to the value the user chose and reset all the links? I figure I need to set a cookie and dont mind doing a page refresh or using Javascript, but I cant get my brain around a clean way to do this. Thanks in advance for any help!

  • 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-16T03:06:26+00:00Added an answer on June 16, 2026 at 3:06 am

    I didn’t test the below code, but seems like it would work in your on load function.

    $("#bible_version").change(function(){
       $(your_links).attr("href") = $(this).val();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have what seems like a simple problem. I have a Spring web app,
This seems like it should be straight-forward, but I'm stumped. I have a link
I'm having some issue getting what seems like a fairly straight-forward problem solved in
This seems like a simple problem: I have a WF4 activity that guides the
I have an issue that seems like very flaky behavour, is this a problem
Seems like a common issue but I don't know a straight forward answer for
I have what seems like a simple arrangement: a list of tags in a
It seems like I have begin ... rescue ... end statements everywhere in my
This seems like a must have form input for a mobile ui framework, but
This seems like such a simple question. I have several Edit boxes on my

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.