![]() |
|
|||||||
| Register | FAQ | Members List | Arcade | Dev Directory | HB Bank | Calendar | Search | Today's Posts | Mark Forums Read |
| JavaScript Programming Discuss javascript coding. |
| Have A Look At Some Of Our Webmaster Related Sponsors! | |||||
![]() Script Directory |
![]() Advertise Here |
![]() Market Leverage |
![]() Free Templates |
![]() 3D Guide-characters |
![]() Advertise Here |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Member
|
I know that you can write using JavaScript but what is the difference between JavaScript and HTML, are those language but they are different do their uses differ JavaScript function will be executed. I know only one possibility when I write "on load" in body, but it is too early; I want it to be made later. I make table with some text - that is text1. Further I print some text with pup, but user input was made with error, so I want to change text1with JavaScript, because I can not print pup firstly and then that table.
|
|
|
|
|
#2 (permalink) |
|
Member
|
by pup do you mean php?
HTML and JS are completely different. HTML is just a markup language, changing the way things look. javascript is an actual programming language, and you can do sums and stuff with it. to change the text of a table, :document.getElementById(); :)
__________________
want to unleash some anger? try http://erant.co.uk ! need some web work done? try http://munkydesigns.co.uk , we do flash/XHTML/CSS/PHP/MYSQL/AJAX for any budget! cheshire home interiors |
|
|
|
|
#3 (permalink) |
|
New Hunter
Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 88
iTrader: 0 / 0%
Hunter Bux: 5.00
![]() ![]() |
I get what you mean and Albino is correct. Javascript is for improving your site. You can make pop ups/sums/functions/tools etc. and later use it to go onto Ajax and dhtml.
If you want something to load later in the page then it's rather simple: Code:
<script type="text/javascript">
function timer()
{
var t=setTimeout("alert('Your alert box')",10000);
}
</script>
</head>
<body onLoad="timer()">
An alert box will appear in 10 seconds.
You can change the time by editting the 10000 part. This is the timing of the event in milliseconds...I think.
</body>
</html>
|
|
|
|
|
#4 (permalink) |
|
Senior Moderator
|
Or. For example if you want the page to load before a Script is executed, Then you could put the (for example: alert box) after everything has loaded. In other words put it at the end of the code. It's much simpler then doing an onLoad timer for those who don't know it. + no Coding needed
Last edited by SpOrTsDuDe.Reese; 01-03-2008 at 10:07 AM. Reason: Added something |
|
|
|
|
#6 (permalink) |
|
New Hunter
|
There are three basic tools that make up a Web page: HTML (document structure), Cascading Style Sheets (document style) and JavaScript/ECMA Script/JScript (document behavior).
Your HTML tags should describe the data in your Web page. Use appropriate class and id attributes to provide ways to style your page, and interact with it using JavaScript. Never include visual markup. Your Cascading Style Sheets (CSS) contain all the style information. The JavaScript contains additional behaviors that normal HTML cannot create. Your page should always be usable with just HTML and CSS. JavaScript should never be required to make the page usable. If it is, then your JavaScript needs to be rewritten. JavaScript adds functionality to an already functional page. It never creates basic functionality. As mentioned earlier, JavaScript is a programming language interpreted by the browser. Through the use of the standard Document Object Model, the browser parses the HTML document to create a tree like structure of nodes that represents the HTML document. JavaScript can interact with this tree structure, which is often called the DOM. Browsers also parse the CSS and alter the DOM accordingly. JavaScript can also access the styles associated with the DOM, and alter the styles. Think of lunch. Good design, in all its abstract goodness, is like bread. It holds your sandwich together. HTML is like peanut butter and provides a meaningful base to the whole thing. CSS is like jelly, because it adds some pizazz to the sandwich. Lastly, JavaScript is like a glass of milk. The sandwich is still plenty edible without milk, but sure as heck goes down easier with it. |
|
|
|
|
#7 (permalink) | |
|
New Hunter
|
Quote:
go to w3schools.com & study about em bye
__________________
free web based proxy http://www.fxan.net Computer Tips n Tricks Forum http://www.bitslinker.com |
|
|
|
|
|
#9 (permalink) |
|
New Hunter
|
OK!!!!! It Does work, thank you for your kindless.
__________________________________________________ _______________________________ Angelina Jolie Johnny Depp Al Pacino Brad Pitt site Robert De Niro |
|
|
|
|
#10 (permalink) |
|
Senior Moderator
|
Look at the last time this had a posted comment. Don't post here. Thread locked.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+ Code:
<style type="text/css"> u { text-decoration: none; } </style>
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|