[Javascript] dynamic anchor tags, javascript, and JSP

Jay Wright jwright at once.com
Fri Feb 15 14:52:10 CST 2002


 
That makes sense to me.  If thats true, is there a way to force a refresh of
the opener location?  With the ultimate goal of refreshing to that anchor?
 

-----Original Message-----
From: Filipiak, Bob (Contractor) [mailto:filipiab at atsc.army.mil]
Sent: Friday, February 15, 2002 12:45 PM
To: 'javascript at LaTech.edu'
Subject: RE: [Javascript] dynamic anchor tags, javascript, and JSP




Just a thought but it may be that once you go to the Anchor tag the browser
doesn't reload because the "#...." incdicates a location on the current
page.

Bob Filipiak 
(Contractor) 

-----Original Message----- 
From: Jay Wright [ mailto:jwright at once.com <mailto:jwright at once.com> ] 
Sent: Friday, February 15, 2002 3:35 PM 
To: 'javascript at LaTech.edu' 
Subject: [Javascript] dynamic anchor tags, javascript, and JSP 



I have a web application written with jsp and a controller servlet.  I have 
implemented a pop up window, that when completes it's task, uses clientside 
java script to refresh it's opener and close itself. 

<body onload="opener.location.href='/some/page';self.close();"> 

This works flawlessly.  At least it seems to. 

However, when I add jsp code to this page, to refresh the opener and append 
a dyanmically generated ANCHOR tag, it works perfectly well the first time, 
but then fails to refresh the opener on subsequent tries. 

<% 
        String anchorString = (String) request.getAttribute("anchor"); 
        StringBuffer buf = new StringBuffer(""); 
        if (str!=null) buf.append("#").append(anchorString); 
        System.out.println(buf.toString()); 
%> 
<body 
onload="opener.location.href='/some/page<%=buf.toString()%>';self.close();">



I KNOW that anchorString is not null, because I log it and it logs 
correctly.  The first time this page is executed, it correctly refreshes the

opener (/some/page#anchor1), but the other attempts all fail to refresh, 
leaving "/some/page#" in the browser address window, but never refreshing 
the browser. 

Any ideas why this might be? 

Thanks, 
Jay 

_______________________________________________ 
Javascript mailing list 
Javascript at LaTech.edu 
https://lists.LaTech.edu/mailman/listinfo/javascript
<https://lists.LaTech.edu/mailman/listinfo/javascript>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020215/c5bc81b9/attachment.htm>


More information about the Javascript mailing list