Results 1 to 5 of 5

Thread: need some help with inputs

  1. #1
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default need some help with inputs

    hi i would like to do the following

    Lets say i have a text box and someone types in the word russell

    I would like that text field to open something like http://www.queerfm.net/["name"].swf in this case it would look like

    http://www.queerfm.net/russell.swf i would like to also make it so that this opens in an iframe. can any one help.

    BTW i want it so no matter what they type in it trys to find the swf file even if it can't
    The web in one word.

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Link Change</title>
    <script type="text/javascript">
    var host = "http://www.queerfm.net/";
    var extension = ".swf";
    function url(element,attribute) {
    	var el = document.getElementById(element);
    	var value = el.value;
    	window.open(host+value+extension,"window");
    	}
    </script>
    </head>
    <body>
    <input id="page" type="text">
    <br><input value="Enter" onclick="url('page');" type="button">
    </body>
    </html>
    - Mike

  3. #3
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi i was wondering is there a way that a user could select from a drop down box what directory they would like to search.

    So for contacts its - http://www.queerfm.net/contacts/____.html
    for Music its - http://www.queerfm.net/music/____.html

    and so on

    Thanks
    The web in one word.

  4. #4
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    can any one help?
    The web in one word.

  5. #5
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Link Change</title>
    <script type="text/javascript">
    var host = "http://www.queerfm.net/";
    var extension = ".html";
    function url(element,element2) {
    	var el = document.getElementById(element);
    	var value = el.value;
    	var el2 = document.getElementById(element2);
    	var value2 = el2.value;
    	window.open(host+value2+value+extension,"window");
    	}
    </script>
    </head>
    <body>
    <input id="page" type="text">
    <select id="dir">
    <option value="music/">Music</option>
    <option value="contacts/">contacts</option>
    </select>
    <br><input value="Enter" onclick="url('page','dir');" type="button">
    </body>
    </html>
    Oh Yes, It Works! (I am extatic.)
    Last edited by boxxertrumps; 03-25-2007 at 02:05 AM. Reason: forgot to change extention.
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

Bookmarks

Posting Permissions

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