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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:45:56+00:00 2026-06-03T09:45:56+00:00

i need to load a checkbox dynamically and set its state based on some

  • 0

i need to load a checkbox dynamically and set its state based on some value….

This is what i have done so far…

(defsnippet customer-config-setup html-customer-configuration [:div#div_game_setup_container ]
  [result-rows]
  [:div#div_gameprefix]
  (clone-for [idv (map vector (iterate inc 0) result-rows)]
    [:button#btn_gameprefix ]
    (do->

    #(if (= (result-rows :active) 0)
       ((set-attr :checked  :val )%)%)
      (content (str ((idv 1) :gameprefix )))

    )
  )

)

and also

(defsnippet customer-config-approval html-customer-configuration [:div#div_auto_approval ]
  [result-rows]
  [:tr#tr_auto_approval]
  (clone-for [idv (map vector (iterate inc 0) result-rows)]
    [:td#td_auto_approvaltext ] (content (str ((idv 1) :settings_caption )))
    [:td#td_auto_checkbox ] (set-attr :checked  :val )
    )
  )

but for some reason they don’t work… what could be the problem…. and is there a way to set checkbox state here…..?

Thank you..

  • 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-03T09:45:57+00:00Added an answer on June 3, 2026 at 9:45 am

    Sorry i had missed out something..
    adding (((idv 1)) while getting values here is necessary… i really don’t have enough time to dig up and find a reason why is that even required… because this library/clojure is so low on resources and tutorials it becomes hard find a reason for such things…

    (defsnippet customer-config-setup html-customer-configuration [:div#div_game_setup_container ]
      [result-rows]
      [:div#div_gameprefix]
      (clone-for [idv (map vector (iterate inc 0) result-rows)]
        [:button#btn_gameprefix ]
        (do->
    
        #(if (= (((idv 1)result-rows :active)) 0)
           ((set-attr :checked  :val )%)%)
          (content (str ((idv 1) :gameprefix )))
    
        )
      )
    
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to load some resource from my DLL (i need to load them
Two Delphi programs need to load foo.dll, which contains some code that injects a
I need load XNA.Texture2D to PictureBox. i've tried this: http://www.gamedev.net/community/forums/viewreply.asp?ID=3224621 but it doesn't work.
I need to generate checkbox group based on data from DB, so I fetch
I have a legacy code that uses asp.net updatepanel to load some pagination items.
I am adding some checkboxes dynamically during runtime, and I need to know whether
I have a checkbox when user checked that check box means. I need to
Imagine we have a webform page with a dynamically created checkbox and date time
I have a jqgrid with a checkbox column. when checkbox is pressed i need
I have this jQuery code, which uses the toggle() function on a checkbox input

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.