Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to launch a new browser in a new tab when a user clicks on a link ?

Posted on 2004-11-22
7
Medium Priority
?
214 Views
Last Modified: 2010-04-09
On linux macbine - I am using Mozilla browser .

Currently when the user clicks on the link  it takes the user to that link ie ' preview.cgi'

file - GetProd.jsp

 <br> <a href="http://www/cgi-bin/db/preview.cgi?previewPath=/<%=sImgPathX%>&serverName=<%=serverName%>&projectName=<%=projectName%>&dirPath=<%=dirPath%>" > linuxView </a>


what should I do so that when the user clicks on 'preview.cgi'  it opens this link on another tab and
leaves the user still on the GetProd.jsp page.


eagerly awaiting suggestions...

Thanks
0
Comment
Question by:sdesar
  • 4
  • 3
7 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 12649983
The user controls whether a link opens in a new tab.  

If you want to keep them or your page then use a popup to open a new window; and risk making them angree for usin g a popup.

Cd&
0
 

Author Comment

by:sdesar
ID: 12650023
please provide some code on how to do a popup in the above link ?

thanks for the quick response
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 12650111
Just add a target:

href="http://www/cgi-bin/db/preview.cgi?previewPath=/<%=sImgPathX%>&serverName=<%=serverName%>&projectName=<%=projectName%>&dirPath=<%=dirPath%>"
target="_blank" > linuxView </a>

That will open it in a new window.

Cd&
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:sdesar
ID: 12650311
Thanks
adding target = "_blank" opens the preview.cgi in another window.

But this preview.cgi is the one that calls the pop-up application.

So here's question .. how can I open the pop-up application ( that is called in the preview.cgi) and NOT have it display the preview.cgi in another web page ( since this just opens a blank web page).

eagerly awaiting a reponse.

Thanks
0
 

Author Comment

by:sdesar
ID: 12650349
Thanks
adding target = "_blank" opens the preview.cgi in another window.

But this preview.cgi is the one that calls the pop-up application.

So here's question .. how can I open the pop-up application called largeView that is called in the preview.cgi and NOT have it display the preview.cgi in another web page ( since this just opens a blank web page).


Or once the
preview.cgi runs the popup largeView .. how can I close or hide  the preview.cgi web page - that is a blank web page


eagerly awaiting a reponse.

Thanks

0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 200 total points
ID: 12654840
In preview.cgi put this in the head:

<script type="text/javascript">
window.open('largeview.htm');
self.close();
</script>

Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 12809248
Glad I could help. Thanks for the A. :^)

Cd&
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question