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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:07:48+00:00 2026-05-19T10:07:48+00:00

I am available with the solution given by @Tomalak for MY QUESTION could you

  • 0

I am available with the solution given by @Tomalak for MY QUESTION could you pls help me out with it as its giving me an error in firebug as : frm.creatorusers is undefined
[Break On This Error] var rdo = (frm.creatorusers.length >…rm.creatorusers : frm.creatorusers;

I used the code for validating radio button as:

function valDistribution(frm) {
var mycreator = -1;
        var rdo = (frm.creatorusers.length > 0) ? frm.creatorusers : frm.creatorusers; 
         for (var i=0; i<rdo.length; i++) {
         if (rdo[i].checked) {
         mycreator = 1;
            //return true;
          }
          }
          if(mycreator == -1){
          alert("You must select a Creator User!");
  return false;

          }

}
  • 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-19T10:07:49+00:00Added an answer on May 19, 2026 at 10:07 am

    Here is how to use the code you were given by @Tomalak but did not copy correctly

    function valDistribution(frm) { // frm needs to be passed here
      var myCreator=false;
    // create an array if not already an array
      var rdo = (frm.creatorusers.length > 0) ? frm.creatorusers : [frm.creatorusers];  
      for (var i=0; i<rdo.length; i++) {
        if (rdo[i].checked) {
          myCreator=true;
          break; // no need to stay here
        }
        if (!myCreator){
          alert("You must select a Creator User!");
          return false;
        }
        return true; // allow submission
      }
    

    assuming the onsubmit looking EXACTLY like this:
    <form onsubmit="return valDistribution(this)">

    and the radio NAMED like this:
    <input type="radio" name="creatorusers" ...>

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

Sidebar

Related Questions

With a seriously big .NET site/solution (100's of assemblies), are there any tools available
Given a Rails application on the server, what is the best charting/graphing solution for
Given demo solution with two VSX-projects: 1. Add New Project -> Extensibility -> Item
Assume I have a static generic class. Its generic type parameters are not available
There are hundreds of shopping cart solutions available for every platform, and all hosting
I'm especially interested in solutions with source code available (Django independency is a plus,
Large pages are available in Windows Server 2003 and Windows Vista . But how
What methods are available for backing up repositories in a Windows environment?
Which parsers are available for parsing C# code? I'm looking for a C# parser
What options are available for receiving instant alerts from web applications? I have a

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.