Problem with Checkboxes in a DIV 
Author Message
 Problem with Checkboxes in a DIV

I have a strange problem that I cannot seem to sort out.

I have some code (see below) that works in other modules that I have
written.  It has worked like a champ so far.  In the latest module,
MediaRepCount = 28 (there are 28 items that I am checkboxing)

The last five checkboxes in are active and I can check them.  The
23 checboxes before it cannot be checked with a mouse.  I can
tab over to them and check them with a spacebar but I cannot
get focus on it from a mouse.

Weird.  Any ideas why this behavior is happening?

JK

-------------------------------------------
<DIV id=Customstuff STYLE="position:absolute; top:365px; left:0px;
width:580px; visibility:hidden">
<strong><font color="maroon" size="3">Custom Report
Settings</font></strong>
<TABLE ALIGN=left BORDER=0>

<%
        TRCount = 1
        for II = 1 to MediaRepCount
                if TRCount = 1 then
                        Response.Write "<TR>"
                end if
                Response.Write "<td nowrap align=right><strong><font
color='mediumblue' size='2'>" & MediaRep(II) & ":
&nbsp;</font></strong>"
                Response.Write "<input id=Rep" & II & " name=Rep" & II
& " type='checkbox' ></font></TD>"
                if TRCount = 4 then
                        Response.Write "</TR>"
                        TRCount = 0
                end if
                TRCount = TRCount + 1          
        next
        %>

</TABLE>
</DIV>



Sun, 16 Mar 2003 03:00:00 GMT  
 Problem with Checkboxes in a DIV

Hi Joe:

I tried the code, only wrapping FORM tags around it, and it works fine in IE
and NETSCAPE. I am assuming the MediaRep() is a function that returns a
string name or something...

Maybe try loading the webpage on another computer..... Check the view source
for the loaded page and see if the tag structure is correct.

Quote:

>I have a strange problem that I cannot seem to sort out.

>I have some code (see below) that works in other modules that I have
>written.  It has worked like a champ so far.  In the latest module,
>MediaRepCount = 28 (there are 28 items that I am checkboxing)

>The last five checkboxes in are active and I can check them.  The
>23 checboxes before it cannot be checked with a mouse.  I can
>tab over to them and check them with a spacebar but I cannot
>get focus on it from a mouse.

>Weird.  Any ideas why this behavior is happening?

>JK

>-------------------------------------------
><DIV id=Customstuff STYLE="position:absolute; top:365px; left:0px;
>width:580px; visibility:hidden">
><strong><font color="maroon" size="3">Custom Report
>Settings</font></strong>
><TABLE ALIGN=left BORDER=0>

><%
> TRCount = 1
> for II = 1 to MediaRepCount
> if TRCount = 1 then
> Response.Write "<TR>"
> end if
> Response.Write "<td nowrap align=right><strong><font
>color='mediumblue' size='2'>" & MediaRep(II) & ":
>&nbsp;</font></strong>"
> Response.Write "<input id=Rep" & II & " name=Rep" & II
>& " type='checkbox' ></font></TD>"
> if TRCount = 4 then
> Response.Write "</TR>"
> TRCount = 0
> end if
> TRCount = TRCount + 1
> next
> %>

></TABLE>
></DIV>



Sun, 16 Mar 2003 03:00:00 GMT  
 Problem with Checkboxes in a DIV
MediaRep() returns a string name from a string array.

I have tried it after reboot (both client/server) and on another
system and the same problem.

The only difference is the number of checkboxes is larger
on the problem page then on the working pages.  The page
also is scrolling vertically where the others are not.

JK

On Wed, 27 Sep 2000 13:26:20 -0600, "Paul Limoges"

Quote:

>Hi Joe:

>I tried the code, only wrapping FORM tags around it, and it works fine in IE
>and NETSCAPE. I am assuming the MediaRep() is a function that returns a
>string name or something...

>Maybe try loading the webpage on another computer..... Check the view source
>for the loaded page and see if the tag structure is correct.


>>I have a strange problem that I cannot seem to sort out.

>>I have some code (see below) that works in other modules that I have
>>written.  It has worked like a champ so far.  In the latest module,
>>MediaRepCount = 28 (there are 28 items that I am checkboxing)

>>The last five checkboxes in are active and I can check them.  The
>>23 checboxes before it cannot be checked with a mouse.  I can
>>tab over to them and check them with a spacebar but I cannot
>>get focus on it from a mouse.

>>Weird.  Any ideas why this behavior is happening?

>>JK

>>-------------------------------------------
>><DIV id=Customstuff STYLE="position:absolute; top:365px; left:0px;
>>width:580px; visibility:hidden">
>><strong><font color="maroon" size="3">Custom Report
>>Settings</font></strong>
>><TABLE ALIGN=left BORDER=0>

>><%
>> TRCount = 1
>> for II = 1 to MediaRepCount
>> if TRCount = 1 then
>> Response.Write "<TR>"
>> end if
>> Response.Write "<td nowrap align=right><strong><font
>>color='mediumblue' size='2'>" & MediaRep(II) & ":
>>&nbsp;</font></strong>"
>> Response.Write "<input id=Rep" & II & " name=Rep" & II
>>& " type='checkbox' ></font></TD>"
>> if TRCount = 4 then
>> Response.Write "</TR>"
>> TRCount = 0
>> end if
>> TRCount = TRCount + 1
>> next
>> %>

>></TABLE>
>></DIV>



Sun, 16 Mar 2003 03:00:00 GMT  
 Problem with Checkboxes in a DIV
I noticed you don't close the </TR> if the loop is not a multiple of 4.
You have an extra </FONT> tag..

Maybe try this:

Response.Write "<td nowrap align=right><font color='mediumblue'
size='2'><strong>" & MediaRep(II) & ": &nbsp;</strong>"
Response.Write "<input id=Rep" & II & " name=Rep" & II & " type='checkbox'

Quote:
></font></TD>"

You can try a couple things....
1. Instead of MedaRep(II), use II instead. See if the problem still
occurs... (maybe one string names are causing the problem)
2. Remove the Style definition in the DIV tag. (I had problems in Netscape)

Quote:

>MediaRep() returns a string name from a string array.

>I have tried it after reboot (both client/server) and on another
>system and the same problem.

>The only difference is the number of checkboxes is larger
>on the problem page then on the working pages.  The page
>also is scrolling vertically where the others are not.

>JK

>On Wed, 27 Sep 2000 13:26:20 -0600, "Paul Limoges"

>>Hi Joe:

>>I tried the code, only wrapping FORM tags around it, and it works fine in
IE
>>and NETSCAPE. I am assuming the MediaRep() is a function that returns a
>>string name or something...

>>Maybe try loading the webpage on another computer..... Check the view
source
>>for the loaded page and see if the tag structure is correct.


>>>I have a strange problem that I cannot seem to sort out.

>>>I have some code (see below) that works in other modules that I have
>>>written.  It has worked like a champ so far.  In the latest module,
>>>MediaRepCount = 28 (there are 28 items that I am checkboxing)

>>>The last five checkboxes in are active and I can check them.  The
>>>23 checboxes before it cannot be checked with a mouse.  I can
>>>tab over to them and check them with a spacebar but I cannot
>>>get focus on it from a mouse.

>>>Weird.  Any ideas why this behavior is happening?

>>>JK

>>>-------------------------------------------
>>><DIV id=Customstuff STYLE="position:absolute; top:365px; left:0px;
>>>width:580px; visibility:hidden">
>>><strong><font color="maroon" size="3">Custom Report
>>>Settings</font></strong>
>>><TABLE ALIGN=left BORDER=0>

>>><%
>>> TRCount = 1
>>> for II = 1 to MediaRepCount
>>> if TRCount = 1 then
>>> Response.Write "<TR>"
>>> end if
>>> Response.Write "<td nowrap align=right><strong><font
>>>color='mediumblue' size='2'>" & MediaRep(II) & ":
>>>&nbsp;</font></strong>"
>>> Response.Write "<input id=Rep" & II & " name=Rep" & II
>>>& " type='checkbox' ></font></TD>"
>>> if TRCount = 4 then
>>> Response.Write "</TR>"
>>> TRCount = 0
>>> end if
>>> TRCount = TRCount + 1
>>> next
>>> %>

>>></TABLE>
>>></DIV>



Sun, 16 Mar 2003 03:00:00 GMT  
 Problem with Checkboxes in a DIV

I have encountered this problem as well. The heart of the matter is the DIV
tag. When using Javascript to manipulate the location of  Input boxes inside
a DIV tag, the Input box must be at least 35 pixels away from any other
Input box or the mouse can not get focus on the box.

