Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15

Thread: Iframe help

  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Iframe help

    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
    Code:
    <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

  • #2
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i've tried this aswell, it works but not as i would want it to,


    Code:
    <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>

  • #4
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    can anyone help?

  • #5
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,722
    Thanks
    41
    Thanked 191 Times in 190 Posts
    ive got no clue what you are asking

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #6
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #7
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Seems to me it works as you have described.
    Attached Thumbnails Attached Thumbnails Iframe help-iframe.jpg  
    Teed

  • #8
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by teedoff View Post
    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.

  • #9
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Your form is performing this action:

    Code:
    <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?
    Teed

  • #10
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well html is about the top end of my knowlegde

  • #11
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    :'(

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

  • #12
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.
    Teed

  • #13
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #14
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by Peterisgb88 View Post
    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.
    Teed

  • #15
    New Coder
    Join Date
    Nov 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by teedoff View Post
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •