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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:43:15+00:00 2026-06-04T18:43:15+00:00

I currently have a <ul> in my navigation area which holds a <%= render

  • 0

I currently have a <ul> in my navigation area which holds a <%= render :partial => "sessions/manager" %> which basically calls another partial which depending on the users login status renders either a login form or a welcome statement.

My login section is powered by ajx and so refreshes automaticlly. Here’s the code im using.

login.js

$(document).ready(function() {

  $('form#sign_in').bind('ajax:success', function(e, data, status, xhr) {
    console.log(data);
    if(data.success) {
      $('.user_nav').html(data.content);
    } else {
      $('.user_nav').prepend(data.errors.join('<br />'));
    }
  });

});

Now I want another div on my page containing various links to either hide or show depending on the users logged in status.

Currently my code is this.

<% if(signed_in?) %>
  <li><%= link_to "Clients", "/clients"  %></li>
  <li><%= link_to "Jobs", "/jobs"  %></li> 
<% else %>
<% end %>

However, this doesn’t work how id like. The links don’t show at first which is cool BUT the links don’t show again when im signed in… unless I do a full page refresh.

How can I ajax-ify this section?

  • 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-04T18:43:16+00:00Added an answer on June 4, 2026 at 6:43 pm

    use CSS’s Visibility property instead, that’s less secure, because anyone can see Links in source code, but will works smoothly.

    and if in JSP, try reloading page through that code, inside that if, that will look like sign in, is in progress and meanwhile your page will be refreshed.

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

Sidebar

Related Questions

I currently have profiles on my website with a unordered list for the navigation,
Here is the thing. I currently have a tabBar controller, with several navigation controllers
I have a left-positioned navigation that shows/hides content on the right. Currently, when you
I currently have 4 textboxes which will be used to store an ip address.
I have a menu navigation area where I use .animate to slide the text
Currently I have a pure silverlight website with navigation. Im worried about the customers
I currently have a search box in our admin navigation that is submitting to
So I currently have Wordpress with some navigation links along these lines: Link 1
I currently have a script that outputs a secondary navigation based on the site
I currently have the following code that loads a UIWebView from another View. Now

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.