...

View Full Version : Iframe help



Peterisgb88
11-14-2011, 04:28 AM
hi, i'm making a website,
i've got the frame

on this page http://whereami.site90.net/tv/index1.html

3 iframes,
1st one is the menu
2nd tab is the address bar
3rd tab is the main tab

i've tried a few ideas, but none of them have worked,

the idea is to put a custom link such as google.com etc into the address bar and the page is suppose to load in the 3rd tab,

This is what i have but its wrong


<FORM method=GET target="tab">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<TABLE bgcolor="#000000"><tr><td>
<INPUT TYPE=text name=q size=50 maxlength=255 value="http://">
<INPUT type=submit name=btnG VALUE="Go">
</td></tr></TABLE>
</FORM>


Please look at the page if you dont know what i am on about

thanks for reading and help would be good, thanks

Peterisgb88
11-14-2011, 04:51 AM
i've searched google, maybe i aint looking for the right words but i dunno what that would be lol
i hope some1 can help before i loose my mind lol

Peterisgb88
11-14-2011, 07:09 AM
i've tried this aswell, it works but not as i would want it to,



<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>" target="tab">
<input type="text" id="searchText" size="75" name="searchText" value="<?php
if (isset($_POST['searchText'])){
echo($_POST['searchText']); }
else {
echo('');
} ?>"/>

<input type="submit" value="GO TO SITE"name="submit" id="searchButton" />
<?php
if (isset($_POST['submit'])) {

$request =
'http://api.bing.net/json.aspx?Appid=8CFD0925A6B1745AFE2F0F359DCD8D4D9DD6A5CE&sources=web&Web.Count=5&query=' . urlencode( $_POST["searchText"]);$response = file_get_contents($request);
$jsonobj = json_decode($response);
echo('<ul ID="resultList">');

foreach($jsonobj->SearchResponse->Web->Results as $value) {

echo('<li class="resultlistitem"><a href="' . $value->Url . '">'. $value->Title .'</a>');
echo('<p>'. $value->Description .'</p>');
echo('</li>');
}
echo("</ul>");
}
?>
</form>

Peterisgb88
11-14-2011, 05:40 PM
can anyone help?

alykins
11-14-2011, 06:35 PM
ive got no clue what you are asking

Peterisgb88
11-14-2011, 07:06 PM
look at the link i posted.

http://whereami.site90.net/tv/index1.html

on the second tab it has a Text area.
The idea of the form is that you put your web address e.g http://www.google.co.uk, hit enter or presss go.

the webpage should load in the 3rd tab.

teedoff
11-14-2011, 07:10 PM
Seems to me it works as you have described.

Peterisgb88
11-14-2011, 07:18 PM
Seems to me it works as you have described.


the 3rd iframe doesnt open the link in the 3rd tab, e.g
type in http://www.bbc.co.uk,
then press go.
it brings up a list of searchs found.

its a search code that i edited because i had no clue where to start.

teedoff
11-14-2011, 07:34 PM
Your form is performing this action:


<form target="tab" action="/tv/go.html" method="post">

everytime. So it's taking the user to go.html everytime the submit button is pressed.

You should find a way to make that form action dynamic. By dynamic I mean that the action is based on the user input text.

Server-side code would do this for you. HTML forms by themselves are very static and cannot process or pass on user data. Are you using any server-side language to process the form?

Peterisgb88
11-14-2011, 07:48 PM
well html is about the top end of my knowlegde

Peterisgb88
11-15-2011, 08:45 PM
:'(

if no1 can help then thats ok, i'm sure there might be something on the net somwhere else

teedoff
11-15-2011, 10:38 PM
Well I'm not that good at php, but what you would do would be take the value the user types in the text box and insert that into the form action value. I might could show you a sample, but it might not be the best way to do it. Plus, you would need to validate the form input and make sure what users type in are actually valid URL's.

You should see if a mod can move this thread to the php forum.

Peterisgb88
11-16-2011, 04:30 AM
hmmm,
Its all HTML,
i havent put no css in there yet,
i've tried a few things, i searched the net, i probs wasnt typing in the right thing, i put severl things into google and searched about 100 pages of each search and no luck, thats why i asked here lol

teedoff
11-16-2011, 03:04 PM
hmmm,
Its all HTML,
i havent put no css in there yet,
i've tried a few things, i searched the net, i probs wasnt typing in the right thing, i put severl things into google and searched about 100 pages of each search and no luck, thats why i asked here lol

I didn't mention CSS. I said you will need a server side language like php, asp, coldfusion, or other in order to capture the text input by the user and make that actual text(in this case a URL) the action of the form.

Peterisgb88
11-16-2011, 04:31 PM
I didn't mention CSS. I said you will need a server side language like php, asp, coldfusion, or other in order to capture the text input by the user and make that actual text(in this case a URL) the action of the form.

ok, i'll have to do some research



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum