Jump to content

set startup page with iframe


WesleyA

Recommended Posts

Hi,

 

I'm making a menu script with several options. With ul and li.

 

The script works but I cant find a way to have a start up page or so selected. What happens now is that the last chosen page is showing in the browser unless < a href "somepage"> is used and targeted in the obtained name attribute.

    <ul class="slideuptabs">
    <li><a href="http://localhost/MyLocation/home.php"  target="lcell"><span>Home</span></a></li>
    <li><a href="http://localhost/MyLocation/home2.php" target="lcell"><span>Home2</span></a></li>
    <li><a href="http://localhost/MyLocation/home3.php" target="lcell"><span>Home3</span></a></li>     
    <li><a href="http://localhost/MyLocation/home4.php" target="lcell"><span>Home4</span></a></li>   
  <li><a href="http://localhost/MyLocation/home5.php" target="lcell"><span>Home5</span></a></li>    
 <li><a href="http://localhost/MyLocation/home6.php" target="lcell"><span>Home6</span></a></li>     </ul>
     <br><br>
     <table  class = "maincell" border="2" cellpadding="2" cellspacing="2">
     <tbody>
     <tr>
      <td class="lcell" name ="lcell"><iframe src=" " name="lcell" width="99%" height="99%" framebo       rder="0"> </iframe>
      </td>
      <td class="rcell" name ="rcell"><iframe src=" " name="rcell" width="99%" height="99%" framebo       rder="0"> </iframe><br>
       </td>
     </tr>
      </tbody>
      </table>

Is there a solution do this at loading the site or frame page?

 

Can it be done in html or should I use another language? .

Edited by WesleyA
Link to comment
Share on other sites

That doesnt work for me. I can choose one of the menu options but then I only choose the value in the name attribute: lcell. The rcell doesnt change automatically.

 

How is this done?

 

With html or PHP?

 

I would like to find some answers to this.

Link to comment
Share on other sites

DON'T CHANGE YOUR ORIGINAL POST SO MUCH THAT IT MAKE FOLLOWING POSTS obsolete!

 

Remove name attribute from td elements, that is ridiculous since the main point is to target the iframe.

 

IF this page is the home page name IT index.html or if using php code within this page or you wish use php extension use index.php these are usually the first default page looked for first followed by default.* pages.

 

IF the home.php link IS supposed to be this! page, DON'T TARGET THE iframe, do a normal link which will reopen itself! the index.* page. But! You will have to set the src of iframe to home.php.

 

So index.* page will open and home.php will open in in iframe, user selects other links otherthan index.* link, it will show that page in iframe, if user clicks index.* page this page will reload and again show page predefined in src of iframe i.e home.php.

Link to comment
Share on other sites

I think it isnt necesssary to show that with code. It are just pages.

 

Like when I click on home the lcell is targeted. So there the page changes.

 

The rcell remains the same.

 

I would like to change it automatically. Is there an html element or attribute to change it? Can I use PHP? Or do I have to use javascript, like onLoad?

 

Please I would like to know that I'm not sure what language and code to choose.

Link to comment
Share on other sites

I was thinking about using javascript onLoad. I think it will work, but I would like to know if PHP also offers a solution to make a page load and call it from another page.

 

It is not easy to give an exact script, because there might be more solutions. It could be the solution is html or javascript, but I hope for PHP.

 

So is it possible to do onLoad and target a page in a specific frame with PHP?

Link to comment
Share on other sites

I think it isnt necesssary to show that with code. It are just pages.

 

Like when I click on home the lcell is targeted. So there the page changes.

 

The rcell remains the same.

 

I would like to change it automatically. Is there an html element or attribute to change it? Can I use PHP? Or do I have to use javascript, like onLoad?

 

Please I would like to know that I'm not sure what language and code to choose.

 

About as clear as tax evading starbucks coffee, so you don't want to supply code for rcell because it never changes, but you want to know if rcell can be changed with php or javascript on onload event? Is what i just read :-s

Link to comment
Share on other sites

About as clear as tax evading starbucks coffee, so you don't want to supply code for rcell because it never changes, but you want to know if rcell can be changed with php or javascript on onload event? Is what i just read :-s

 

To speak the truth: I dont have any code for rcell.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...