dellon
asked on
Link to open a new window from a framed page
Here's the caviat:
1. The framed page is within a frame
<frameset rows="90,*,42" frameborder="no" border="0" framespacing="0">
<frame src="/includes/inc_top.asp " name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frame src="http://contentURL/" name="mainFrame" id="mainFrame" title="mainFrame" scrolling="auto" />
<frame src="/includes/footer.asp" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" />
</frameset>
The middle framed page (http://contentURL/) also contain 2 frames.
2. Here's the link to open the new window:
<a href="gotothislocation" target="_top">
I can't change anything else other than the "gotothislocation".. so target="_top" within the href is uneditable.
I tried: javascript:void(0);open.wi ndow('goto thislocati on')" ... that doesn't work.
Please help shed some light.
1. The framed page is within a frame
<frameset rows="90,*,42" frameborder="no" border="0" framespacing="0">
<frame src="/includes/inc_top.asp
<frame src="http://contentURL/" name="mainFrame" id="mainFrame" title="mainFrame" scrolling="auto" />
<frame src="/includes/footer.asp"
</frameset>
The middle framed page (http://contentURL/) also contain 2 frames.
2. Here's the link to open the new window:
<a href="gotothislocation" target="_top">
I can't change anything else other than the "gotothislocation".. so target="_top" within the href is uneditable.
I tried: javascript:void(0);open.wi
Please help shed some light.
ASKER
Sorry if I was unclear. This is intranet between 2 servers. Let's call it server1 and server2. I'll try to draw it:
page in server1 (main intranet)
|-----------------------|
| topFrame |
|-----------------------|
| mainFrame |
|-----------------------|
| bottomFrame |
|-----------------------|
mainFrame contains contentURL on server2 (microsoft reporting services page)
|-----------------------|
| topFrame2 |
|-----------------------|
| mainFrame2 |
|-----------------------|
links exist on mainFrame2, and I want to open a new window by itself not within the frames.
The only thing I can edit is the href="" ... nothing else. target="_top" have to stay in the <a>.
So <a href="iCanOnlyEditThis" target="_top">
page in server1 (main intranet)
|-----------------------|
| topFrame |
|-----------------------|
| mainFrame |
|-----------------------|
| bottomFrame |
|-----------------------|
mainFrame contains contentURL on server2 (microsoft reporting services page)
|-----------------------|
| topFrame2 |
|-----------------------|
| mainFrame2 |
|-----------------------|
links exist on mainFrame2, and I want to open a new window by itself not within the frames.
The only thing I can edit is the href="" ... nothing else. target="_top" have to stay in the <a>.
So <a href="iCanOnlyEditThis" target="_top">
Thanks for the clarification. I was a little confused in my reply because I assumed you needed the script in the "framed" page (i.e. the main frame page).
This would be so easy if you could change target="_top" to target="_blank". Javascript will be needed but can you change the href to #? For example a tag like this ...
<a href="#" target="_top" onclick="window.open('goTo ThisPage.h tm','windo w2'); return false;">
Let me know how this works, if you can't use it, or if you have a question.
bol
This would be so easy if you could change target="_top" to target="_blank". Javascript will be needed but can you change the href to #? For example a tag like this ...
<a href="#" target="_top" onclick="window.open('goTo
Let me know how this works, if you can't use it, or if you have a question.
bol
Hi dellon,
Try to make the link:
javascript:window.open('go tothisloca tion'); return false;
So you would get:
<a href="javascript:window.op en('gototh islocation '); return false;" target="_top">
Hope that helps :)
Regards,
Max.
Try to make the link:
javascript:window.open('go
So you would get:
<a href="javascript:window.op
Hope that helps :)
Regards,
Max.
ASKER
b0lsc0tt : I wish =) I can't add nor edit any of the <a> attribute, other than the href.
DreamMaster: tried window.open .. doesn't work.
DreamMaster: tried window.open .. doesn't work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It's a Microsoft Reporting Services. It's all .net and compiled, and the links is part of a recordset.
using window.open will result in opening gotothislocation on the parent window and the address bar on the browser reads:
javascript:window.open('http://gotothislocation/','newwindow')
If I open contentURL by itself (not within the mainFrame) and click the link, it works just fine.
using window.open will result in opening gotothislocation on the parent window and the address bar on the browser reads:
javascript:window.open('http://gotothislocation/','newwindow')
If I open contentURL by itself (not within the mainFrame) and click the link, it works just fine.
You could try using the href below ...
<a href="javascript: var newwindow = window.open('http://gotothislocation/','newwindow'); if (window.focus) newwindow.focus();">
Let me know what happens, especially look for errors. I don't know that this will work but it worth the try.
bol
<a href="javascript: var newwindow = window.open('http://gotothislocation/','newwindow'); if (window.focus) newwindow.focus();">
Let me know what happens, especially look for errors. I don't know that this will work but it worth the try.
bol
ASKER
No go on that too my friend.
It opens on the parent window and spits out the javascript on the address bar.
It opens on the parent window and spits out the javascript on the address bar.
I'm out of ideas then, at least right now. :)
I would suggest that you open a pointer in the Javascript topic area. There is a tool at www.ee-stuff.com that members can use to make pointers. Let me know if you have questions about making a pointer. There are some experts there that may have a solution or some things to try.
bol
I would suggest that you open a pointer in the Javascript topic area. There is a tool at www.ee-stuff.com that members can use to make pointers. Let me know if you have questions about making a pointer. There are some experts there that may have a solution or some things to try.
bol
ASKER
Thanks for trying. I'll look into pointer.
Mplungjan,
I suggest you could close this by either accepting my comment { http:Q_22076914.html#a18046882 } or by deleting/refunding. The reason I suggest closing by accepting that comment is I don't think there is any way to do what Dellon wants given the conditions. Since I can't be sure of that I will not object to delete/refund if Dellon wishes and/or you think it is best. I hope this suggestion helps and thanks for all of your time cleaning, etc.
bol
I suggest you could close this by either accepting my comment { http:Q_22076914.html#a18046882 } or by deleting/refunding. The reason I suggest closing by accepting that comment is I don't think there is any way to do what Dellon wants given the conditions. Since I can't be sure of that I will not object to delete/refund if Dellon wishes and/or you think it is best. I hope this suggestion helps and thanks for all of your time cleaning, etc.
bol
ASKER
Sorry none of these works for my issue.. but b0lsc0tt had been great and I don't mind giving him the points. Whichever you decide is fine with me.
Thanks for the comment Dellon. I'm glad I could help and it was appreciated. I just wish we could've had an option that worked but we were too limited. If you can ever change the compiled part then my information will help you do what you wanted. I like Mplungjan's recommendation but am OK if he decides to change it.
bol
bol
It seems like contentURL represents a different domain. Is that the case? If so, javascript isn't allowed to change it. It is part of the security browsers have and a limit of javascript. I assume you can't change the content of the files at contentURL. If you can then you can change the html code yourself. If not, then there is no way to tell it what frame to open in.
Let me know if you have any questions or need more information.
b0lsc0tt