working browser like navigation bar. coding help needed

liunx

Guest
basically what I wanna do is set up a frame that runs horizontally along the top. it will have a back button, a forward button, stop, refresh, a text box for url's, and a go button. all these will control the frame on the bottom. reason for me needing this is cuz i play a game called Microsoft Flight SImulator 2004. and there has been a very easy tip out now where there is an ingame kneeboar which holds various info. the tip allows you to change one page around however you want. so I want to be able to access any page I want with ease from this system wile im flying.<!--content-->it will have to be frames.<!--content-->well, duh I know that. :rolleyes: im just stuck on how I would go about coding the buttons and url box.<!--content-->yeah you said that already huh :P<br />
<br />
back button<br />
<input type="button" onclick="history.go(-1)" value="Back"><br />
<br />
a forward button <br />
<input type="button" onclick="history.go(1)" value="Forward"><br />
<br />
stop<br />
<input type="button" onclick="" value="Stop"><br />
<br />
refresh <br />
<input type="button" onclick="document.refresh()" value="Refresh"><br />
<br />
a text box for url's, and a go button<br />
all depends on what search engine you want to use or what you plan on submiting.<br />
<br />
I am not sure about a stop button.<!--content-->ok. basically the text box will hold a url and when a person clicks go, the url in the textbox will be shown in the frame below. also, how would I go about getting these to target a specific frame and not its own?<!--content-->back button<br />
<input type="button" onclick="document.frame_name.history.go(-1)" value="Back"><br />
<br />
a forward button <br />
<input type="button" onclick="document.frame_name.history.go(1)" value="Forward"><br />
<br />
stop<br />
<input type="button" onclick="" value="Stop"><br />
<br />
refresh <br />
<input type="button" onclick="document.frame_name.refresh()" value="Refresh"><br />
<br />
a text box for url's, and a go button<br />
<form name="form_name"><br />
<input type="text" name="url" value=""><br />
<input type="button" onclick="document.frame_name.location=this.form_name.url" value="Submit"><br />
</form><br />
<br />
<br />
well not sure if the last one wil work but you can try it.<!--content-->nope. all buttons are giving me a "'document.main.history' is null or not an object" error.<!--content-->you have to have history there first<!--content-->i did. the main view loads a page which has a couple links related to flight simulator. loaded one and clicked a couple links within it. it still does the error. and I tested this outside the game in normal IE btw.<!--content--><input type="button" onclick="parent.main.history.go(-1)" value="Back"><br />
<br />
<br />
<input type="button" onclick="parent.main.history.go(1)" value="Forward"><br />
<br />
<br />
<input type="button" onclick="" value="Stop"><br />
<br />
<br />
<input type="button" onclick="parent.main.refresh()" value="Refresh"><br />
<br />
<br />
<form name="form_name"><br />
<input type="text" name="url" value=""><br />
<input type="button" onclick="parent.main.location=(document.form_name.url.value)" value="Submit"><br />
</form><!--content-->back and forward work, but refresh and go still give errors.<br />
<br />
ok. guess I missed some things. I fixed the address bar form code to exactly how you have it and it works now. only thing left is refresh. and even at that, its not a very big problem.<br />
<br />
p.s. by any chance is there a code i can use that will keep the links contained in the bottom frame instaed of popping up in new windows?<!--content-->works for me.<br />
<br />
you hav eto do the full url, including the <!-- m --><a class="postlink" href="http://">http://</a><!-- m --><!--content--><input type="button" onclick="parent.main.location.reload()" value="Refresh"><br />
<br />
that is the only one that didn't and now it does.<br />
<br />
so it all works for me now, excpet the stop which I don't think you can do.<!--content-->Originally posted by Vchat20 <br />
p.s. by any chance is there a code i can use that will keep the links contained in the bottom frame instaed of popping up in new windows? <br />
set the target in the link.<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"file.html" target="frame_name"> link</a><br />
<br />
but on other sites you can't<!--content-->
 
Back
Top