ok,
I've sussed it out.
my javascript looks like this now..
<script type="text/javascript">
<!--
function modifyText(id,val){
var tar=document.getElementById(id);
var cbid = document.getElementById('cb_'+val)
if(cbid.checked){
// checkbox is checked, so add the text to the input text...
Ah!!,
Just noticed my mistake after posting this.
cbid = 'cb_'+val;
should be ...
var cbid = document.getElementById('cb_'+val)
The replace bit isnt workng though. so any hints would help.
Also, how would I deal with including the ' ' characters round the group id's?
Thanks again.
All the...
Hi,
I have a list of check boxes with group id's and group names for different locations. In my form, I have a groups field which needs to be populated with the group id's selected. So the text filed will eventually be a comma seporated list of group id's for a sql query, like
"'group1'...
np. i dont think ther is an auto size option. another idea to avoid iteration would be to keep an array of widths as a unit variable, and run a compare between the field just edited and the width last recorded. that way you could avoid iterating through all the rows. maybe theres an on cell exit...
Not sure what you mean.
From what I can see, you want to know the number of characters in a memo field?
length(memo1.Lines.Text);
Maybe you could clarify your post?
hope this helps,
kinnon
Try this out...
Procedure TForm1.SetColWidth(col:Integer);
var i,str_width, col_width:Integer;
Begin
{ set the width of the defined column in a string grid to the
width of the widest string }
str_width:=0;
col_width:=0;
for i := 0 to StringGrid1.RowCount - 1 do...
Just a thought on this. set up a loop to read down through each columns counting the number of characters in each cell; and keeping the largest counts.
multiply the pixel size of each charater by the maximum number of characters in each cell to get the total number of pixels in a cell, and add...
Hello,
I'm using xmldoc for the first time to manage application data, because the ini files just dont have the structure. I was thinking about using a treeview style file with tabs, but that would be untidy and harder for people to work with.
The xml file is not set in stonde, and the program...
Hi there,
I work for a business who has a large client base spread across the UK. We have to add a specific URL to IE on each of our clients dedicated machines, and they really dont have the staff skills to do it themselves.
I've written a small program to perform all the updates we need done...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.