PDA

View Full Version : javascript


alphonse
10-19-2004, 06:55 AM
some nice javascript to add in your site

cell bg changer

<HEAD>

<style>
.tditem {
font-size: 12px;
font-family: Verdana, Arial, Helvetica, sans-serif;
text-decoration: none;
color: gray;
}
</style>
</HEAD>

<BODY>

<center>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td onmouseover="bgColor='blue'" onClick="window.location='page1.html'" style="cursor:hand" onmouseout="bgColor='#FFFFFF'" bgcolor="#FFFFFF" width="100" align="center" valign="center"><b><font color="#D5D5D5">
<a href="page1.html" class="tditem">
Item 1</a></font></b></td>

<td width="1" align="center">|</td>

<td onmouseover="bgColor='blue'" onClick="window.location='page2.html'" style="cursor:hand" onmouseout="bgColor='#FFFFFF'" bgcolor="#FFFFFF" width="100" align="center" valign="center"><b><font color="#D5D5D5">
<a href="page2.html" class="tditem">
Item 2</a></font></b></td>

<td width="1" align="center">|</td>

<td onmouseover="bgColor='blue'" onClick="window.location='page3.html'" style="cursor:hand" onmouseout="bgColor='#FFFFFF'" bgcolor="#FFFFFF" width="100" align="center" valign="center"><b><font color="#D5D5D5">
<a href="page3.html" class="tditem">
Item 3</a></font></b></td>

</tr>
</table>
</center>

wildfire
10-19-2004, 05:38 PM
Mouseovers are always fun, are they not?

oblivious
10-19-2004, 07:19 PM
Javascript is good... it helps alot for the novice programmer...

wrong section though... topic moved :D

mahangee
10-19-2004, 07:43 PM
Whats with the double posting and quoting? Lol mouseovers are weird. But they are cool for changing elements.

Terminator
10-19-2004, 07:58 PM
Where are moderators?

Well i am not that strict on double posts because many forum users tend to do this. Its sometimes unconscious. We will warn if its continued. This is coz people automatically go for 'post reply' than to 'edit'.

But alphonse please explain your post, like whats it for and evrything. Many are not experts to infer from code what it does.

mahangee
10-19-2004, 08:53 PM
It basically makes a table cell change background colour when the mouse is put over. But alphonse wouldnt it be much easier to do this

<style type='text/css'>
a.background:hover {
color: ghostwhite;
background:red
}
</style>

That changes the font COLOR and the BACKGROUND color when the mouse is HOVERed over the hyperlink in a nice simple CSS way rather than all that JScript.

Much easier way I think.

oblivious
10-20-2004, 02:04 AM
it's not a double post... there is a director in the Website Promotion thread cause I moved the topic... that's why it looks like there are 2 topics :D

mahangee
10-20-2004, 04:45 PM
Double post, not double topics, Lol:). EG he made a little post at the start of the thread and then posted nearly straight after with another post. With the actually content in.

688206002
10-23-2004, 06:04 AM
or we could all just stop using tables for layout... compliance issues... speaking of which, does anyone actually close their empty elements? (ie.
)... i'm too lazy to but i know i should...

mahangee
10-23-2004, 08:36 AM
I do I always use and
etc

alphonse
11-01-2004, 08:59 AM
html does not request closing tags as you mentioned above.

mahangee
11-01-2004, 03:05 PM
True but if you are coding to HTML 4.01 and XHTML 1.0 Standards it does.

alphonse
11-02-2004, 01:18 AM
oh...thanks for letting me know...

mck9235
11-02-2004, 01:49 AM
What does it matter if you dont do it in the "stadards"im asking? Does your page not work or something? You guys are probaly laughing at me for that wuestion.

mahangee
11-02-2004, 07:45 PM
No it is a perfectly reasonible question and to be perfectly honest they isnt a very good reason but a few weaker reasons.

REASONS It is Web Standard set by W3C
If you write "bad" HTML your browser and system might show it the way you want but others might show it different.
<span style='font-size:8pt;line-height:100%'>(This information was obtained from http://www.w3schools.com/xhtml/xhtml_intro.asp
please look there for more info.)</span>

Soldier00
11-04-2004, 11:42 PM
iam gonna use it ull see ..

DesiMD
11-06-2004, 03:48 PM
Originally posted by wildfire@Oct 19 2004, 01:38 PM
Mouseovers are always fun, are they not?
1992

no not always..sometimes they make the pc slow..thats when i hate them man...but u can say that this ones nice

mahangee
11-06-2004, 03:50 PM
They make your PC slow? I think your PC has issues.

DesiMD
11-06-2004, 03:52 PM
Originally posted by mahangee@Nov 6 2004, 12:50 PM
They make your PC slow? I think your PC has issues.
6260

lol....no.....its P4....its perfect....but they make the pc slow means...like when you are switcing over so many windows......they can make ur pc slow...and on p2 they dont work at all...very slow

alphonse
11-08-2004, 11:27 AM
it can work fast if you just don't load everything at around the same time

flames
11-11-2004, 11:10 PM
java is quite complicated to me, are there any programs that can help me make java script easier? (example, ms frontpage for html)

reid315
11-11-2004, 11:39 PM
heh Front page I doubt will support anything. Just HTML and CSS but i think that's it. ASP if you hav IIS or PWS. BUt I'd rather much use dreamweaver. more support, but i'm not sure about java. Dreamweaver is my best bet.

flames
11-12-2004, 11:49 PM
i have macromedia dreamweaver mx 2004 too, but i think it takes too long to load on my computer.
seriously, does dreamweaver make javascript?

reid315
11-13-2004, 12:51 AM
2004 does. I've tried. and It supports Java, too.