I have no idea why...but the problem does exist.


Quote:
> I have a strange problem that I cannot seem to sort out.

> I have some code (see below) that works in other modules that I have
> written.  It has worked like a champ so far.  In the latest module,
> MediaRepCount = 28 (there are 28 items that I am checkboxing)

> The last five checkboxes in are active and I can check them.  The
> 23 checboxes before it cannot be checked with a mouse.  I can
> tab over to them and check them with a spacebar but I cannot
> get focus on it from a mouse.

> Weird.  Any ideas why this behavior is happening?

> JK

> -------------------------------------------
> <DIV id=Customstuff STYLE="position:absolute; top:365px; left:0px;
> width:580px; visibility:hidden">
> <strong><font color="maroon" size="3">Custom Report
> Settings</font></strong>
> <TABLE ALIGN=left BORDER=0>

> <%
> TRCount = 1
> for II = 1 to MediaRepCount
> if TRCount = 1 then
> Response.Write "<TR>"
> end if
> Response.Write "<td nowrap align=right><strong><font
> color='mediumblue' size='2'>" & MediaRep(II) & ":
> &nbsp;</font></strong>"
> Response.Write "<input id=Rep" & II & " name=Rep" & II
> & " type='checkbox' ></font></TD>"
> if TRCount = 4 then
> Response.Write "</TR>"
> TRCount = 0
> end if
> TRCount = TRCount + 1
> next
> %>

> </TABLE>
> </DIV>



Mon, 17 Mar 2003 03:00:00 GMT  
 Problem with Checkboxes in a DIV
You are right!!  This is a 'weird' problem with DIV and the location
of checkboxes in relation to other controls.

I have three buttons that sit above the checkboxes.  When I moved the
boxes down or the further away from the checkboxes they were able
to obtain focus.  I had to move them over 100px in order for it to
work, so it could be the more checkboxes you have the more complicated
the problem gets.

Thanks for the suggestion, I now know how to fix it.

JK

On Thu, 28 Sep 2000 17:38:16 -0500, "Charlie Wilson"

Quote:

>I have encountered this problem as well. The heart of the matter is the DIV
>tag. When using Javascript to manipulate the location of  Input boxes inside
>a DIV tag, the Input box must be at least 35 pixels away from any other
>Input box or the mouse can not get focus on the box.

>I have no idea why...but the problem does exist.



>> I have a strange problem that I cannot seem to sort out.

>> I have some code (see below) that works in other modules that I have
>> written.  It has worked like a champ so far.  In the latest module,
>> MediaRepCount = 28 (there are 28 items that I am checkboxing)

>> The last five checkboxes in are active and I can check them.  The
>> 23 checboxes before it cannot be checked with a mouse.  I can
>> tab over to them and check them with a spacebar but I cannot
>> get focus on it from a mouse.

>> Weird.  Any ideas why this behavior is happening?

>> JK

>> -------------------------------------------
>> <DIV id=Customstuff STYLE="position:absolute; top:365px; left:0px;
>> width:580px; visibility:hidden">
>> <strong><font color="maroon" size="3">Custom Report
>> Settings</font></strong>
>> <TABLE ALIGN=left BORDER=0>

>> <%
>> TRCount = 1
>> for II = 1 to MediaRepCount
>> if TRCount = 1 then
>> Response.Write "<TR>"
>> end if
>> Response.Write "<td nowrap align=right><strong><font
>> color='mediumblue' size='2'>" & MediaRep(II) & ":
>> &nbsp;</font></strong>"
>> Response.Write "<input id=Rep" & II & " name=Rep" & II
>> & " type='checkbox' ></font></TD>"
>> if TRCount = 4 then
>> Response.Write "</TR>"
>> TRCount = 0
>> end if
>> TRCount = TRCount + 1
>> next
>> %>

>> </TABLE>
>> </DIV>



Tue, 18 Mar 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Problem W/ #Div/0 Errors

2. DIV Problem

3. checkbox collection vs single checkbox

4. checkbox arrays vs single checkboxes

5. Sending a checkbox response from OL form to Word checkbox

6. checkbox collection vs single checkbox

7. minimize div problem

8. Netscape 6 problem when trying to make visible/hidden complex DIV objects

9. animating a DIV block problem

10. DIV visibility problem

11. problem with div

12. DIV problems

 

 
Powered by phpBB® Forum Software