32 users online (0 members and 32 guests)  


Page 3 of 5 First 1 2 3 4 5 Last
  Results 31 to 45 of 70

Related

  1. Replies: 0
  2. open url from text box    Forum: Javascript Forum
    Replies: 1
  3. how to open save/open dialog using HTML    Forum: HTML Forum
    Replies: 1
  4. open url from text box    Forum: Javascript Forum
    Replies: 5
  1. #31
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: open url from text box? pls help

    No problem, you're very welcome.

  2. #32
    ralphreyes's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2010
    Posts
    5

    Re: open url from text box? pls help

    coothead, is it possible to take the code you provided me with earlier, and instead of showing two iframes, only have 1 iframe, but two different submit buttons, one button for google search and the other button for yahoo search showing up in that 1 iframe?

  3. #33
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: open url from text box? pls help

    Hi there ralphreyes,
    ...is it possible to.....
    Of course it is, here is the revised code...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    
    <title></title>
    
    <style type="text/css">
    #body {
        margin:10px 0;
     }
    #container {
        width:205px;
        border:3px double #000;
        padding:10px;
        font-family:sans-serif;
        color:#000;
        background-color:#ccc;
        margin:0 auto 10px;
        text-align:center
     }
    #container h1 {
        margin:0;
        font-size:1em;
     }
    #container input {
        margin-top:10px;
     }
    #frame-holder {
        text-align:center;
     }
    #frame-holder iframe {
        width:80%;
        height:500px;
     }
    .none {
        display:none;
     }
    </style>
    
    <script type="text/javascript">
    
    function init() {
    
       df=document.forms[0];
       df.className='';
       df.reset();
       df[0].focus();
    
       obj=document.getElementById('frame-holder');
       obj1=document.getElementById('fr');
    
    df.onsubmit=function() {
        return false;
     }
    df[1].onclick=function() { 
       gothere(this.value);
     }
    df[2].onclick=function() { 
       gothere(this.value);
     }
    df[3].onclick=function() { 
       obj1.src='';
       obj.className='none';
     }
    
    function gothere(site) {
       obj1.src='';
       obj.className=''; 
    if(site=='google') {
       obj1.src='http://www.google.com/search?q='+df[0].value;
      }
    else {
       obj1.src='http://search.yahoo.com/search?p='+df[0].value;
     }
       return;
      }
     }
    
    if(window.addEventListener){
       window.addEventListener('load',init,false);
     }
    else { 
    if(window.attachEvent){
       window.attachEvent('onload',init);
      }
     }
    
    </script>
    
    </head>
    <body>
    
    <form action="#" class="none">
    <div id="container">
     <h1>enter your search item</h1>
     <input type="text">
     <input type="button" value="google">
     <input type="button" value="yahoo">
     <input type="reset" value="clear">
    </div>
    </form>
    
    <div id="frame-holder" class="none">
     <iframe id="fr"></iframe>
    </div>
    
    </body>
    </html>
    

  4. #34
    ralphreyes's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2010
    Posts
    5

    Re: open url from text box? pls help

    wow amazing! thanks again!!

  5. #35
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: open url from text box? pls help

    You're very welcome.

  6. #36
    radbylars's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2010
    Posts
    1

    Re: open url from text box? pls help

    This scripts are incredibly useful to have, Thanks to all for the selfless giving of your time and knowledge. I have a request for help with one as well.

    I'm using this script that was given earlier, with a few modifications:

    Code:
    <script type="text/javascript">
    <!--
    
    window.onload=function() {
       df=document.forms[0];
       df[0].focus();
       df[1].onclick=function() {
    if((isNaN(df[0].value))||(df[0].value=='')) {
       alert('please insert your download code');
       df.reset();
       df[0].focus();
       return;
     }
    location.href=df[0].value+'.zip';
      }
     }
    
    //-->
    </script>
    But now i need to be able to use letters as well as numbers, and the only other one that used letters i saw on here also used predefined codes. I have too many cdes to predefine them all so I need something more simple like I listed above, that can also use letter and not just numbers.

    Thanks

  7. #37
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: open url from text box? pls help

    Hi there radbylars,

    and a warm welcome to these forums.

    If you want numbers then replace this...
    Code:
    
    if((isNaN(df[0].value))||(df[0].value=='')) {
    
    ...with this...
    Code:
    
    if((df[0].value=='') {
    

  8. #38
    CarmenSwart's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2010
    Posts
    5

    Re: open url from text box? pls help

    Hi Coothead!
    U are an absolute lifesaver...you have no idea how many days I have been searching for this script!

    I do have one tiny request...lol....wrt to the script with the domain address is it possible to add a a defined list of numbers that will be forwarded to www.domain.com/xxxx and if it is not in the list to go to a default address?
    Regards Carmen
    Last edited by HTML; 03-08-2012 at 05:23 PM.

  9. #39
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: open url from text box? pls help

    Hi there CarmenSwart,

    and a warm welcome to these forums.

    This thread is rather long and includes various code examples.

    Can you let us know which one you are using so that we can possibly help you further?

  10. #40
    CarmenSwart's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2010
    Posts
    5

    Re: open url from text box? pls help

    Hi, coothead,

    I am referring to this code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">

    <title></title>

    <style type="text/css">

    #container {
    width:195px;
    border:3px double #000;
    padding:10px;
    font-family:sans-serif;
    color:#000;
    background-color:#ccc;
    margin:auto;
    }
    #container h1 {
    margin:0 0 10px 0;
    font-size:1em;
    text-align:center
    }

    </style>

    <script type="text/javascript">

    function init() {

    df=document.forms[0];
    df[0].focus();

    df[1].onclick=function() {
    location.href='https://secure.domain.com/'+df[0].value;
    return;
    }
    }

    if(window.addEventListener){
    window.addEventListener('load',init,false);
    }
    else {
    if(window.attachEvent){
    window.attachEvent('onload',init);
    }
    }

    </script>

    </head>
    <body>

    <form action="#">
    <div id="container">
    <h1>enter your code</h1>
    <input type="text">
    <input type="button" value="OK">
    </div>
    </form>

    </body>
    </html>


    Thanks

  11. #41
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: open url from text box? pls help

    Hi there CarmenSwart,

    I am sorry for not getting back to you sooner but I was unfortunately called away.

    Does this suit your requirements...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    
    <title>untitled document</title>
    
    <style type="text/css">
    
    #container {
        width:200px;
        border:3px double #000;
        padding:10px;
        font-family:sans-serif;
        color:#000;
        background-color:#ccc;
        margin:auto;
     }
    #container h1 {
        margin:0 0 10px 0;
        font-size:1em;
        text-align:center
     }
    
    </style>
    
    <script type="text/javascript">
    
    function init() {
    
     /* edit these values to suit your requirements, making 
        certain that the final value has no trailing comma   */
      
       numbers=[123,456,789,111,12345678];
    
    /*********************************************************/
    
       df=document.forms[0];
       df.reset();
       df[0].focus();
    
    df[1].onclick=function() {
    
    for(c=0;c<numbers.length;c++) {
    if(df[0].value==numbers[c]){
       location.href='https://secure.domain.com/'+df[0].value;
       return df.reset();
      }
     }
       location.href='https://secure.domain.com/';
       return df.reset();
      }
     }
    
     window.addEventListener?
     window.addEventListener('load',init,false):
     window.attachEvent('onload',init);
    
    </script>
    
    </head>
    <body>
    
    <form action="#">
    <div id="container">
    <h1>enter your code</h1>
    <input type="text">
    <input type="button" value="OK">
    </div>
    </form>
    
    </body>
    </html>
    
    

  12. #42
    CarmenSwart's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2010
    Posts
    5

    Question Re: open url from text box? pls help

    Excellent thank you Coothead!
    It worked great! I wonder if you could help with this thread that I posted (http://www.ahfb2000.com/webmaster_he...ad.php?t=12771) it has to do with this same code that you have given me.

    Rgds Carmen

  13. #43
    CarmenSwart's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2010
    Posts
    5

    Re: open url from text box? pls help

    Hi All,

    I have a bit of a long winded request (in my mind anyway) but am sure it can be done.

    I have the following:
    1. One main website with multiple sub domains
    2. One autoresponder with multiple lists. Each list belongs to a sub domain.

    This is how it works:
    Each sub domain has a form, where u can fill in name, email and tel number, and on submit it adds the details to one of the lists <id> specified and then the tracking tag redirects it to the URL specified in the settings of the list.

    BUT, this is what I would like:

    The form will be on the main website with the above fields and an extra field to type in a number. So when the details are filled out and the text field has a specific number typed in, (posted in this forum thread the details are submitted to the correct list and then redirected to the correct sub domain which is determined by the number typed in the text box.

    Here is the form code

    <form method='POST' action='http://www.testdomain.com/cgi-bin/arp3/arp3-formcapture.pl'>
    <div align='center'><center>
    <p>First name<br><input type='text' name='first_name' size='20'></p>
    </center></div>
    <div align='center'><center>
    <p>Last name<br><input type='text' name='last_name' size='20'></p>
    </center></div>
    <div align='center'><center>
    <p>Town or city<br><input type='text' name='city' size='20'></p>
    </center></div>
    <div align='center'><center>
    <p>Phone #1<br><input type='text' name='phone1' size='20'></p>
    </center></div>
    <div align='center'><center>
    <p>E-mail address<br><input type='text' name='email' size='20'></p>
    </center></div>
    <input type='hidden' name='subscription_type' value='E'><div align='center'><center>
    <p><input type='submit' value='Go »'></p>
    </center></div>
    <input type='hidden' name='tracking_tag' value='headofficeweb'>
    <input type='hidden' name='id' value='1'>
    </form>


    Shoo, hope it makes sense.

    I hope someone can help.

    Rgds

    Carmen
    Last edited by HTML; 03-09-2012 at 08:47 AM.

  14. #44
    bradylars's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2011
    Posts
    3

    Re: open url from text box? pls help

    I've been using this script and it's been working great but some people are plagued with errors, and i can't put my finger on it, partly becuase I don't have access to and windows machines running 7 to test against it. So hopefully someone can help shed some light on this.

    the script in operation is found here, 1photo.com, click the blue download button and try test code 001. It always works perfectly for me. I suppose it is possible that it may work better for some people if it wasn't in a lightbox style popup window. Any ideas?

    Heres one reported error:

    Webpage error detailsUser Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MAAU; .NET4.0C)Timestamp: Mon, 7 Mar 2011 02:45:17 UTCMessage: Expected identifier, string or numberLine: 103Char: 3Code: 0URI: http://www.1photo.com/Message: Object doesn't support this property or methodLine: 61Char: 1Code: 0URI:http://www.1photo.com/Message: Object doesn't support this property or methodLine: 61Char: 1Code: 0URI: http://www.1photo.com/Message: Object doesn't support this property or methodLine: 61Char: 1Code: 0URI: http://www.1photo.com/
    and here's my script:
    <script type="text/javascript">
    <!--

    window.onload=function() {
    df=document.forms[0];
    df[0].focus();
    df[1].onclick=function() {
    if(df[0].value=='') {
    alert('please insert your download code');
    df.reset();
    df[0].focus();
    return;
    }
    location.href=df[0].value+'.zip';
    }
    }

    //-->
    </script></head>

    <body>
    <div class="centered" id="dlmain">
    <p>&nbsp;</p>
    <p>If you've purchased a digital image, and received your download code then your image is ready for you!
    </p>
    <p>Just type in your case sensitive code below and click OK.<br />
    Your download will begin immediately.</p>
    <form action="#">
    <div id="container">
    <p class="style59"><span class="codefont">Enter download code:<br />
    <br />
    </span>
    <input type="text" id="codebox" maxlength="30"/>
    <input name="codebutton" type="button" id="codebutton" value="OK"/>
    </p>
    </div>
    </form>
    <p>If you haven't yet received your download code then we must still be getting your image ready, thanks for your patience.<br />
    <br />
    Click the X below to close the window. </p>
    <p>&nbsp;</p>
    </div>
    </body>
    Thanks for any help I'm in a real bind here.
    Last edited by HTML; 03-09-2012 at 08:47 AM.

  15. #45
    lasko's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2011
    Posts
    16

    Re: open url from text box? pls help

    Sorry if I'm resurrecting an old thread. I came across this older thread during an internet search and was hoping someone (preferably coothead) could help me customize the script he posted for CK Productions in post #11 on page 2 of this thread (I can't post a quote or a link because I'm a newbie).

    I'd like to replace the "OK" button with an image. I'd also like for the page to load in an iframe. And is there any way to make the page load without clicking the "OK" button? I tried typing in a page name and just hitting the enter key on my keyboard, but it doesn't seem to work. It only works when I manually click the "OK" button.

    Thanks.
    Last edited by lasko; 06-25-2011 at 02:32 AM.



Page 3 of 5 First 1 2 3 4 5 Last

Tags for this Thread