A Digital Age Deserves A Digital Leader

HTML help

Postby ~Spider~ » Thu Jun 10, 2004 4:31 am

Here is a good site with tutorials. I have used it quite a bit.

http://www.w3schools.com/
PRO Level 10
Posts: 442
Joined: Thu Feb 26, 2004 6:33 am
Location: USA

Postby Weaver » Thu Jun 10, 2004 2:40 pm

shougan wrote:
Code: Select all
<a href=""
target="_blank"> </a>


The only problem with using the target attribute is that it is not valid in the "Strict" document type HTML/XHTML.

So if you are interested in writing pages that conform to HTML 4.01 Strict, XHTML 1.0 Strict or XHTML 1.1 you will not [legally] be able to use the target attribute.

Since I try to use the Strict DTD's whenever I can I have found a few methods to get around the target attribute. One of them is extremely complex and I haven't used. It is only applicable to XHTML and involves extending the DTD to include a target attribute. It is a lot of work, but would technically be the "proper" way to achieve target like functionality (without JavaScript).

The second method is the easier method and involves a little bit of JavaScript. If the browser does not support JavaScript, then the link will open in the same window, so nothing is actually lost on old clients.

Lets say we want to create a link to slashdot.org . We want it to open in a new window. Lastly, we want it to conform to the Strict DTD's. The following code would accomplish our task.

Code: Select all
<a href="http://www.slashdot.org" onclick="window.open(this.href); return false;">slashdot.org</a>


There you have it.

-Weaver
Public Keys

The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.
-- FORTRAN manual for Xerox Computers
PROfessional Member
User avatar
Posts: 1967
Joined: Wed Jun 19, 2002 12:05 am
Location: /home/weaver/

Postby imnuts » Thu Jun 10, 2004 3:00 pm

thank you weaver
Image
PRO SUPREME
User avatar
Posts: 7457
Joined: Wed Mar 24, 2004 5:19 am
Location: Boothwyn, Pennsylvania
Real Name: Mark

Re: HTML help

Postby Neox » Thu Jun 10, 2004 7:26 pm

imnuts wrote:I want to know if there is an html command that will open links in a new window when they are clicked. i think there is i just don't know what it is. if it can't be done with html, then what would i need to use to get the new window upon being clicked.


It's quite simple, the code for a simple URL is:

Code: Select all
<a href="http://www.pro-networks.org">Open me in the same window!</a>


This takes the browser to www.pro-networks.org in the same window it is clicked in.

By adding the target="_blank" section to the hyperlink code will enabled it to open in a new window.

In case your still in doubt, the link to open www.pro-networks.org in a new window would be:

Code: Select all
<a target="_blank" href="http://www.pro-networks.org">Open me in a new window!</a>


Hope this helps,

Kind Regards,

Neox.
PRO New Member
Posts: 1
Joined: Thu Jun 10, 2004 4:12 pm
Location: UK

Postby shougan » Thu Jun 10, 2004 11:49 pm

LOL thnx for informing me Weaver...LOL Gues my websites need to be up to ur lvl..LOL thnx again man...
Do you want the latest news on Betas & Software, Security, or even Vista? Check out our <a href="http://www.pro-networks.org/forum/home_index.php" target="_blank" class="postlink">news areas</a> and be sure to <a href="http://www.pro-networks.org/main/newsletters.htm" target="_blank" class="postlink">subscribe to our PROneT newsletters!</a>
PRO Level 15
Posts: 1174
Joined: Tue Apr 27, 2004 2:12 am
Location: Western Hemisphere

Postby SamTranter » Sat Jun 12, 2004 1:55 pm

to proctect images, well it cant relley be done, there are codes that dis allow right clicking. but even then the images can still be aquired by goint to file>save as and that will save all links attached to that page, the only alternative that i have found is to put your image onto flash and make a swf, that way it connot be accuired
SamTranter

Postby jessee007 » Sat Jul 03, 2004 6:57 am

I dont understand why you wouldnt want anything copied or saved? Remember anything transmited,anything recieved. Its not fair to try to stop the main part of a computer. How did you get your personal image? well enough of the scolding. You could write it into your program with a time out.
PRO New Member
Posts: 8
Joined: Fri Jul 02, 2004 6:53 am
Location: humbolt county

Previous

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 5 guests

cron
cron