сесия frame

vesku

Registered
имам един сайт който момента го правя
та въпроса ми е имам един frame и вав него се създава сесия но извън frame нея я няма
 
Ами, ако искаш да можеш да скролваш сложи един DIV tag със скрол и между
<div> и </div> дай include на файла.

Ето кода за 1 вия DIV:
Код:
<div style="overflow:auto; width:100px; height:200px;" >

Само трябва да си нагласиш височина и ширина
 
нещо не схващам тоя номер
ето кода
ама нз как да направя това което каза
Код:
<head>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>

<table align="center" width="800" height="100" border="1">
<tr>
<td align="center"> </td>
</tr>
</table>

<table align="center" width="800" border="1">
<tr>
<td valign="top" align="center" width="150" height="410">
<div align="center" id="layer1">
<p style="margin-top: 0; margin-bottom: 0">Menu
</p>
<hr width="95%">
<p align="left" style="margin-top: 0; margin-bottom: 0">
<?php if(!isset($_SESSION['username'])){echo ' <a target="I1" href="register.html">Register</a><br>
 <a target="I1" href="login.html">Login</a><br> ';}?>
 <a target="I1" href="messages.php">Private Message</a><br>
 <a target="I1" href="members.php">Members</a><br>
 <a target="I1" href="changepassword.php">EditProfile</a><br>
 <a target="I1" href="lesson.php">Lessons</a><br>
 <a target="I1" href="addlesson.php">AddLesson</a>
<?php if(isset($_SESSION['username'])){echo '<br> <a target="I1" href="logout.php">Logout</a>';}?></p>
<hr width="95%">
<p style="margin-top: 0; margin-bottom: 0">Banners
</p>
<hr width="95%">
</div>
</td>

<td align="center" valign="top" width="500">
<p style="margin-top: 0; margin-bottom: 0">
<script type="text/javascript">

</script> 

<iframe name="I1" width="496" height="396" src="index2.html"></iframe></td>

<td valign="top" align="center" width="150">
<p style="margin-top: 0; margin-bottom: 0">Surveys</p>
<hr width="95%">
<FORM ACTION="vote.php" target="I1" METHOD="POST">
<p align="center" style="margin-top: 0; margin-bottom: 0">Your Browser Is</p>
<p align="left" style="margin-top: 0; margin-bottom: 0">	
<br><INPUT TYPE="radio" NAME="vote" VALUE="a" checked>
Firefox
<br><INPUT TYPE="radio" NAME="vote" VALUE="b">
Internet Explorer
<br><INPUT TYPE="radio" NAME="vote" VALUE="c">
NetScape
<br><br>
          
<INPUT TYPE="submit" VALUE="Vote">
</p>
</form>
<p style="margin-top: 0; margin-bottom: 0">  </td>
</tr>
</table>

<table align="center" width="800" height="50" border="1">
<tr>
<td align="center"></td>
</tr>
</table>
 
BTW ... защо файла във фрейма е html ? :shock:

Ето кода:
Код:
<head>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>

<table align="center" width="800" height="100" border="1">
<tr>
<td align="center"> </td>
</tr>
</table>

<table align="center" width="800" border="1">
<tr>
<td valign="top" align="center" width="150" height="410">
<div align="center" id="layer1">
<p style="margin-top: 0; margin-bottom: 0">Menu
</p>
<hr width="95%">
<p align="left" style="margin-top: 0; margin-bottom: 0">
<?php if(!isset($_SESSION['username'])){echo ' <a target="I1" href="register.html">Register</a><br>
 <a target="I1" href="login.html">Login</a><br> ';}?>
 <a target="I1" href="messages.php">Private Message</a><br>
 <a target="I1" href="members.php">Members</a><br>
 <a target="I1" href="changepassword.php">EditProfile</a><br>
 <a target="I1" href="lesson.php">Lessons</a><br>
 <a target="I1" href="addlesson.php">AddLesson</a>
<?php if(isset($_SESSION['username'])){echo '<br> <a target="I1" href="logout.php">Logout</a>';}?></p>
<hr width="95%">
<p style="margin-top: 0; margin-bottom: 0">Banners
</p>
<hr width="95%">
</div>
</td>

<td align="center" valign="top" width="500">
<p style="margin-top: 0; margin-bottom: 0">
<script type="text/javascript">

</script>
<div style="overflow:auto; width:496px; height:396px;" >
<?php
include "index2.html";
?></td>

<td valign="top" align="center" width="150">
<p style="margin-top: 0; margin-bottom: 0">Surveys</p>
<hr width="95%">
<FORM ACTION="vote.php" target="I1" METHOD="POST">
<p align="center" style="margin-top: 0; margin-bottom: 0">Your Browser Is</p>
<p align="left" style="margin-top: 0; margin-bottom: 0">   
<br><INPUT TYPE="radio" NAME="vote" VALUE="a" checked>
Firefox
<br><INPUT TYPE="radio" NAME="vote" VALUE="b">
Internet Explorer
<br><INPUT TYPE="radio" NAME="vote" VALUE="c">
NetScape
<br><br>
          
<INPUT TYPE="submit" VALUE="Vote">
</p>
</form>
<p style="margin-top: 0; margin-bottom: 0">  </td>
</tr>
</table>

<table align="center" width="800" height="50" border="1">
<tr>
<td align="center"></td>
</tr>
</table>
 
Не ги отваря във фрейм.
Отваря ги в див, но има сесия.
Google мрази фреймове.
Защо искаш да е с iframe ? :roll:
 
Здравей!

Нямам много опит в използването на сесии, но защо не опиташ да прехвърляш сесийната променлива от главния прозорец към фрейма? Мисля, че много по-лесно би могъл да включваш сесия в основната страница и така да я предаваш, отколкото да се мъчиш да направиш обратното. Все пак главната страница е с приоритет над тези, които се отварят във фреймове (поне когато ги чете браузъра, а това значи че и заявките към сървъра ще се отправят в този ред) :D

Пример (с обикновена променлива):

Фрейма:

<FRAMESET COLS="100%" BORDER=0>
<FRAME NAME="cel" SRC="openstr.php?a=dryn" SCROLLING="auto" TARGET="cel">
</FRAMESET>

А в страницата, която ще се зареди в прозореца проверяваш стойността на променливата, която си изпратил и ако е правилната включваш сесия.

Ако нещо не съм разбрал правилно, извинявай. Това е. Струва ми се, че логически е издържано, дано да ти върши работа обаче.

ПП: Виждам, че си решил проблема, за новия мисля, че ще ти е нужен Javascript...
 

Back
Горе