You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chen, Gin" <Gi...@NielsenMedia.com> on 2003/05/16 22:13:17 UTC

[OT] RE: Retrieving URL using Struts

In Javascript it's easy:
parent.frames.desiredFrameId.src;

-Tim

-----Original Message-----
From: Denis Avdic [mailto:denis@betterway.net]
Sent: Friday, May 16, 2003 4:06 PM
To: Struts Users Mailing List
Subject: Re: Retrieving URL using Struts


No, not really but I assumed that Javascript would be able to do it.

See, the actual problem is that I have two frames, and depending on what 
the client presses in the top frame, i want to load a different jsp 
there and resize the frame.  Since I cannot resize frames without using 
Javascript, I figured that I would reload the entire frameset and just 
reload the bottom frame with the website the user was on ....




Sergey Smirnov wrote:

>Do you know the way how to do it with javascript? :-|
>
>
>----- Original Message ----- 
>From: "Denis Avdic" <de...@betterway.net>
>To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>Sent: Friday, May 16, 2003 12:38 PM
>Subject: Retrieving URL using Struts
>
>
>  
>
>>Hello all,
>>
>>First, thanks for all the help up till now,
>>
>>Second, I have a question:
>>
>>Is there a way to retrieve the URL from a frame using struts?
>>
>>Situation is such that a user can have another website open in a frame 
>>within my site.  Now I want to actually retrieve the actual URL of that 
>>site so I can use it in my app.
>>Is that possible to do without using Javascript? 
>>
>>Thanks,
>>
>>Denis
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT] RE: Retrieving URL using Struts

Posted by Sergey Smirnov <si...@exadel.com>.
I guess you mean:
parent.frames.desiredFrameId.location.href

It will work until the frames share the same domain. If domains are
different you will got a 'Access is denied'. Browser forbids reading from
other frame with different domain due to the security reason.

Regards,
Sergey Smirnov
http://www.exadel.com/strutsStudio

----- Original Message ----- 
From: "Chen, Gin" <Gi...@NielsenMedia.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Friday, May 16, 2003 1:13 PM
Subject: [OT] RE: Retrieving URL using Struts


> In Javascript it's easy:
> parent.frames.desiredFrameId.src;
>
> -Tim
>
> -----Original Message-----
> From: Denis Avdic [mailto:denis@betterway.net]
> Sent: Friday, May 16, 2003 4:06 PM
> To: Struts Users Mailing List
> Subject: Re: Retrieving URL using Struts
>
>
> No, not really but I assumed that Javascript would be able to do it.
>
> See, the actual problem is that I have two frames, and depending on what
> the client presses in the top frame, i want to load a different jsp
> there and resize the frame.  Since I cannot resize frames without using
> Javascript, I figured that I would reload the entire frameset and just
> reload the bottom frame with the website the user was on ....
>
>
>
>
> Sergey Smirnov wrote:
>
> >Do you know the way how to do it with javascript? :-|
> >
> >
> >----- Original Message ----- 
> >From: "Denis Avdic" <de...@betterway.net>
> >To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> >Sent: Friday, May 16, 2003 12:38 PM
> >Subject: Retrieving URL using Struts
> >
> >
> >
> >
> >>Hello all,
> >>
> >>First, thanks for all the help up till now,
> >>
> >>Second, I have a question:
> >>
> >>Is there a way to retrieve the URL from a frame using struts?
> >>
> >>Situation is such that a user can have another website open in a frame
> >>within my site.  Now I want to actually retrieve the actual URL of that
> >>site so I can use it in my app.
> >>Is that possible to do without using Javascript?
> >>
> >>Thanks,
> >>
> >>Denis
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org