473,396 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

asp.net / jscript question regarding checkbox and post back

Expand|Select|Wrap|Line Numbers
  1. function setCheckBox(checkedvalue) {
  2.         //document.getElementById("MMainBody_MTMWTWDTDHF").value = "test";
  3.         //setValue("<%=checkvalueHF.ClientID %>", checkedvalue);
  4.         if (checkedvalue == "false") {
  5.             setValue("<%=ReasonHF.ClientID %>", "noadjust");
  6.         }
  7.         else {
  8.             setValue("<%=ReasonHF.ClientID %>", "All");
  9.         }
  10.         document.forms[0].submit();
  11.     }

that's my code, works fine with you check on the checkbox, it changes the data its pulling, but when you uncheck it, the data stays the same and refreshing says it will repost, but still keeps same data as if it is checked. only if i hit my reset button,

<asp:Button ID="ResetBtn" runat="server" Text="Reset" OnClick="ResetBtn_Clicked"/>

does it go back to the original data. what is a way within jscript to get the page to recognize that the box has been unchecked?
Mar 31 '11 #1
1 1716
Frinavale
9,735 Expert Mod 8TB
I'm not entirely clear about your question.
I'm not even sure what the JavaScript does that you've posted.

Could you please explain more about your application.

Is the problem happening client side or server side?

-Frinny
Apr 4 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Jim H | last post by:
We ahve a .NET web page that we dynamically create a bunch of DataGrids and add them to a place holder. When the user hits submit we need to go through all of the DataGrids to get some data. We...
7
by: Yovi Oktofianus | last post by:
Hi all, is it posible to hook every post back event ? My goal is I want to know which control send post back event to my page before Page.OnLoad event raised. Or at least in Page_Load event...
6
by: Paul Perot | last post by:
Hi All: I was wondering if it was possible to evoke a post back event during code execution. I have a form that contains file specific information. I would like to iterate through an array of...
3
by: Brian Henry | last post by:
I have two list boxes on my form... lstCanSend and lstRecipients... well then there are two buttons add and remove between them (your basic select and pick listing) which uses java script to move...
1
by: thomson | last post by:
Hi All, I do have a button control, which has a post back and has to do some server side validations also. I need to attach some client side scripting also , where it can be called only on the...
12
by: Michael Lang | last post by:
I'm adding checkbox controls to a panel in a post back, I then have a second post back in which I attempt to process the checkbox controls however they seem to have disappeared off the panel. The...
1
by: Garg | last post by:
I had a listbox, whose autoPostBAck property was set to true. So. if I was clicking on any item for the first time, it caused a successful post-back. However, if i clicked on the item...
2
by: Garg | last post by:
I had a listbox, whose autoPostBAck property was set to true. So. if I was clicking on any item for the first time, it caused a successful post-back. However, if i clicked on the item...
1
by: =?Utf-8?B?Z29yaWxsYQ==?= | last post by:
As we know , the view state is not responsible for having TextBoxes, CheckBoxes, DropDownLists, and other Web controls remember their values across postback. When I dynamically add a...
1
by: vsgsk | last post by:
In our asp.net 2.0 project, I have a huge page which handles lot of security related issues with some 30 to 40 dropdowns and many links. The left side content is the help text for the page whereas...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.