Dear Sir/Madam, I have a requirement where i need to upload websites in a window, for which i''m using iframe. The problem i face is that i''m able to upload all the sites except few sites like http://www.gmail.com, http://www.mail.yahoo.com. The code im using is as below <iframe src="http://www.mail.yahoo.com"></iframe> The problem is that when im trying to run the above yahoo mail''s landing page is getting opened in the entire browser reather than getting opened in the iframe, which is resulting in logging out of my application. Please help/suggest me a way where i can keep track of it, in order atleast i can provide a warning message to the user saying that "You cannot upload this website". Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
There''s a couple of ways I can imagine this being the case. One would be if there was some sort of "frame-buster" script on yahoo''s site. Another would be that the form tag on that site specified the target of _top. If either of these is the case, and you don''t work at yahoo, you''re going to have to work out another approach. An iframe is simply not going to work in this case. You might be able to build a proxy using cURL or similar, something which can submit a form, read the results, process them, and then insert them into your page or page fragment, which you then reload using an Ajax call or similar. But that''s an awful lot of work for what might be limited gain. What is your goal here? Walter On Jul 17, 2007, at 9:40 AM, diddige wrote:> > Dear Sir/Madam, > > I have a requirement where i need to upload websites in a window, for > which i''m using iframe. > The problem i face is that i''m able to upload all the sites except few > sites like http://www.gmail.com, http://www.mail.yahoo.com. > The code im using is as below > <iframe src="http://www.mail.yahoo.com"></iframe> > > The problem is that when im trying to run the above yahoo mail''s > landing page is getting opened in the entire browser reather than > getting opened in the iframe, which is resulting in logging out of my > application. > > Please help/suggest me a way where i can keep track of it, in order > atleast i can provide a warning message to the user saying that "You > cannot upload this website". > > Thanks in advance. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Sir, With the research i have done, i came to know that this is the problem with the script written on yahoo site. i.e, <script language="javascript"> if(top.location != self.location) top.location = self.location.href; The above code snippet is causing the problem. When i have gone through the Http Response Status codes, i found one thing to be interesting. HTTP_STATUS_RESET_CONTENT 205 The request has been completed, and the client program should reset the document view that caused the request to be sent to allow the user to easily initiate another input action So i thought, this is what is happening with me, so i tried calling yahoo mail using AJAX thinking that i could catch the response code. But all i ended up is, i got empty responseText and the staus code to be "0". Please help me out if there is any other better way of doing this. Thanks and Regards, Vikranth Diddige, Ph.o: 91-9886773630. On 7/17/07, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> > > There''s a couple of ways I can imagine this being the case. One would > be if there was some sort of "frame-buster" script on yahoo''s site. > Another would be that the form tag on that site specified the target of > _top. If either of these is the case, and you don''t work at yahoo, > you''re going to have to work out another approach. An iframe is simply > not going to work in this case. > > You might be able to build a proxy using cURL or similar, something > which can submit a form, read the results, process them, and then > insert them into your page or page fragment, which you then reload > using an Ajax call or similar. But that''s an awful lot of work for what > might be limited gain. > > What is your goal here? > > Walter > > On Jul 17, 2007, at 9:40 AM, diddige wrote: > > > > > Dear Sir/Madam, > > > > I have a requirement where i need to upload websites in a window, for > > which i''m using iframe. > > The problem i face is that i''m able to upload all the sites except few > > sites like http://www.gmail.com, http://www.mail.yahoo.com. > > The code im using is as below > > <iframe src="http://www.mail.yahoo.com"></iframe> > > > > The problem is that when im trying to run the above yahoo mail''s > > landing page is getting opened in the entire browser reather than > > getting opened in the iframe, which is resulting in logging out of my > > application. > > > > Please help/suggest me a way where i can keep track of it, in order > > atleast i can provide a warning message to the user saying that "You > > cannot upload this website". > > > > Thanks in advance. > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 17, 2007, at 10:17 AM, vikranth diddige wrote:> <script language="javascript"> > if(top.location != self.location) > top.location = self.location.href; > > The above code snippet is causing the problem. >Yup. This is pretty much the canonical "frame-buster" script. If you are dead-set on running this page within the context of your page, you are going to need a pretty sophisticated proxy or screen-scraper application to run a complete browser session from your server against the Yahoo pages, and then gather the input from that session into something you can display within your page. You are not going to be able to get past this little bit of code and get the Yahoo page to run in your user''s browser through your frame (i- or otherwise). Once again, can you give us the "elevator pitch" of what your application is supposed to do? What does it mean to "upload a website" as you describe it? What do you do with these "uploaded" sites? Walter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---