I'm new to this

admin

Administrator
Staff member
Hi all,<br />
I hope I can get some help. I am doing a web page to access a database, but right now my main problem is I have a frame and I want to click either one of three buttons and when the buttonis clicked it will display the new page in the right side larger frame.<br />
<br />
Here is my code<br />
<html><br />
<br />
<head><br />
<title>New Page 1</title><br />
<br />
<SCRIPT language="JavaScript"><br />
<!----hide<br />
function login()<br />
{<br />
parent.Main.location="login.asp";<br />
}<br />
<br />
function main()<br />
{<br />
parent.Main.location="mainview.asp?user=guest";<br />
}<br />
<br />
function home()<br />
{<br />
parent.main.location="home.html";<br />
}<br />
<br />
//------><br />
</Script><br />
</HEAD><br />
<br />
<Body bgcolor=darkblue> <br />
<center><br />
<br><br><br><br />
<A HREF=http://www.htmlforums.com/archive/index.php/"javascript:login()"><img src="login.gif" width="50" height="50"></a><br><br><br><br />
<br><br />
<A HREF=http://www.htmlforums.com/archive/index.php/"javascript:main()"><img src="Guest.gif" width="50" height="50"></a><br><br><br><br />
<br><br />
<A HREF=http://www.htmlforums.com/archive/index.php/"javascript:home()"><img src="home.gif" width="50" height="50"></a><br><br />
<br />
<br />
</body><br />
</html><br />
<br />
On the first function, if I take out parent the page is displayed on the left side of the page or the left frame which I have set to 25%. <br />
<br />
when I keep the parent.main in i get an error. the error i get is "parent.main" ia not null or is not an object.<br />
<br />
Any ideas what I am doing wrong?<!--content-->OK I figured out the first two functions. I named the frame wrong. Anyways when i hit the login button the login page shows as well as teh guest page, but when I hit the main home button another identical instead of taking me back to the main page. Any ideas?<!--content-->make sure the names are correct<br />
<br />
parent.main.location="home.html"; <br />
<br />
notices you had some capitols and some not.<!--content-->I have the firsttwo buttons figured out, but still can't figure out why i get a new duplicte frame when I hit the home button. Any suggestions. The code is the same as above except that I changed the main to home i.e. parent.home.location="home.html"; when i hit the home button that is when i get duplicate frame's.<!--content-->sorry all I got it. Thanks to those who helped out. Much appreciated.<!--content-->
 
Back
Top