Click to See Complete Forum and Search --> : problem with frames


Calmaris
01-08-2004, 11:19 PM
My page consists of 2 frames I have a jukebox on the top frame which plays music of the user's choice. The user navigates the site from the bottom frame but everytime you change pages it makes another instance of music and it keeps building till your playing 10 songs at once! How can I make it so that the user doesn't reload the top frame everytime they switch pages on the other frame?

Paul Jr
01-08-2004, 11:22 PM
A link or some code would be most helpful.

Calmaris
01-08-2004, 11:25 PM
<<<<<<<<<<<<This is the top frame:>>>>>>>>>>>
I haven't used frames in a long while so bear with me here!
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
<embed src="<%=Music%>" autostart ="true" loop="False" width="1" height="1">
</head>
<body>
<% response.write(Music)%>
</body>
</html>
<form method="Post" action="Music.aspx">
<select size="1" name="Music" >
<option selected>None</option>
<option>music/hellmarch2.mp3</option>
<option>music/toxicity.mp3</option>
<option>music/alice in chains-rooster.mp3</option>
<option>music/Metalica-I dissapear.mp3</option>
<option>music/Alice In Chains - Man In The Box.mp3</option>
<option> Creed - My Own Prison.mp3</option>
</select>
<input type="Submit" value="Put it On!!">
</form>

<<<<second fram>>>>>>>>>>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Logged_Home</title>
</head>
<body>
Who is logged on:
<%
DO WHILE NOT online.EOF
recordsetDB = server.createObject("ADODB.recordset")
recordsetDB.Open (online)
response.write (online ("User_Id").value)
response.write(",")
online.MoveNext
Loop
%>
<br>

<br>
THIS WILL BE THE MAIN PAGE!

<br>
<p>
Welcome
<%response.write(Session_UserId)%> <p>
This is if you are currently logged on: <%
If (rs("offlinenow").value) = False Then
response.write("You are currently logged in")
else
response.write("You are currently logged off")
end if

%>
<p>
<a href="User_Account.aspx">Your Account</a>&nbsp; (Just starting this
now...registration, smiles,passes,messages&nbsp; can be accessed from here and
now a jukebox!)<p></p>
<p><a href="log_Out.aspx" >Log Off</a></p>
<p><a href="View_Members.aspx?User_ID=<% response.write(User_Id)%>&Password=<%=Password%>">View who has signed up!</a> &lt;----Check out other
peoples profiles!</p>
<p><a href="Chat/Default.asp">Go and chat!</a>&nbsp;&nbsp; &lt;---LOL ya right
wouldn't we all! Be awhile before I figure that out!</p>
<p><a href="Home_Logged.aspx">click here to open jukebox</a></p>
<p>NOTICES:</p>
<p>When you log in you create a session specific to you. This session is set
to expire after 5 minutes, which means you will have to log in again, the
reason for this is because I'm not rich and can't afford a better server, and
too many sessions going on at once bogs my computer down.</p>
<p>Also if something doesn't work it's more than likely because I'm working on
that part at that moment and screwing it up by trying to make it better so
don't panic. This site won't look nice for a long while because my artistic
abilities consist of drawing stick figures. If your a graphics designer...I
would fall in love with you...if you helped me make this site look better :)
If you have any ideas for me on this that you would like on here send me a
message on MSN. My email is Calmaris@hotmail.com</p>
</body>
</html>

jochem
01-08-2004, 11:25 PM
When you navigate through your site, what exactly changes? Is the whole page being renewed or just the bottom frame? If all changes, the targeting may be set wrong.

Think of something like <base target="Bottom">

Cheers, Jochem :cool:

Calmaris
01-09-2004, 12:02 AM
Well the both frames are being reloaded that's why the music keeps building instances upon itself. I only need it to be loaded once(Top frame) so only one instance of the music is playing throughout.

jochem
01-09-2004, 12:41 AM
In your frameset, add target="_self" to your bottom frame.

Cheers, Jochem :cool:

Calmaris
01-09-2004, 01:00 AM
It doesn't seem to be working...is this where you meant to put it? You have to bear with me on this I've never really used frames before.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>

<frameset rows="308,*">
<frame name="header" scrolling="no" noresize target="main" src="navigation.aspx">
<frame name="main" target="_self" src="Logged_Home.aspx">
<noframes>
<body>

<p>This page uses frames, but your browser doesn't support them.</p>

</body>
</noframes>
</frameset>

</html>

jochem
01-09-2004, 01:03 AM
OK, try adding target="Main" to the links in your menu.

jochem
01-09-2004, 01:04 AM
By the way, I am surprised that you are using asp.net in combination with Frontpage!?!

Why use frames in the first place? Check out this thread to learn how to use CSS + asp includes http://forums.webdeveloper.com/showthread.php?s=&threadid=22864.

Cheers, Jochem :cool:

Calmaris
01-09-2004, 01:15 AM
Ya go figure eh! I know a good deal of asp.net and classic asp but not much of frames or html in dept for that matter.
Well it didn't work with the target="main" in my links in opened up a new window and the dam music started another instance! any other ideas...do you need to see more code? those 3 pages I showed you were pretty much everthing.

jochem
01-09-2004, 01:19 AM
Hmm... I'm too damn tired to come up with any clever ideas right now. I'd just considder to go with the CSS technique described in the thread above. It's realy simple and a lot better than frames. And it works with asp.net too.

Cheers, Jochem :cool: