Click to See Complete Forum and Search --> : Nested Frames - parent.parent.document.location=(myURL);


soyebean
07-03-2003, 08:39 PM
Hello Forum,

Just found you today. What an interesting place. My question: Can anyone tell me where to look for more info on Nested Frames?

Currently I am sending my Frameset to someone elses Frameset. When someone clicks on an item in one of my Frames I want to be able to take over their whole Window, ( which is a pop-up ).

I have tried a combination of statements. I have books (older ones ) but maybe there is a thread here in this forum that I can go look at?????

Thanks in advance.
Soyebean

Khalid Ali
07-03-2003, 09:57 PM
Hello Soye..please repharese your question...its hard to understand(at least for me)..:D

soyebean
07-04-2003, 01:01 PM
Hello Kahlid Ali and Forum,

Thanks for the response.

Sorry about my Gobble De Gook question, it's probably because I'm confused about what I'm doing.

Frames are my nightmare right now.
I have created a map project using Coldfusion and Aut***** MapGuide Lite View, this is all working.

I have been reading the threads in this forum regarding parent frames, windows etc. and I have not come accross anything yet that works for me.

I have created a frameset. It has three frames.

My client has a frameset. It has three frames.

My frameset gets called/opened in the middle frame of my clients frameset.

One of my frames has a map in it. If a user clicks on the map I want to take over the whole window to display the next page.

So far I can only take over the parent of my frameset by using
parent.document.location=(myURLParam); This works.

I have tried using:
parent.parent.document.location=(myURLParam);
but this does not work.

I have tried other combinations without success. This is my script, it is on a .XSL page, believe it or not this is working for me so far.

<SCRIPT language="JavaScript">
var Key = '<xsl:value-of select="@identifier"/>';
var CR = "CR=" + Key;
var myURLParam = "http://www.mywebsite.com/index.cfm?fuseaction=CRSearch.CREditPopup&amp;" + CR;
str = '<xsl:value-of select="@typeName"/>';
if (str.search("Carrier Routes") == -1)
document.write()
else
parent.document.location=(myURLParam);
</SCRIPT>

Any suggestions? Where to look?

Thanks in Advance for any response.
Best Regards,
Soyebean

SlankenOgen
07-04-2003, 01:17 PM
When you make the popup open put

var frms = window.open(....etc);

and for the nested frame put

frms.document.location.href = "blah.com";

soyebean
07-04-2003, 03:52 PM
Thank you SlankenOgen for your response. I will find out on Monday how it goes.

Best regards,
Soyebean

soyebean
07-07-2003, 01:23 PM
Hello Forum,

I am pretty confused about this frame work, I have this working to a point but it needs to reach to the topmost frame.

Thanks to SlankenOgen I am looking in the right direction but I need more help please.

For some reason this does not work for me.

var frms = window.open(....etc);
and for the nested frame put
frms.document.location.href = "blah.com";

parent.frms.document.location.href = "blah.com"; - won't work either and I have tried a few other variations.


If I put:
parent.document.location.href = "blah.com";
It opens the window but in my parent frameset. ???

What I am trying to do is open into the topmost parent frameset.

The following is my frameset it gets called to my clients frameset.

<frameset rows="20,*">
<frameset cols="50%,50%">
<frame name="Navigate" src="Navigate.cfm" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
<frame name="Info" src="Empty.cfm" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
</frameset>
<frame name="Map" src="<cfoutput>#src#</cfoutput>" marginwidth="0" marginheight="0" frameborder="0" noresize>
</frameset>



Below is my clients frameset.

<FRAMESET ROWS="80,*,20">
<FRAME NAME="frame_top" SRC="index.cfm?fuseaction=MMM.PopFrameTop" SCROLLING="NO" NORESIZE FRAMEBORDER="0">

<FRAME NAME="frame_middle" SRC="http://www.MyFrames.com/mna/web/default.cfm?SID=1234&amode=1&geolevel=cr&geocode=&testing=1" FRAMEBORDER="0" SCROLLING="YES">

<FRAME NAME="frame_bottom" SRC="index.cfm?fuseaction=MMM.PopFrameBottom" SCROLLING="NO" NORESIZE FRAMEBORDER="0">
</FRAMESET>

Any response would be greatly appreciated.

Thank you in advance,
SoyeBean

SlankenOgen
07-07-2003, 01:38 PM
Can you send the url of the site. I'm finding it difficult to understand how the frames relate to each other.

soyebean
07-07-2003, 01:51 PM
Hello SlankenOgen,

Thank you for your response.

I am not the creator of the site I am only supplying the map and map navigation tools.

http://house.myneighborhoodagent.com/index.cfm

click on top right button "New Agent Signup"

then bottom of next page: Promotion code b555

then "Don't wait sign up now"

then "Zip": 98003

This will take you to a map. :)

Click on radio button: "Select a Neighborhood"

Then click on the map, you will see that the page opens into itself and not the whole window.

Thank you for your time on this and having a look.

Cheers,
SoyeBean

SlankenOgen
07-07-2003, 02:07 PM
Still confusing. I don't see any framesets.

soyebean
07-07-2003, 02:10 PM
Sorry about that I know its hard to follow that is why I'm so confused.

Try this please.

http://house.myneighborhoodagent.com/PopUpMapFrameset.cfm?MODE=NH&data=

SoyeBean

SlankenOgen
07-07-2003, 02:15 PM
I think you need

opener.parent.location.href

is the javascript you are using in a frameset?

soyebean
07-07-2003, 02:20 PM
yes it is, I will try your next recommendation and post my results.

Thank you very much for your time.
SoyeBean

SlankenOgen
07-07-2003, 02:21 PM
When the map is clicked on you want to popup to show in the map page?

SlankenOgen
07-07-2003, 02:38 PM
If your page is a nested frameset ie. a frameset within a frameset and your opener is a frameset it is very difficult to find the proper path as javascript does not (if I remember correctly) support parent.parent - it can only target the immediate parent.

I suggest you make your page a single frameset.

But you could also try-

window.opener.parent.location.href =


but I am still not sure how the whole system is set up.

soyebean
07-07-2003, 02:58 PM
Hello SlankenOgen,

I have tried your suggestions, it's a no go.
Thank you very much for your time.

I will rethink this and post my results.

Best regards,
SoyeBean

soyebean
07-07-2003, 06:09 PM
Hello All,

Thank you for reading my post and helping me with my inquiry. :) Special Thanks to SlankenOgen.

The answer to my question was to take out the ".document"
from my script.

The script that works for me now is:

parent.parent.location.href=(myURL.com);

Cheers,
SoyeBean