473,394 Members | 1,965 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,394 software developers and data experts.

Checkbox value not set in IE

14
RajasScripts,
I have a similiar using "sorttable.js" (http://kryogenix.org/code/browser/sorttable/). If the box get checked the value is lost. The checkbox state is being lost. Does anyone know of a solution? It is only in IE. In mozilla the checkbox state is remembered.

Steve
**** - email removed

Here is some sample code.
-----------------------------------------------------------------------------------------------------------------
[HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>website</title>
<script type="text/javascript" src="sorttable.js" ></script>
<script type="text/javascript">
<!--
function SetValue(id,message){
document.getElementById("value"+id).innerHTML = message+id;
}
//-->
</script>

<!--[if IE]>
<style type="text/css">

div.TableContainer {
height: 120px;
overflow: auto;
width: 700px;
}

div.TableContainer table {
width: expression(this.parentNode.offsetWidth-17);
}

div.TableContainer table thead tr {
position: relative;
/* this fixes the IE jumping header */
top: expression( this.parentNode.parentNode.parentNode.scrollTop + 'px' );
}

</style>
<![endif]-->
</head>
<body>
<hr/><hr/><hr/><hr/><hr/><hr/><hr/>
<div class="TableContainer" >
<table border='0' cellspacing='0' cellpadding='0' class="sortable">
<thead>
<tr bgcolor="#996600">
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<th width="19"></th>
</tr>
</thead>
<tbody style="max-height:120px;overflow:auto">
<tr>
<td><input type="checkbox" onclick="SetValue(0,'value');"></td>
<td>JAh RAsta</td>
<td><span id="value0">444444<span></td>
</tr>
<tr>
<td><input type="checkbox" value="on" onclick="SetValue(1,'value');"></td>
<td>JAh RAsta</td>
<td><span id="value1">444444<span></td>
</tr>
<tr>
<td><input type="checkbox" value="off" onclick="SetValue(2,'value');"</td>
<td>JAh RAsta</td>
<td><span id="value2">444444<span></td>
</tr>
<tr>
<td><input type="checkbox" onclick="SetValue(3,'value');"></td>
<td><input type="text" value="JAh RAsta" </td>
<td><span id="value3">444444<span></td>
</tr>
<tr>
<td><input type="checkbox" onclick="SetValue(4,'value');"></td>
<td>JAh RAsta</td>
<td><span id="value4">444444<span></td>
</tr>
<tr>
<td><input type="checkbox" onclick="SetValue(5,'value');"></td>
<td>JAh RAsta</td>
<td><span id="value5">4444444444<span></td>
</tr>
<tr>
<td><input type="checkbox" onclick="SetValue(6,'value');"></td>
<td>JAh RAsta</td>
<td><span id="value6">444444<span></td>
</tr>
<tr>
<td><input type="checkbox" onclick="SetValue(7,'value');"></td>
<td>JAh RAsta</td>
<td><span id="value7">444444<span></td>
</tr>
<tr>
<td><input type="checkbox" onclick="SetValue(8,'value');"></td>
<td>JAh RAsta</td>
<td><span id="value8">4444444444<span></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>[/HTML]
May 17 '07 #1
1 2191
acoder
16,027 Expert Mod 8TB
Post split from original thread - different topic
May 18 '07 #2

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

Similar topics

4
by: Jay | last post by:
Hi everybody ! I am currently writing a webpage that displays a list of records ( each record has a checkbox associated with it) to allow users to select any record they want to delete (much...
4
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input...
4
by: feanor | last post by:
I need to select children checkboxes when selecting the parent one. This is my function: function SelectChildrens(checkbox_name){ form = document.forms; Sname = checkbox_name.split("-"); for...
5
by: _andrea.l | last post by:
I have n checkboxes and 1 checkbox 'SELECT ALL'. for example: <form action="" method="get"> <input name="sa" type="checkbox" value="v"> select all <input name="c1" type="checkbox" value="v">...
34
by: clinttoris | last post by:
Hello Experts, I have been told to post this in the Javascript forum as I want to do this client side just before my form gets submitted. Once the user clicks the submit button a javascript...
6
by: Chuck Anderson | last post by:
My knowledge of JavaScript is limited. I learn from example and then adapt those examples to suit my needs. I have stumped myself on this one. I have a form with checkboxes that I want to...
0
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me...
0
by: TechnoAtif | last post by:
<?php include "dbconnect.php"; include "commonFunc.php"; ?> <!----------------------------------> <table width="80%" border="1" cellpadding="2" cellspacing="0"> <tr > <td...
3
realin
by: realin | last post by:
Hiya all, i am in deep trouble, i thought it was an easy task, but now its getting on my nerves. Well i have a div on a form, which contains a number of checkboxes, as <div...
1
Death Slaught
by: Death Slaught | last post by:
I play a game that when your backpack fills with items (the limit is 45) you must choose items to discard by unchecking their box. This is very annoying and time consuming so I was wondering if it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.