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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:33:24+00:00 2026-05-24T03:33:24+00:00

I have five $_POST hidden fields in my form that hold the id’s names

  • 0

I have five $_POST hidden fields in my form that hold the id’s names of the icons the user has chosen.
I want to make these icons marked back again if the user goes back to the page.
I don’t seem to understand how to do this, (marked as PROBLEM).

var i=0;
while($('#field' + i + 1 + '_icon_id').val() != '') {
    $('img.selectable').filter(function() {
        // PROBLEM IS HERE (I THINK)
        return $(this).attr('id') == $('#field' + i + 1 +'_icon_id').val();
    }).css('border','3px solid ' + BLACK_COLOR);
    i++;
}

Besides, could anyone give me some advice as for how do I go about investigating my jQueries ? Can these be debugged ?

Thanks in advance !!

  • 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-24T03:33:26+00:00Added an answer on May 24, 2026 at 3:33 am

    It depends on your browser; if you’re using a recent browser then normally you can press F12 to open up the developer window.

    In Chrome, one of the Tabs is called Scripts. You can go into that screen and find your line and click the line number to set a breakpoint.
    Once the breakpoint activates, you can click the button at the bottom of the screen to open the Console, and this lets you evaluate javascript functions on the fly, so you could type in

    "#field' + i + 1 + '_icon_id'
    

    and it’d display the answer.
    This is what I got using firefox’s ‘Firebug’ developer window:

    >>> i = 0
    0
    >>> '#field' + i + 1 + '_icon_id'
    "#field01_icon_id"
    

    Adding the bracketing shows this result:

    >>> i = 9
    9
    >>> '#field' + (i + 1) + '_icon_id'
    "#field10_icon_id"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a model that has ratings in it for an post. I want
I have a tab bar controller with five buttons. That controller has a tab
I have five combo boxes. Each one has a different name, but the possible
I have a form that uses PHP to calculate a total based on the
I have a page that allows a user to choose some things in a
I have a form that submits a jQuery .ajax event every time menu's value
Here is what I want to do: I want to have a datagrid that
I want to only return items that don't have associated images. My relationship is
I'm working on a horizontal gallery that will display mixtape covers, I have five
I want to draw five rectangle bars in Android. I have the regtangles, but

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.