View Full Version : problom whith going to the top of the frame

06-17-2008, 04: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),


<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>My Toolbar</title>
<body background=images/bg.jpg>

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

and here's the code for the page that loads it,

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>My Toolbar</title>
<frameset rows="28,*">
<frame src="my_toolbar.htm" scrolling=no marginwidth=0 marginheight=0>
<frame src="http://therealmers.divinusdies.net" name="content">

06-17-2008, 01:04 PM
You can not javascript control a page loaded in a frame/iframe which does not belong to the same domain as the parent.

06-17-2008, 08:42 PM
So there's no way to make the fame scroll to the top?:(

Thanks for your help!:D