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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:12:27+00:00 2026-06-02T22:12:27+00:00

I’m new to Javascript, but I have come across an issue at my work

  • 0

I’m new to Javascript, but I have come across an issue at my work to do some javascript. We are customising a product for customers to create forms. The form objects (text fields, drop downs etc) are present in menu. Each of these objects can be selected individually or multiple by using Ctrl Key. We have been asked to enable radio buttons so that customers can select them easily. Each of these are in groups, so can be selected easily.

For eg. (a) Select all customer contact options (b) Customer organisation details
Once selected, they should be draggable and dropped into the form.

Hence the requirement in technical terms are

  1. Radio buttons for various groups (Customer Contact options etc..)

  2. Once a radio button is selected, activate the relevant class of objects.

  3. Initiate the drag/move function

    The HTML snippet is something like.. //replaced < to ( to put as code

    (div class="FormElementMain" style="TOP: 5px; LEFT: 10px" FieldType="Label")
  (span class="contactOptionsLabel" style="width: 50px")Mobile Number(/span)
(/div)
(div class="FormElementMain" style="TOP: 5px; LEFT: 20px" FieldType="Label")
  (span class="contactOptionsLabel" style="width: 50px")Tel Number(/span)
(/div)
(div class="FormElementMain" style="TOP: 5px; LEFT: 30px" FieldType="Label")
  (span class="orgDetailsLabel" style="width: 50px")Job Designation(/span)
(/div)

The product code(function) where we need to bind is:

function selectLabelClass(object)
{
    
    object.addClass("highlightDiv");   // Just to highlight the div class so a shade appears around the text
    var currentWrapper=object;
    
    CurrentObject.push(new MoveObject(currentWrapper));
    currentWrapper.draggable({ grid: [GridSizeX, GridSizeY], containment: ".ui_fieldsetset" });
    
    DisplayProperties();
}

Hence once the Radiobutton is clicked, I’m trying to initiate the Label Class as

$("#selectLabelRadioButton").live("click",
        function () 
        {
            selectLabelClass(".contactOptionsLabel");
        });
        
 });

Its not working though 🙁
Can anyone suggest how to activate a class/group of objects using a radio button

On a separate note, I tried a simple test and it works.
// Just to highlight all objects of the class using a red border.
// So really just wanted to know how the .css can be replaced by another custom function

  $("#selectLabelRadioButton").click(function(){
   $(".selectLabelClass").css("border","3px solid red");
 });
  • 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-02T22:12:29+00:00Added an answer on June 2, 2026 at 10:12 pm

    I don’t know what about all of your code which is not in your question.

    But you just passed a string instead of a jQuery object to the selectLabelClass which expect to get a jQuery object…

    Change this: selectLabelClass(".contactOptionsLabel");
    To this: selectLabelClass($(".contactOptionsLabel"));

    $("#selectLabelRadioButton").live("click", function() {
        selectLabelClass($(".contactOptionsLabel"));
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I have some data like this: 1 2 3 4 5 9 2 6
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small

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.