|
Post by ElseAndrew on Aug 10, 2009 17:09:02 GMT
<script type = 'text/javascript'> var f = { txt: function(x){ return document.createTextNode(x); }, font: function(x, y){ f = document.creatElement('font'); if(y.length > 0) for(n in y) f.setAttribute(y[n][0], y[n][1]); if(typeof x = 'string') f.innerHTML = x; else f.appendChild(x); return f; } };
document.body.appendChild(f.font(f.txt('Hai'), ["size, "1"], ["className", "text"])); </script>
*shrugs* I think that's it! <html> <head>
<script type = 'text/javascript'>
var f = { txt: function(x){ return document.createTextNode(x); }, font: function(x, y){ f = document.createElement('font'); if(y.length > 0) for(n in y) f.setAttribute(y[n][0], y[n][1]); if(typeof x == 'string') f.innerHTML = x; else f.appendChild(x); return f; } };
</script>
</head>
<body>
<script type = 'text/javascript'>
document.body.appendChild(f.font(f.txt('Hai'),[["size", "1"], ["className", "text"]]));
</script>
</body>
</html>
|
|
|
Post by Wrighty on Aug 10, 2009 17:41:14 GMT
YAR!
|
|
|
Post by JamesK on Aug 10, 2009 18:46:18 GMT
lol. You guys are pro's
|
|
|
Post by Wrighty on Aug 10, 2009 19:36:26 GMT
Mine was simple ... and marked used the debug console on FF I'm guessing to help him!
|
|
|
Post by ElseAndrew on Aug 10, 2009 20:00:32 GMT
Mine was simple ... and marked used the debug console on FF I'm guessing to help him! I checked to see where the errors where yes. But the Debug feature didn't tell me what was wrong just what line to look on!
|
|
|
Post by JamesK on Aug 10, 2009 20:19:26 GMT
lol. That's cheating
|
|
|
Post by ElseAndrew on Aug 10, 2009 22:11:26 GMT
lol. That's cheating Its's a built in tool, I dont see it as cheating I'll get another up tomorrow.
|
|
|
Post by Mark on Aug 10, 2009 23:28:46 GMT
See now i got no chance that Andrew and Michael are here
|
|
|
Post by JamesK on Aug 11, 2009 8:35:44 GMT
I was ok, until they arrived. . I might end up learning something here
|
|
|
Post by Wrighty on Aug 11, 2009 15:54:21 GMT
Hurry up ANDY!
|
|
|
Post by JamesK on Aug 11, 2009 16:31:14 GMT
He'll come. Don't worry Think of more to challege us please
|
|
|
Post by ElseAndrew on Aug 12, 2009 16:15:39 GMT
Ok, its rather buggy as I cba to finish it atm but here... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml[img]http://s266.photobucket.com/albums/ii278/wfus/MNP/Laughing.gif[/img]ang="en" lang="en"> <head><title>Show/Hide</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <style type="text/css"> .bordercolor { background-color: #000000; } .windowbg { background: #EFEFEF; } th, .head { background-color: blue; color: #FFFFFF; } #margins { margin-left: auto; margin-right: auto; text-align: center; } </style> <script type = 'text/javascript'> function hideRow(id) { var hide = document.getElementById(id); hide.style.display = 'none';
var nde = document.creattextNode(' Show ' +id); var link = document.createelement('a'); link.appendChild(node); link.href = 'javascript: showRow("' + id + '")'; var show = document.getElementById('show'); show.appendChild(link); } function showRow(iD) { var show = document.getElementById(id) show.style.display = ''; } </script> </head> <body> <div id="margins"> <table width = "90%" class="bordercolor" cellspacing="1"> <tr> <th class="head"> Hide / Show </th> <th class="head"> - / + </th> <th class="head"> Collapse / Show </th> <th class="head"> All </th> </tr> <tr id="row_1"> <td class="windowbg"> Apples </td> <td class="windowbg"> Pears </td> <td class="windowbg"> Pineapple </td> <td class="windowbg"> <a href="#" onclick="hideRow('row_1')">Hide Row<a /> </td> </tr> <tr id="row_2"> <td class="windowbg"> Pizza </td> <td class="windowbg"> Burger </td> <td class="windowbg"> Lollipops </td> <td class="windowbg"> <a href="#" onclick="hideRow('row_2')">Hide Row<a /> </td> </tr> <tr id="row_3"> <td class="windowbg"> 10lbs </td> <td class="windowbg"> 20lbs </td> <td class="windowbg"> 30lbs </td> <td class="windowbg"> <a href="#" onclick="hideRow('row_3')">Hide Row<a /> </td> </tr> <tr id="row_4"> <td class="windowbg"> 20 </td> <td class="windowbg"> 22 </td> <td class="windowbg"> 24 </td> <td class="windowbg"> <a href="#" onclick="hideRow(('row_4'))">Hide Row<a /> </td> </tr> <tr id="row_5"> <td class="windowbg"> 18 </td> <td class="windowbg"> 16 </td> <td class="windowbg"> 14 </td> <td class="windowbg"> <a href="#" onclick="hideRow('row_5')">Hide Row<a /> </td> </tr> </table> <div id="show"> <b>Show Rows<b /><br /> </div> </div> </body> </html>
|
|
|
Post by Wrighty on Aug 12, 2009 16:37:22 GMT
I can't be arsed with that one - I know how I'd code it though!
|
|
|
Post by ElseAndrew on Aug 12, 2009 17:32:56 GMT
I can't be arsed with that one - I know how I'd code it though! Loll xD Someone else c'mon.
|
|
|
Post by JamesK on Aug 12, 2009 18:30:20 GMT
I'll do it later. Too tired to atm
|
|