Click here to Skip to main content
12,767,637 members (52,274 online)
Rate this:
 
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
saisne512
Updated 20-Jun-12 11:22am
v5
Comments
Prosan 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 21 Jun 2012
Copyright © CodeProject, 1999-2017
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