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 9:47am
saisne505
Edited 20-Jun-12 11: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 Zoltán Zörgő 265
1 /\jmot 205
2 CHill60 145
3 Peter Leow 145
4 Sergey Alexandrovich Kryukov 115
0 Sergey Alexandrovich Kryukov 9,353
1 OriginalGriff 6,881
2 Peter Leow 4,577
3 Zoltán Zörgő 4,129
4 Richard MacCutchan 2,882


Advertise | Privacy | Mobile
Web03 | 2.8.150129.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