Redirigir la página web para vincular en Iframe

Currently, I am creating a webpage which use search tool of Google.com. - I made a form on the page which will sent query form to Google.com. - For the search result, I used I an iframe to display those content.

But the problem is: when the iframe displays search result links, If user click on those link, only the content in the iframe got redirect to the result webpage, while I want the link to redirect the main page itself.

Existe alguna solucion para esto ?

The code for my main page - The searchFrame is where the form is - The contentFrame is just an empty page.

'

    <div id="sidecontainer">
<iframe id="SFrame" name="SearchFrame" frameborder ="0" width="500" height="100" scrolling="no" src="SearchBox.html"></iframe>
</div>

<div id="content">
<iframe id="CFrame" name="ContentFrame" frameborder="0" width="80%" height="900px" scrolling="no" OnLoad="window.scroll(0, 0);" src="ContentFrame.html"></iframe>
</div>

'

¡Salud

preguntado el 04 de diciembre de 12 a las 04:12

1 Respuestas

Use base tag. Add this to the head of the iframe. This will open all the links in the parent page itself

<base target="_parent" />

This is supported in all browsers too.

Respondido el 04 de diciembre de 12 a las 04:12

Thanks, but that work for static webpage, but my iframe will be changed completely as it presented the result page of google.com. Or did I do something wrong? - MikeNQ

if this in the head tag on clicking on the link it will be opened in the parent page - Shamis Shukoor

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.