'target' tag is not being honored with Firefox-3.0 when we try to dynamically load a page

I have 3 frames say SeacrhInput, SearchResult and ContentFrame in my webpage.
In SearchInput frame, when we enter the search word followed by clicking a search button, a request would be sent to a python server which shows a set of links in the SearchResult frame (just below the search input frame) with the 'target' as ContentFrame as shown below:

<a href="search_result1.html" target="ContentFrame" >Result1 </a>

When I click on the above link, a request is sent to the server and the server shows the page in a new tab as opposed to the existing
ContentFrame in the same page. This was being honored with Firefox-2.x but not with Firefox-3. However it's worth noticing that all
the search result links are getting opened in the same tab but not that we see per tab per page/link.

PS: In my case, Firefox-3.0 config option 'security.fileuri.strict_origin_policy' is set to false.
I changed the config with

pref("security.fileuri.strict_origin_policy", false);

Any insights would highly be appreciated.
delthetaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michel PlungjanIT ExpertCommented:
Do you send any headers from the server, like
header("location:...; window-target:something");

?
0
delthetaAuthor Commented:

> Do you send any headers from the server, like
> header("location:...; window-target:something");
>?
The only information I send is the location for the pages/links, where would those be picked up from. I provide the base and meta tags for headers. The first few lines of help_search_results.html (this is the page which is being shown in the SearchResult frame) looks like as below:
 
 
<html>
<head>
<base href="http://localhost:9009//<absolute path of the base folder for all the pages>" \>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="support/help.css" charset="ISO-8859-1" type="text/css">
</head>
etc.
.
.
.
Let me know If I need to provide anything else.
 
0
delthetaAuthor Commented:
And also I set the 'target' tag for the individual search results in the body of the 'help_search_results.html'  (this is the page which is being shown in the SearchResult frame) as below:
<a href="search_result1.html" target="ContentFrame" >Result1 </a>
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Michel PlungjanIT ExpertCommented:
I have tested the following in my 3.0.3 - it works.
Can you try on yours?

<frameset rows="*,600,*">
<frame src="javascript:'<a href=http://www.google.com/search?q=frames target=contentFrame>Search</a>'">
<frame name="contentFrame" src="about:blank">
<frame src="javascript:'footer'>
</frameset> 

Open in new window

0
delthetaAuthor Commented:

Thanks for putting your effort into this but am scared is this is what I was intended for. I actually was not clear  in my initial post.

In your code snippet, the two frames belongs to the same frameset while my requirement is that search result page and individual search links are in two frames; not belonging to the same frameset. I can achieve the intended via static pages but when I query the same from python server, it's not coming as expected and getting opened in a new tab as opposed to the frame targeted.  Please have a look at the attachement for the same.

In the snapshot attached:

I have the main page consisting of two frames : LeftFrame & ContentFrame
This LeftFrame contains two subframes as SeacrhInput, SearchResult.
My requirement is that when we give some search word in the SearchInput frame and click on search button, a request would be sent to the python server and as a response, the python server shows the response page in SearchResult frame. Please note that the results can have more than one links.  The servers serves the links in the SearchResult
frame as below:

<a href="search_result1.html" target="ContentFrame" >Result1 </a>

When we click on any link in the SearchResult frame, the link should get opened in the ContentFrame. I was attaining the same with FireFox-2.x but with FireFox-3.0, it's getting shown in a new tab.

PS: Please note that I can achieve this with static pages but not with a server. And also the two frames in question (SearchResult and ContentFrame) don't belong to the same frameset, those are at different levels. ContentFrame is actually a frame belonging to the parent frameset of SearchResult.

Let me know if I need to do any additional thing to serve my purpose.
 

2.jpg
0
Michel PlungjanIT ExpertCommented:
Normally I would expect that if a frame is named, it can be targetted.
So my initial reaction is that there is an issue with the names.

I would need to access the actual server with firefox and its console.

Michel
0
delthetaAuthor Commented:
Hi Michel,
> Normally I would expect that if a frame is named, it can be targetted.
> So my initial reaction is that there is an issue with the names.
I believe this is not a problem with the names for frames as it was working fine with FireFox-2.x but not with FireFox-3.0.  I am just wondering is this could be remotely related to config options available with FireFox-3.0, i.e. changing some config settings would be of any help.


> I would need to access the actual server with firefox and its console.
Am scared I could be of any help here because this python server can not be accessed from  the outside other than local host.  Let me know if you need some more details.
 
 
0
Michel PlungjanIT ExpertCommented:
Can you use IFrames instead?
0
delthetaAuthor Commented:


Hi,
Yesterday I eventually happened to refresh/reload the main page (comprised of LeftFrame and ContentFrame as attached in one of my old posts) and realised that everything works fine henceforth; i.e. when I enter any search word and hit the search button, once help_search_results.html gets loaded in the searchResult frame, I press F5 or reload the page and then click on any of the search result pages from searchResult frame,  it gets opened in the ContentFrame as expected. You may have to refer to the earlier snapshot for the names of frames etc.

However when I tried to reload the page programatically, I could not achieve the same. I tried the below options:
1) In the help_search_results.html, I have something like this:
<body onload="top.parent.frames["ContentFrame"].reload(true); return false">

or

<body onload="top.parent.frames["ContentFrame"].reload(); return false">

2) I use onClick to explicitely reload the page while I set the 'target' tag for the individual search results in the body of the 'help_search_results.html'(this is the page which is being shown in the SearchResult frame) as below:

<a href="search_result1.html" target="ContentFrame" onclick="window.location.reload(); return false;">Result1 </a>

Am just wondering if is there any option using which I can programatically generate F5 or reload the page.  
 
0
Michel PlungjanIT ExpertCommented:
Perhaps it is because it is

<body onload="top.parent.frames["ContentFrame"].location.reload(true);">

0
delthetaAuthor Commented:
> <body onload="top.parent.frames["ContentFrame"].location.reload(true);">
Ohh, actually that was a typo from my side; anyways thanks for pointing this out. I later ensured that am doing the right thing and then compared the error console with both FireFox-2.x and FireFox-3.0.  Am now using
<body onload="top.parent.frames['ContentFrame'].location.reload(true);">  
with Firefox-2.x it does not show any error while when I test the same with FireFox-3.0, I got the below-mentioned error on error console:
<Error>
Error: Permission denied to get property Location.reload

</Error>
It seems, from resultFrame I can't acess a property of a frame belonging to its grand-parent. If you recall,  I have a mainpage with two frames as LeftFrame and ContentFrame and LeftFrame inturn has two subframes as searchInput and searchResult and am trying to refresh the contentFrame from searchResult frame.  
PS: In my case, Firefox-3.0 config option 'security.fileuri.strict_origin_policy' is set to false. I changed the config with

pref("security.fileuri.strict_origin_policy", false);
I thought this would enable me to see the result links in the frame as specified in the target tag.
Am just wondering if modifying any other config option would come to my rescue? If you are aware of any such option; please let me know the same. Otherwise I believe we'd have to ask user to press F5 manually.
 
0
Michel PlungjanIT ExpertCommented:
If you still know the url, try

top.parent.frames['ContentFrame'].location=url
or

window.open(url,'ContentFrame')

since that is less of a security issue
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.