abs0lut Posted July 27, 2008 Share Posted July 27, 2008 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <table> <tr> <td></td><td></td> <div id="myDiv" style="display: none"> <input type="text" /><input type="text" /><input type="text" /> </div></tr></table> <a href="#" onclick="if(document.getElementById('myDiv').style.display=='block'){ document.getElementById('myDiv').style.display='hidden'; } else{ document.getElementById('myDiv').style.display='block';}">Show</a> </body> </html> The 3 input text will show if I click the Show link. I need to table the 3 input text. please help me... Quote Link to comment https://forums.phpfreaks.com/topic/116891-td-under-div/ Share on other sites More sharing options...
adam84 Posted July 28, 2008 Share Posted July 28, 2008 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <SCRIPT> function divToggle(){ if(document.getElementById('myDiv').style.display == ''){ document.getElementById('myDiv').style.display = 'none'; document.getElementById('show').innerHTML = '<a href="javascript:void(0);" onclick=divToggle();>Show</a>'; }else{ document.getElementById('myDiv').style.display = ''; document.getElementById('show').innerHTML = '<a href="javascript:void(0);" onclick=divToggle();>Hide</a>'; } } </SCRIPT> </head> <body> <table> <tr> <td></td> <td> <div id="myDiv" style="display:none"><input type="text" /><input type="text" /><input type="text" /></div> </td> </tr> </table> <DIV NAME="show" ID="show"><a href="javascript:void(0);" onclick=divToggle();>Show</a></DIV> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/116891-td-under-div/#findComment-601894 Share on other sites More sharing options...
abs0lut Posted July 28, 2008 Author Share Posted July 28, 2008 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <table> <tr> <td>text1</td><td>text2</td><td>text3</td> <div id="myDiv" style="display: none"> <input type="text" /><input type="text" /><input type="text" /> </div></tr></table> <a href="#" onclick="if(document.getElementById('myDiv').style.display=='block'){ document.getElementById('myDiv').style.display='hidden'; } else{ document.getElementById('myDiv').style.display='block';}">Show</a> </body> </html> I forgot text1, text2 and text3 before the div.. I need to structure the three text fields with a table.. When they click the show button it will show the input fields only.. Quote Link to comment https://forums.phpfreaks.com/topic/116891-td-under-div/#findComment-602119 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.