www.webdeveloper.com
Results 1 to 2 of 2

Thread: load url javascript code question

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    29

    load url javascript code question

    I have two issues can an alert be fired

    prior or can a target be used




    <script type="text/javascript">


    function get(eid) {


    var d = document;


    var r = d.getElementById(eid);


    return r;


    }


    function loadUrl(){


    var url = get('url').value;


    get('urlView').src = url;


    }


    </script>


    <form>


    <input type="text" id="url" />


    <input type="button"
    value="Submit"
    onclick="loadUrl();" />


    </form>




    <iframe id="urlView" scrolling="no" width="200" height="100" align="center" frameborder="0" src=""></iframe>

  2. #2
    Join Date
    Mar 2005
    Location
    Behind you...
    Posts
    743
    I'm not sure what your question is, your code seems fine and works. What do you need to fire an alert() for? Also please use code tags when pasting source code.
    "Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespeare?"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles