473,320 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Using Hyperlinks to Open a programmed browser page

Hey guys,

I've been poking through w3schools using their online code tryout pages. I started having fun manipulating browser pages in new windows. I figured out how to open a new window with a button.

Surely you can do the same with a hyperlink however i'm finding this very difficult. Can anyone help? Thank you.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function open_win()
  5. {
  6. window.open("http://www.w3schools.com","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=400, height=400")
  7. }
  8. </script>
  9. </head>
  10.  
  11. <body>
  12. <form>
  13. <input type="button", "_blank", value="Open Window" onclick="open_win()">
  14.  
  15. <a href", "_blank", value="Open Window" onclick="open_win()">
  16. </form>
  17. </body>
  18.  
  19. </html>
Jul 22 '07 #1
4 1337
pbmods
5,821 Expert 4TB
Heya, Jonnie.

You're looking for the `target` property:

Expand|Select|Wrap|Line Numbers
  1. <a href="..." target="_blank">...</a>
  2.  
Jul 22 '07 #2
Well, I tried this and it worked perfectly, Thanks :D
Jul 23 '07 #3
Plater
7,872 Expert 4TB
From what I've been reading, the "target" attribute has been retired and is nolonger a valid attribute. Or at least "_blank" is no longer valid.
Expand|Select|Wrap|Line Numbers
  1. <a href="..." target="_blank">...</a>
  2.  
Jul 23 '07 #4
pbmods
5,821 Expert 4TB
Heya, Plater.

From what I've been reading, the "target" attribute has been retired and is nolonger a valid attribute. Or at least "_blank" is no longer valid.
You are correct, and I believe that the strict HTML and XHTML validators will even complain at you if you try to validate the target attribute.

But until developers learn that opening a new window is a *behavior* and not *structural*, target will stay for awhile.
Jul 24 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: scoop_77 | last post by:
I'm looking for some software that would allow me to point to a folder in Windows Explorer, and have it output an html file with hyperlinks to all of the files within that folder and all of the...
3
by: JP SIngh | last post by:
Hi All I have users who upload files using my application using ASPUPLOAD component. My code uploads the file to a network location and once the upload is finish I display the hyperlink using...
5
by: Mr Newbie | last post by:
OK, I have a fairly simple setup where I have an Index of records which are displayed using a datagrid on a page. When you click the link associated with a Row (ArticleID) , this ID is passed to a...
5
by: girishmat | last post by:
how to embed or open microsoft word file in a page using php script
5
by: Tom | last post by:
Hi, I am working on a project where I want to simultaneously launch a link using my own registered protocol and simultaneously send an AJAX request to the server. Now the way I have come up...
3
by: fiefie.niles | last post by:
I would like to save a web page to a file and have the hyperlinks work when I bring the file back up. If the web page has a hyperlink like the following <a href="OurWeb/News/abcFile.htm">, after...
6
by: bushi | last post by:
hi everyone! i have diplayed my hyperlinks in a iframe.when i redirect to next page.the next page also open in the same frame,but i want to open a new browser window,when i click on the...
10
by: S_K | last post by:
Hi, I have a directory full of a number of .PDF files that I need to print. Is there any simple way to do this? Using PdfReader purhaps? Thanks in advance. Steve
92
by: Erwin Moller | last post by:
Hi group, I encoutered page validation error, but I don't know a way around. The page has the following doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.