Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] DHTML and table cells
- From: javascript@xxxxxxxxxx (Cutter Bl)
- Subject: [Javascript] DHTML and table cells
- Date: Tue, 25 Sep 2001 11:20:37 -0400
<html><div style='background-color:'><DIV> <P>Not sure if this will work, but have you tried writing to a SPAN tag instead of a DIV tag?</P></DIV> <DIV></DIV> <DIV>Cutter</DIV> <DIV></DIV> <DIV><A href="http://www.falcon-knives.com/">Falcon Knives</A></DIV> <DIV> </DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV>----Original Message Follows---- <DIV></DIV>From: Esther_Strom@xxxxxxxx <DIV></DIV>Reply-To: javascript@xxxxxxxxxx <DIV></DIV>To: javascript@xxxxxxxxxx <DIV></DIV>Subject: [Javascript] DHTML and table cells <DIV></DIV>Date: Tue, 25 Sep 2001 09:50:45 -0500 <DIV></DIV> <DIV></DIV>I have a bit of DHTML which writes different text to the screen based on <DIV></DIV>which radio button is chosen. It works to a point, in that it does write. <DIV></DIV>But is there any way to make the text write to a table cell? I have the <DIV></DIV>named divs set up inside a table cell, but it just writes outside the <DIV></DIV>table. While my Javascript is pretty good, my DHTML is not terribly <DIV></DIV>developed, so I'd appreciate any help. <DIV></DIV> <DIV></DIV>I've looked back at the list archives, but most examples I've seen have <DIV></DIV>involved absolutely positioned elements (for Netscape). Because my form is <DIV></DIV>dynamically generated by Domino, there's no way to absolutely position form <DIV></DIV>elements, which is why I want to write to a table cell. This needs to be <DIV></DIV>not only cross-browser (4.0+ only), but also cross-platform. <DIV></DIV> <DIV></DIV>Thanks in advance, <DIV></DIV> <DIV></DIV>Esther <DIV></DIV>(here's the code so far:) <DIV></DIV> <DIV></DIV> <SCRIPT language=JavaScript> //Define global variables </DIV> var totalLayersInLoop=4; </DIV> var layerNumShowing=0; </DIV> </DIV> function init(){ </DIV> if (navigator.appName == "Netscape") { </DIV> layerStyleRef="layer."; </DIV> layerRef="document.layers"; </DIV> styleSwitch=""; </DIV> }else{ </DIV> layerStyleRef="layer.style."; </DIV> layerRef="document.all"; </DIV> styleSwitch=".style"; </DIV> } } </DIV> </DIV> function showLayerNumber(number){ </DIV> var layerNumToShow=number; </DIV> hideLayer(eval('"layer' + layerNumShowing+'"')); </DIV> showLayer(eval('"layer' + layerNumToShow+'"')); </DIV> layerNumShowing=layerNumToShow; } </DIV> </DIV> </DIV> </DIV> function showLayer(layerName){ </DIV> eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility </DIV>="visible"'); } </DIV> </DIV> function hideLayer(layerName){ </DIV> eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility </DIV>="hidden"'); } </DIV> </DIV> </SCRIPT> <DIV></DIV> <DIV></DIV> <STYLE type=text/css> </DIV> #layer0 {POSITION: absolute; Z-INDEX: 10; VISIBILITY: visible;} </DIV> #layer1 {POSITION: absolute; Z-INDEX: 20; VISIBILITY: hidden; } </DIV> #layer2 {POSITION: absolute; Z-INDEX: 30; VISIBILITY: hidden; } </DIV> #layer3 {POSITION: absolute; Z-INDEX: 40; VISIBILITY: hidden; } </DIV> #loopControls {POSITION: absolute; Z-INDEX: 50; VISIBILITY: visible; } </DIV> </STYLE> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV><!--layers in the loop--> <DIV></DIV> <FORM> <DIV></DIV> <TABLE border=1> <DIV></DIV> <TBODY> <TR> <TD> <DIV></DIV><INPUT onclick="" type=radio value=Stock name=ArtType DIV <>="showLayerNumber(1)">Stock <DIV></DIV><INPUT onclick="" type=radio value="Commissioned Illustration" name=ArtType DIV <>="showLayerNumber(2)">Commissioned Illustration <DIV></DIV><INPUT onclick="" type=radio value="Assignment Photography" name=ArtType DIV <>="showLayerNumber(3)">Assignment Photography <DIV></DIV></TD></TR> <DIV></DIV> <DIV></DIV> <TR vAlign=top> <DIV></DIV> <TD vAlign=top> <DIV></DIV><A name=usage><B>Usage ID Info:</B></A> <DIV></DIV></TD></TR> <DIV></DIV> <DIV></DIV> <TR> <TD> <DIV></DIV><!--layer 0--> <DIV></DIV> <DIV id=layer0></DIV><FONT face=Arial color=red> </FONT> <DIV></DIV> <DIV></DIV> <DIV></DIV><!--layer 1--> <DIV></DIV> <DIV id=layer1></DIV><FONT face=Arial color=red>Fields 1, 2, 3</FONT> <DIV></DIV> <DIV></DIV> <DIV></DIV><!--layer 2--> <DIV></DIV> <DIV id=layer2></DIV><FONT face=Arial color=red>Fields 4, 5, 6</FONT> <DIV></DIV> <DIV></DIV> <DIV></DIV><!--layer 3--> <DIV></DIV> <DIV id=layer3></DIV><FONT face=Arial color=red>Fields 7, 8, 9</FONT> <DIV></DIV> <DIV></DIV> <DIV></DIV></TD></TR> <DIV></DIV></TBODY></TABLE> <DIV></DIV></FORM> <DIV></DIV> <DIV></DIV>_______________________________________________ <DIV></DIV>Javascript mailing list <DIV></DIV>Javascript@xxxxxxxxxx <DIV></DIV>http://www.LaTech.edu/mailman/listinfo/javascript <DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html>
- Prev by Date: [Javascript] Re: Hiermenus v4.1 - http://www.dhtmlab.com/
- Next by Date: [Javascript] DHTML and table cells
- Previous by thread: [Javascript] DHTML and table cells
- Next by thread: [Javascript] DHTML and table cells
- Index(es):