LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-16-2002, 09:40 PM   #1
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Rep: Reputation: 30
Javascript question?


Hello
I want to my webiste add some small Java Script code:
<table cellpadding=0 cellspacing=0 border=0 width=100% bordercolor="#CCFFFF" bgcolor="#0000FF">
<tr>
<td bgcolor="#CCFFFF"><font color="#000000" size="1" face="Arial" ><script language="JavaScript">
copyright=new Date();
update=copyright.getYear();
document.write("Copyright ©"+ update + "&nbsp;&nbsp;&nbsp;&nbsp;My Company&nbsp;&nbsp;&nbsp;&nbsp;All rightsReserved.");
</script>
</tr>
</table>

But I want to insert the code at the center of my page. I tried
<center> , <p align="center"> did not work? How can I insert the code at the center of the page?
Thanks
 
Old 08-16-2002, 09:52 PM   #2
gdrobson
Member
 
Registered: Jun 2002
Location: Ontario, Canada
Distribution: RH8.0
Posts: 65

Rep: Reputation: 15
Re: Javascript question?

Quote:
Originally posted by mikeshn
Hello
I want to my webiste add some small Java Script code:
<table cellpadding=0 cellspacing=0 border=0 width=100% bordercolor="#CCFFFF" bgcolor="#0000FF">
<tr>
<td bgcolor="#CCFFFF"><font color="#000000" size="1" face="Arial" ><script language="JavaScript">
copyright=new Date();
update=copyright.getYear();
document.write("Copyright ©"+ update + "&nbsp;&nbsp;&nbsp;&nbsp;My Company&nbsp;&nbsp;&nbsp;&nbsp;All rightsReserved.");
</script>
</tr>
</table>
you should also have a </TD> before your </tr> ....

you should look on the net for html tutorials... as i believe just your table can align it for u ....

<TR><TD ALIGN="CENTER"> ..... </TD></TR>

g'd luck
 
Old 08-22-2002, 03:44 PM   #3
no2nt
Member
 
Registered: Aug 2001
Location: South Carolina, USA
Distribution: Redhat 8.0/Custom
Posts: 96

Rep: Reputation: 16
Taking gdrobson's suggestion, here's the whole thing:

Code:
<html>
<body>
<table cellpadding=0 cellspacing=0 border=0 width=100% bordercolor="#CCFFFF" bgcolor="#0000FF">
<tr>
<td align=center bgcolor="#CCFFFF"><font color="#000000" size="1" face="Arial">
<script language="JavaScript">
copyright=new Date();
			    update=copyright.getYear();
			    document.write("Copyright (C) " + update + " Kyrus Corp. All Rights Reserved");
			</script>
</td>
</tr>
</table>
</body>
</html>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question python javascript. moby Programming 2 07-16-2004 10:55 AM
He, ANOTHER javascript question Squall Programming 3 01-27-2004 06:10 PM
Javascript question unimaginative Programming 3 01-26-2004 02:32 PM
JavaScript Question jacksmash Programming 8 12-23-2003 05:01 PM
JavaScript Question vance Programming 2 04-14-2002 12:30 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration