File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes tracking url in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "tracking url in jsp" Watch "tracking url in jsp" New topic
Author

tracking url in jsp

Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Hi
i have a small problem with jsp's in my application..
in my jsp iam using one link to call one site..
when we click the link the site is populating on another tab..
but i need to popolate that page in the same page instead of opening in
different tab..
can anyone please help me..

Thanks in advance...
--Naresh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
Does the link have a target attribute? That would cause it to open in another tab or window.


Ping & DNS - my free Android networking tools app
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Originally posted by Ulf Dittmer:
Does the link have a target attribute? That would cause it to open in another tab or window.


It doesn't have any attribute and it is opening in a new tab not window..
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Can you post the code for that link?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Here iam elaborating this one...
if i click the link it is going to call that website in the current page
here the code is like
<a href="javascriptpenURL('www.snowcaponline.net/admin','{d1e02aaa-7ef4-4911-906c-adf62eceb5af}','Alerts','0');" class="body">Alerts</a>

In that website's page iam going to click one more link(this is not our application link,website's link), now what's happening is if i click this one it is going to open in new tab, but i need to control in this rendering..
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

This isn't a typical anchor tag.
It's calling a Javascript function to open the page.

I'm going to move this to our HTML/Javascript forum because the solution to this issue isn't going to involve JSP.
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
k can you please let me know the solution ASAP...
Thanks in advance...
--Naresh
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What is JavaScript function openURL?

Eric
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
The openURL() function render that website into current page...
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Hmmm...you are calling a function (openURL) that does not do what you need to do. The "solution" seems pretty obvious...you need to either change the openURL function or write/use one that does what you want. Can you post the code to that function?

- Brent
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Originally posted by Naresh Talluri:
The openURL() function render that website into current page...


I meant show us the code....

Your answer is...do not use window.open

Eric
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Iam sorry
here iam not able to send the code ....
it is showing like some html errors, can you please help me out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tracking url in jsp