Jump to content

Javascripting help!!!


Hybrid
 Share

Recommended Posts

Hey guys,I was wondering about javascript! If I wanted to incorporate tables into my site would I add them in the script or would I add the scripts into the table! Also do many coders use the "document.write" to too actually write in their pages or they do not?Thank you for any help!

Link to comment
Share on other sites

If you give us an idea of what you are trying to achieve we can give you more accurate answers.Yes you can write tables to a page with javascript.Yes you can add scripts within or inline a table.I can't speak for many coders but i know some have had problems with document.write, where it has been writing to a new window and not the current one.

Link to comment
Share on other sites

If you give us an idea of what you are trying to achieve we can give you more accurate answers.Yes you can write tables to a page with javascript.Yes you can add scripts within or inline a table.I can't speak for many coders but i know some have had problems with document.write, where it has been writing to a new window and not the current one.

So "document.write" is not that popular from what you are saying. What I wanted to achieve with the tables is that I want to make a website that uses them. So that I can divide the page better, ex. I can make one for the banner at the top. Then one can be for a menu and so on, I have seen many website use them and I have heard they are popular to use nowadays!My question was if I could make tables in the javascript part example:
<script type="text/javascript">PLACE TABLE CODE IN HERE!!!</script>

Now would something like that be possible or would I have to make tables seperate from the javascript?

Link to comment
Share on other sites

So "document.write" is not that popular from what you are saying.
I have had no problems with it, i know other people prefer to use DOM
What I wanted to achieve with the tables is that I want to make a website that uses them. So that I can divide the page better, ex. I can make one for the banner at the top. Then one can be for a menu and so on, I have seen many website use them
Yes tables are still used but css is preferred for page layout these days, namely div's replace tables (you can use a combination of both though).
I have heard they are popular to use nowadays!
I would say the opposite, w3 recomends css as i said above and most people are converting their sites from tables to div's
Now would something like that be possible or would I have to make tables seperate from the javascript?
That would be possible.Can i ask why you want to write tables to your page with javascript? (remember people can turn it off)Hope this covers everything :)
Link to comment
Share on other sites

Actually now that you explained to me one thing I am thinking of not using tables lol! I alwasy wanted to know what DIV's were for!I remember that in te W3SCHOOLS tutorial you mentioned DIV in a table but never really explained them that well. I was also planning on using a css template!But I was wondering if you could mayeb explain to me how these DIV's work, are they like tables or something else?EDIT: Also I have never had any problems with Javascript either! Well so far so good I guess!EDIT 2: Sorry for editing twice but I wanted ot ask seeing as you mentioned DIV's. I noticed that some site incorpoarte the use of Tables with DIV's why is that and should you do that if you are using DIV?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...