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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:57:22+00:00 2026-06-17T16:57:22+00:00

I want to slide some jquery into a piece of another programmers javascript code

  • 0

I want to slide some jquery into a piece of another programmers javascript code that I have to work worth. Can I do this? Look at the code for the ‘radio’.

function blank(field) {
    if ((field.type == "text" || field.type == "textarea") && (field.value == " " || field.value == ""))
            {
                return true;
            }

else if field.type = "radio"
{
$('input[type='radio', **name=passField.NameHere**]:checked').size() > 0);
}

}

so in the above I want to use jquery to see if anything in a radio group has been checked.

Example of radio code:

<input type="radio" name="2074" id="2074" value="Yes" class="valuetext>Yes
<input type="radio" name="2074" id="2074" value="No" class="valuetext>No

I want to pass the field.name which has already been captured in another function, into the jquery call. Is this possible? If so, how?

Below is the function that gathers the fields that need to be exampled:

var field = [], blankFields = [],
        listText = [], listItem = [], fieldId = [], label = [];

function checkRequired(fieldList) {
    for (var i = 0; i < fieldList.length; i++)
    {
        listText = fieldList[i];
        listText = listText.substring(1, listText.length - 1);
        listItem = listText.split("||");
        fieldId = listItem[0];
        label = listItem[1];
        field = document.getElementById(fieldId);

        if (visible(field) && blank(field)){
            blankFields.push(label);
        }
    }
    //return blankFields;
    if (blankFields.length > 0) {
        displayError(blankFields);
    }
}

Any help would be appreciated.

  • 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-17T16:57:23+00:00Added an answer on June 17, 2026 at 4:57 pm

    Yes, it looks like field is the actual DOM object, so:

    $('input[type="radio"][name="' + field.name + '"]:checked').size() > 0);
    

    Note that you have several syntax errors in the code other than the obvious place you were calling out a placeholder. For instance:

    else if field.type = "radio"
    

    You need parens around the condition, and = should be == or ===.

    Also note that I changed ' to " in a couple of places, because originally you had:

    $('input[type='radio']...
    

    …which ends the string just after type=, since the string started with ' and therefore ends with '.

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

Sidebar

Related Questions

I am trying to put some jquery UI code into an existing asp.net app,
I have some input fields than I want as an array so that I
I have a bit of HTML/JQuery code that only seems to be working for
I have a very basic function which I am using jQuery to slide some
I am creating some sliding panels (accordion) and I want to slide the background
I want to do some client side validation using javascript in ASP.NET page. I
Ive got a div that i want to slide out on click using .show(slide,
I have a string that must fit into a box, and must be at
A simple question I'm sure, but I can't figure it out. I have some
I an writing some JQuery to split some html code at a specific height.

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.