3

In order to make a search migration from SP 2007 to SP 2013, I have created an iFrame in a content editor web part in SP 2007 redirecting to the search page of 2013. However, after searching a word, the page is not redirected in Internet Explorer. The code I am using:

<iframe frameboarder="0" width="100%" height="900" marginwidth="0" marginheight="0" frameborder="0" src="http://search/Pages/default.aspx" >
</iframe>

This is working fine in Opera and Google Chrome.

What security settings have to be applied in order to allow iFrame redirection in Internet Explorer v8?

Thank you in advance.

  • I'm sure i had to do something very similar last year...let me go and try dig it out. Something to do with cross domain stuff from what i remember. – Stephen Jan 14 '14 at 10:18
2

This has nothing to do with any restriction of the internet explorer. This works by design of html. Your src="http://search/Pages/default.aspx" simply doesn't know that it has been loaded in an iframe. In order to get this work you need to add some javascript or modify the master page of your search center and add the following html tag in the header.

 <base target="_parent">

Then page knows that all links should be loaded in the parent window. More information on targeting can be found: Target links in iframe or frame

  • Thank you for you answer. However, your solution can be applied once the iframe is loaded in order to click on links inside that iFrame. My issue is sth different. The search box is loaded in the iFrame, but once I click the button (search) no data are being posted and it does not redirect to the search results page. This works fine in Chrome and Opera, so I guess then it has to do with Internet Explorer (such as security settings or sth different). Has anybody faced this issue before? Thank you.. – elona Jan 14 '14 at 13:49
  • In this case I would use some javascript and a html form web part. You don't need to have a form web part after all. The format to find results is search/pages/default.aspx?k=yoursearchterm yourserachterm is the value of the text box after the button has been clicked. You just need to redirect. – Stefan Bauer Jan 14 '14 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.