Hi there , this is my first post and i'm looking forward for someone to help me ..

(description of my problem) I have a website that will serve as a search engine .
My website will use other websites to serve as search engines . I created an hidden <iframe> to load those websites .

I want to make it that when an user inputs text in the search box , the JavaScript takes the input and replaces the <iframe> id with the text .

eg: the user will input "game" in my website ... so the url for the iframe will be : example.com/search/game/0/8 ..... [/search/name/0/8 needs to stay like it is .. only the name changes

So now the <iframe> loads example.com/search/game/0/8 hidden so the user wont view the whole search results .... How can i use javascript to only get some information from this results webpage ?

i've have 2 js ready but they have some minor problems because the user needs to input for eg : http://www.example.com/search/name/0/8 and not input only "name"

<iframe id="iframeId" src="http://www.thepiratebay.se/search/" class="rte-zone" width="0" height="0" >
<script type="text/javascript">
var iframeDoc;
if (window.frames && window.frames.iframeId &&
(iframeDoc = window.frames.iframeId.document)) {
var iframeBody = iframeDoc.body;
var ifromContent = iframeBody.innerHTML;
<script type="text/javascript">
function getContentFromIframe(iFrameName) {
var myIFrame = document.getElementById(iFrameName);
var content = myIFrame.contentWindow.document.body.innerHTML;
var status = content.getElementById('AREA:222_4');

PLEASE I know that only one user can't reply with a help in all this , but if you know even a small thing please reply with that small tip .

Thanks in advance.