Click here to Skip to main content
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
saisne484
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 OriginalGriff 250
1 Sergey Alexandrovich Kryukov 174
2 Rob Philpott 100
3 CHill60 70
4 Peter Leow 70
0 OriginalGriff 6,902
1 Sergey Alexandrovich Kryukov 5,623
2 Maciej Los 3,479
3 Peter Leow 3,373
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 21 Jun 2012
Copyright © CodeProject, 1999-2014
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