Development [Web] [Graphics] [Web Code]
Web Links to some great Web Development help sites
|
Complete Resource Sites
HTML Specific Sites Java/CGI/DHTML Sites |
Graphics Graphic tutorial and help sites
|
Tutorial Sites
Visit the links section for some of my favorite graphics sites. |
Web Code Some usefull code examples
1. Making a link open in a new optionless window The following code takes a regular text link, and opens whatever source in a new window of defined size and parameters. Simply place it anywhere within the <body></body> tags where you want your link. You can turn on the different toolbars and display options for the window by changing the values to yes. You can also change the size of the window by entering a different width and height.
Similar to the link window, this code opens a popup window as soon as your page loads. This works great for featuring items on your website or advertising something. To use this code, you must place the first block of code somewhere within your <head></head>. As in #1, you can turn on the different toolbars by changing the 0 values to 1 and setting the height and width. Do not edit anything else.
Then, you must place the second part within the actual <body> tag as shown below.
3. Display today's date/time (PHP Required) To display the day's current date/time you only need to enter 1 simple line of code. However, when you use this line of code you need to do 1 of the following:
Now to add the date, you simply need to add <?php print date("var1 var2 var3", time()); ?> where the vars are actually letter codes tell the browser how to display your date. Below is a reference table for the codes you would commonly use. Be careful though, as the codes are CASE SENSITIVE.
For example,
Would display: 4. Display special characters or code on a page As you probably have noticed by now, I've been showing you the html or script code for whatever directly on this page. You might be asking yourself, how in the world can I get my code to actually display a tag instead of using it. Well, the answer lies within special codes. HTML has various codes uses to display certain characters, such as the copyright symbol (©) and the double alligator brackets («). When your browser interprets your code, it looks for the tags that define the page. Therefore if it sees something within a set of <>, then it will not display. So, to make the browser display the 2 brackets, you need to use the special code to display each of them. That way, the browser will see that and display it on screen rather then see it as a tag. Here is a chart of some of the most commonly used special characters:
If you have any questions or have problems getting these things to work, feel free to email kris@destral.net. |