Christian271
06-17-2008, 03:22 AM
I'm trying to make a script for a button that goes to the top of another frame but it's not working and I can't find why. Here's the code (I think the problom is in the last onClick),
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>My Toolbar</title>
<body background=images/bg.jpg>
</head>
<form name="toolbar">
| <select name="search">
<option value="http://www.">url</option>
<option value="http://www.google.com/search?hl=en&q=">Google</option>
<option value="http://www.ask.com/web?qsrc=167&o=0&l=dir&q=">Ask</option>
<option value="http://search.yahoo.com/search;_ylt=A0oGkle.AVdI0j8B7tlXNyoA?p=">Yahoo!</option>
<input name="urlinput">
<input type="button" value="Go"
onClick="parent.content.location.href = toolbar.search.value + toolbar.urlinput.value">
<input type="button" value="Top"
onClick="parent.content.scrollTo(0,0)">
</form>
</html>
and here's the code for the page that loads it,
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>My Toolbar</title>
</head>
<frameset rows="28,*">
<frame src="my_toolbar.htm" scrolling=no marginwidth=0 marginheight=0>
<frame src="http://therealmers.divinusdies.net" name="content">
</frameset>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>My Toolbar</title>
<body background=images/bg.jpg>
</head>
<form name="toolbar">
| <select name="search">
<option value="http://www.">url</option>
<option value="http://www.google.com/search?hl=en&q=">Google</option>
<option value="http://www.ask.com/web?qsrc=167&o=0&l=dir&q=">Ask</option>
<option value="http://search.yahoo.com/search;_ylt=A0oGkle.AVdI0j8B7tlXNyoA?p=">Yahoo!</option>
<input name="urlinput">
<input type="button" value="Go"
onClick="parent.content.location.href = toolbar.search.value + toolbar.urlinput.value">
<input type="button" value="Top"
onClick="parent.content.scrollTo(0,0)">
</form>
</html>
and here's the code for the page that loads it,
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>My Toolbar</title>
</head>
<frameset rows="28,*">
<frame src="my_toolbar.htm" scrolling=no marginwidth=0 marginheight=0>
<frame src="http://therealmers.divinusdies.net" name="content">
</frameset>
</html>