Need Help

View Poll Results: is that simple code snippet
YES 1 100.00%
NO 0 0%
YES,but there's uncomplite 0 0%
Voters: 1. You may not vote on this poll

Reply

Join Date: Dec 2008
Posts: 17
Reputation: uringinteristi is an unknown quantity at this point 
Solved Threads: 0
uringinteristi's Avatar
uringinteristi uringinteristi is offline Offline
Newbie Poster

Need Help

 
0
  #1
Dec 30th, 2008
Newbie need help to create a simple table with javascript. Any body who can, please answer.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 276
Reputation: kanaku is on a distinguished road 
Solved Threads: 15
kanaku's Avatar
kanaku kanaku is offline Offline
Posting Whiz in Training

Re: Need Help

 
0
  #2
Dec 30th, 2008
Perhaps give more details [circumstances] of what and why you need to do it? (because it's different if you're using a blogging platform, or if hand-coding everything)

Why do you need to use javascript to make a table..?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 954
Reputation: essential will become famous soon enough essential will become famous soon enough 
Solved Threads: 131
Featured Poster
essential's Avatar
essential essential is offline Offline
Posting Shark

Re: Need Help

 
0
  #3
Dec 30th, 2008
Yeah i agree to kanaku's point. But since we all have it here. I'l throw a simple demo regarding this issue.
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  5. <meta http-equiv="Content-Script-Type" content="text/javascript">
  6. <title>Creatingt Simple table Using JavaScript</title>
  7.  
  8. <script type="text/javascript">
  9. <!--
  10. function tableSamp() {
  11.   var body = document.body;
  12.   var table = document.createElement('table');
  13. for ( var x = 0; x < 2; x++ ) {
  14.   var tr = document.createElement('tr');
  15. for ( var i = 0; i < 10; i++ ) {
  16.   var txt = document.createTextNode('Row ' + (x+1) + ' Column ' + (i+1));
  17.   var td = document.createElement('td');
  18.   td.appendChild(txt);
  19. tr.appendChild(td);
  20. table.appendChild(tr);
  21. body.appendChild(table);
  22.   var cols = document.getElementsByTagName('td');
  23. for ( y = 0; y < cols.length; y++) {
  24. eval('cols[' + y + '].style.backgroundColor="rgb(' + (y*5) + '%,' + (y*12) + '%,' + ((y+10)*8) + '%)";');
  25.   }
  26.   }
  27.   }
  28. }
  29. window.onload = tableSamp;
  30. //-->
  31. </script>
  32. <style type="text/css">
  33. <!--
  34. html { min-width: 1000px; }
  35. table { border-collapse: collapse; width: 100%; text-align: center; margin: 0 auto; }
  36. tr { line-height: 160%; }
  37. td { border: thin dashed #f5f5f5; padding: 0.3em 0 0.3em 0; color: #000; }
  38. -->
  39. </style>
  40. </head>
  41. <body>
  42.  
  43. </body>
  44. </html>
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 17
Reputation: uringinteristi is an unknown quantity at this point 
Solved Threads: 0
uringinteristi's Avatar
uringinteristi uringinteristi is offline Offline
Newbie Poster

Re: Need Help

 
0
  #4
Jan 4th, 2009
Thank you for all your atension with my Thread Thankyou so much. Actually I have project to make moving text in tagcloud. So first thing I must create a simple table and then create moving text .Would every body can help?
UrinG
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 276
Reputation: kanaku is on a distinguished road 
Solved Threads: 15
kanaku's Avatar
kanaku kanaku is offline Offline
Posting Whiz in Training

Re: Need Help

 
0
  #5
Jan 8th, 2009
Eh. Don't use tables for the tag-cloud. :p it's called a tag-cloud because of the 'random'-ness of the text. Putting it in a table will create an ordered, block-structure. Try this code in your html body: <p><span style="font-size: 11px">Thing 1</span> <span style="font-size: 20px">Thing 2</span> <span style="font-size: 16px">Thing 3</span> <span style="font-size: 14px">Thing 4</span> <span style="font-size: 12px">Thing 5</span> <span style="font-size: 28px">Thing 6</span> <span style="font-size: 19px">Thing 7</span> <span style="font-size: 15px">Thing 8</span></p> --- quickly taken from this tutorial

For your 'scrolling' effects. You can choose from a load of effects at dynamicdrive. But I suggest you choose one consistent effect only. (Or just use CSS to change the color)
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.

Visit this thread
if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC