Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internet Explorer Problem with Form & Div as label

Status
Not open for further replies.

icecuber

Programmer
May 13, 2005
25
IT
I have a jsp generated page, i have a single form divided (with div element) in 6 "layer", it start with fist layer selected and the others invisible, clicking on the selecter i have a javascript that change the element classname.

my page is structured as following:

title
hr
button
hr
table as layer selecter
form

in firefox 1.04 it's all right but in ie6 a lot of input seems writable... but in fact they don't get even focus!!!
even the check box aren't working at all, it's strange that the select always work, i have a lot of the text area but are working only on the last 2 layer.

i try to validate the page with TIDY i have a lot of warning for tr and td not correctly closed but no errors... maybe is this the problem?
i try the page with out css linked the layer don't work but the input are working.
if is useful i try to post the code... but it's over than 5000 rows!!!!

Thanks in advice
 

I'd suggest you get your pages validating correctly before trying to fix any other errors.

Hope this helps,
Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 

Look at setting a z-index on all the layers... and set the z-index of the one you are wanting to edit to be greater than the others at the same time you make the layer visible (and hide the other).

Good idea to get the page validated first too... not closing those table tags is just asking for trouble :)

Cheers,
Jeff

 
I fix the problem!!!
i reduce the validation warning on tr & td and the page work on explorer now.

i still have warning but about & in javascript function and similar
 
You can get rid of the warnings in javascript by putting all javascript in commented blocks:
Code:
<script type="text/javascript">
<!--
...your code here...
//-->
</script>
You can also use &amp; instead of just the & -- this is true even for URLs:
Code:
location.href='myPage.htm?abc=xy&amp;def=yz';
The above line is equivalent to the following:
Code:
location.href='myPage.htm?abc=xy&def=yz';
Hope this is of use to you!

Jeff
 
i try to put all javascript in commented blocks but i get this warning

Code:
line 663 column 17 - Warning: <script> isn't allowed in <tr> elements

and this is the code:

Code:
                <tr>
                
                    
                    <td class="testo">
                        Verifica Iscrizione CGIL
                    </td>
                    <td>

                        <input
                        class=""
                        maxlength="9999"
                        size="18"
                        type=text
                        value="-"
                        name="dataUltimaVerificaIscrizioneCGIL" disabled style="background-color: #DCDCDC;">
                    </td>
                    
                    <script type="text/javascript">
                        <!--
                        var dataInizialedataUltimaVerificaIscrizioneCGIL = new Date(2005,4,13,14,22,0,0);
                        var dataFinaledataUltimaVerificaIscrizioneCGIL = new Date(2005,4,13,0,0,0,0);
                        
                        //Inserisco data Iniziale SENZA ora
                        //alert("Sto per riempire le form visibile dela data formato SENZA ora");
                        clearformatoStandard();
                        document.Salva.dataUltimaVerificaIscrizioneCGIL.value=dateStd(dataInizialedataUltimaVerificaIscrizioneCGIL);
                        
                        //-->
                    </script>
                    
                    
                    
                    
                
                    
                    <td class="testo">
                        Iscritto Mailing List
                    </td>
                    <td>
                        <input
                        class=""
                        type="checkbox"   name="iscrittoMailingList"
                        disabled style="background-color: #DCDCDC;">
                    </td>

                    
                    
                    </tr>

This is a jsp - generated html for me it's a lot difficult to put (correctly) all javascript function in head section
i don't try the &amp suggest.. but i'll do!!
thanks a lot!!!
 
Try moving the script to after the closing table tag.

Dan

[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top