PDA

View Full Version : Mini-Browser with pure html...?



Josh_R
10-27-2005, 08:15 PM
<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?

jscheuer1
10-28-2005, 03:26 AM
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:


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

Josh_R
10-28-2005, 01:41 PM
ah, many thanks :)