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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:02:11+00:00 2026-06-03T06:02:11+00:00

I am trying to retrieve some items from local storage, and if they are

  • 0

I am trying to retrieve some items from local storage, and if they are there, reveal some content on the page. Here is what I am trying to do:

function loadData()
{       
    var transData = storage.get('TransInfo');

    if(transData != undefined)
    {
        $('#UserName').val(transData[0]);

        if(transData[1] == 'Blue')
        {
            $('#radio-choice-1').attr('checked', true);
        }
        else
        {
            $('#radio-choice-2').attr('checked', true);
        }

        $('#TransNum').val(transData[2]);

        if(transData[3] == 'A')
        {
            $('#radio-choice-1-board').attr('checked', true);
        }
        else
        {
            $('#radio-choice-2-board').attr('checked', true);
        }

        unHideAll();
        return true;
    }
};

And when the data is finally loaded, I want to call unHideAll():

//THIS FUNCTION FAILS WHEN CALLED!!
function unHideAll()
{
    /*
    $('#radio-choice-1').checkboxradio('enable');
    $('#radio-choice-2').checkboxradio('enable');
    $('#radio-choice-1-board').checkboxradio('enable');
    $('#radio-choice-2-board').checkboxradio('enable');
    $('#TransNum').textinput('enable'); 
    $('#UserContinue').remove();
    $('#nextButton').show();
    */
};

The problem I am getting is unHideAll() never gets anywhere. If I put an alert() at the top, it will show, but if I put an alert() at the bottom, it never gets there. Any idea why?

Here is how I am calling the methods:

$(document).ready(function()
{   
    clearStorage(); 
    loadData();
    unHide();           
    collectData();
});

Any idea why I can’t get unHideAll() to do anything? It works in the traditional unHide() method, which I use when there is no local storage yet, but if local storage is present it tends to fail quickly.

Any ideas?

EDIT:

Here is my local storage code:

window.storage = {
    store:localStorage,
    get: function( key ) 
    {
        try
        {
            return JSON.parse(this.store[key]);
        } 
        catch(e) {};

        return undefined;
    },
    set: function( key, value) 
    {
        try
        {
            this.store[key] = JSON.stringify(value);
        } 
        catch(e) {};
    }
};

EDIT 2:

And here is some code that works, which is why it’s puzzling why it won’t work in my new method.

//THIS CODE WORKS FLAWLESSLY TO REVEAL ITEMS!!
$('#UserContinue').click(function() 
{
    if($('#UserName').val() == '') 
    {
        alert('Please Enter a User Name First!');
        return false;
    }
    else 
    {
        User_Name = $('#UserName').val();
        $('#radio-choice-1').checkboxradio('enable');
        $('#radio-choice-2').checkboxradio('enable');
        $('#radio-choice-1-board').checkboxradio('enable');
        $('#radio-choice-2-board').checkboxradio('enable');
        $('#TransNum').textinput('enable'); 
        $('#UserContinue').remove();
        $('#nextButton').show();

        confirm('Welcome ' + User_Name +'!');

        return true;
    }

    return true;
});

Which is really weird…

  • 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-03T06:02:12+00:00Added an answer on June 3, 2026 at 6:02 am

    The code of unHideAll() is completely wrong. You don’t have methods like checkboxradio() or textinput(). This is why, when the function is called, an error occurs and produces the behavior you explain.
    To enable / disable form elements with jQuery, read the FAQ:
    http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_disable.2Fenable_a_form_element.3F

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

Sidebar

Related Questions

I'm trying to retrieve content using two items in the URL. Here is the
Im trying to retrieve some data from JSON object which holds location information such
I'm trying to retrieve values from an XML file and I find some values
Here's what I'm trying to do: - Retrieve a Map of key-value pairs from
I'm trying to retrieve some data from a JSON response, but this doesn't seem
I'm trying to parse some XML from the USGS. Here's an example The parameterCd
I'm trying to retrieve some most occurring values from a SQLite table containing a
I was trying to retrieve some JSON data from Google's AppEngine, and also a
I am trying to retrieve some data from the Google Maps API from a
I am trying to retrieve some data from an API using CURL request. Is

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.