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

  • Home
  • SEARCH
  • 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 8003709
In Process

The Archive Base Latest Questions

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

In the code below, plane.posFile is a string array of length 3 that identifies

  • 0

In the code below, plane.posFile is a string array of length 3 that identifies 3 radio buttons, and the buttons display correctly.

If oSource.posfile is a blank string, the 0th button gets checked correctly.

If oSource.posfile is not blank, it is one of the three in plane.posFile except that the file extensions have to be stripped for the comparison.

What happens is that the code correctly (using Firebug to step through it) chooses which index to use.

It goes through into the break statement and then out with i=1.

However, the attempt to set when eq(i) the attr('checked',true) files. I don’t see why. It’s the same statement as previously when eq(0) was used. I’ve been staring at it for a couple of hours trying things with no luck.

Any ideas are greatly appreciated, including comments on the approach.

$wb.pcPosCfg.empty();
for (i=0; i<plane.posFile.length; i++)
     $wb.pcPosCfg.append("<input type='radio' style='width:11px' name='rbnLoadCfg' value=" + i + ">" + plane.posFile[i] + "<br>");
    if (oSource.posfile=='') {
        $('input[name="rbnLoadCfg"]:eq(0)').attr('checked',true);
    }
    else {
        for (i=0; i<plane.posFile.length; i++) {
            if (oSource.posfile==plane.posFile[i].substring(0,plane.posFile[i].length-5))
                break;
            }
        $('input[name="rbnLoadCfg"]:eq(i)').attr('checked',true);
    }
}
  • 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-04T16:43:30+00:00Added an answer on June 4, 2026 at 4:43 pm
    $('input[name="rbnLoadCfg"]:eq('+i+')').attr('checked',true);
    

    You need to concatenate your string to include your variable properly.

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

Sidebar

Related Questions

The code below working for only first div. I can't display other divs when
The code below doesn't seem to work or find anything on an array. I'm
The code below removes www., etc. from the beginning of websites that are entered
Consider the code below (which has been simplified). I have a service class that
I have the code below: while p < points.length locs = points[p] latLng =
In the code below, I am trying to create a function patient_count that is
I have an javascript that I place into a page using the code below.
The code below works for the class that I hard coded XCCustomers in my
The code below is a dreadful hack. Uri linkUri = HttpContext.Current.Request.Url; string link =
I got below code from http://msdn.microsoft.com/en-us/library/dd584174(office.11).aspx for adding custom property in webpart tool pane.

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.