Click here to Skip to main content
11,637,415 members (67,745 online)
Rate this: bad
good
Please Sign up or sign in to vote.
I'm beginner in the web, I will test if a checkbox is checked or not checked if it is I will post a template if not another template, which will be dynamic, If I uncheck switche to another template (I have two template)
Like this:

<input type="checkbox" name="CHECKBOX_1" value="1" id="1" checked="checked"/>;     
        if(...){
            template_2  
        }
        else(...)
        {
            template_1   
        }


how can i do this?

I am sorry for my bad english

thanks,
Posted 20-Jun-12 8:47am
saisne505
Edited 20-Jun-12 10:22am
v5
Comments
Prosan at 21-Jun-12 1:04am
   
by js or code behind.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

you can check value of checkbox
checkbox.value=true then doc1 else doc2
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 344
1 OriginalGriff 295
2 stibee 288
3 jyo.net 270
4 himanshu agarwal 209
0 OriginalGriff 9,031
1 Sergey Alexandrovich Kryukov 8,643
2 Mika Wendelius 6,959
3 F-ES Sitecore 2,388
4 Suvendu Shekhar Giri 2,320


Advertise | Privacy | Mobile
Web01 | 2.8.150728.1 | Last Updated 21 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100