Results 1 to 3 of 3

Thread: Mini-Browser with pure html...?

  1. #1
    Join Date
    Sep 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Mini-Browser with pure html...?

    Code:
    <form><input type=text Value="Type a URL Here" onclick="value=''" 
    
    name="url"><button 
    
    onclick="iframe.document.location='function.(url)value'">Go!</button><br>
    <iframe src="about:blank" height=500 width=650 
    
    name="iframe"></iframe></form>
    what i would like to know... is if i can use the contents (url) of the text box to be displayed within the iframe when the go button is clicked, but im a bit stumped here... any help?
    Last edited by Josh_R; 10-27-2005 at 08:43 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your example isn't pure HTML to begin with, it uses javascript for the events. Here is a spruced up version that works in FF, Opera, and IE:

    Code:
    <form>
    <input type="text" value="Type a URL Here" onfocus="if(typeof foc=='undefined'){this.value='';foc=1}" name="url" />
    <input type="button" onclick="iframe.location.href=this.form.url.value" value="Go!" /><br />
    <iframe src="about:blank" height="500" width="650" name="iframe"></iframe>
    </form>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ah, many thanks

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
  •