Jump to content

i frame In PHP


mviben

Recommended Posts

Hi guys, im ready good with html but im trying to help a friend with a problem with some php but my knowleage of this isnt as good.

 

Currently have this example of what hes trying to do ....

 

http://www.myvideoi.com/index1.php

 

he wants it so when u click on a tab it stays white.

 

and When the page is opened all the sites linked to the tab is also opened simultaneaously. This will slow down the page loading. Make sure the underlying site is opened only when the tab page is clicked.

 

Can Anyone help

 

cheers

Link to comment
https://forums.phpfreaks.com/topic/109121-i-frame-in-php/
Share on other sites

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">

 

<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD>

 

<TITLE>Iframe thing</TITLE>

 

<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">

 

<STYLE type=text/css>

 

BODY {

 

  FONT: 100% verdana, arial, sans-serif; BACKGROUND-COLOR: #fff

 

}

 

UL#tabnav {

 

  MARGIN: 50px;

 

  PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 3px; MARGIN: 1em 0px; FONT: bold 11px verdana, arial, sans-serif;

 

  PADDING-TOP: 3px; BORDER-BOTTOM: #444 1px solid; LIST-STYLE-TYPE: none; TEXT-ALIGN: left

 

}

 

UL#tabnav LI {

 

  DISPLAY: inline

 

}

 

BODY#tab1 LI.tab1 {

 

  BORDER-BOTTOM: #fff 1px solid; BACKGROUND-COLOR: #fff

 

}

 

BODY#tab2 LI.tab2 {

 

  BORDER-BOTTOM: #fff 1px solid; BACKGROUND-COLOR: #fff

 

}

 

BODY#tab3 LI.tab3 {

 

  BORDER-BOTTOM: #fff 1px solid; BACKGROUND-COLOR: #fff

 

}

 

BODY#tab4 LI.tab4 {

 

  BORDER-BOTTOM: #fff 1px solid; BACKGROUND-COLOR: #fff

 

}

 

BODY#tab1 LI.tab1 A {

 

  COLOR: #000; PADDING-TOP: 4px; POSITION: relative; TOP: 1px; BACKGROUND-COLOR: #fff

 

}

 

BODY#tab2 LI.tab2 A {

 

  COLOR: #000; PADDING-TOP: 4px; POSITION: relative; TOP: 1px; BACKGROUND-COLOR: #fff

 

}

 

BODY#tab3 LI.tab3 A {

 

  COLOR: #000; PADDING-TOP: 4px; POSITION: relative; TOP: 1px; BACKGROUND-COLOR: #fff

 

}

 

BODY#tab4 LI.tab4 A {

 

  COLOR: #000; PADDING-TOP: 4px; POSITION: relative; TOP: 1px; BACKGROUND-COLOR: #fff

 

}

 

UL#tabnav LI A {

 

  BORDER-RIGHT: #444 1px solid; PADDING-RIGHT: 4px;

 

  BORDER-TOP: #444 1px solid; PADDING-LEFT: 4px; PADDING-BOTTOM: 3px; BORDER-LEFT: #444 1px solid;

 

  COLOR: #222;

 

  MARGIN-RIGHT: 0px; PADDING-TOP: 3px; BORDER-BOTTOM: #444 1px; BACKGROUND-COLOR: #C2D5FF; TEXT-DECORATION: none

 

}

 

UL#tabnav A:hover {

 

  BACKGROUND: #fff

 

}

 

UL#tabnav A:click {

 

  BACKGROUND: #fff

 

}

 

</STYLE>

 

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

 

</HEAD>

 

<BODY id=tab1>

 

<UL id=tabnav width="100%">

 

<!--  <LI id='tab2' class=tab2><A href="#" onClick="getElementById('ifr').src='http://www.rediff.com';">Tab One</A>

 

  <LI id='tab2' class=tab2><A href="#" onClick="getElementById('ifr').src='http://www.sify.com'; ">Tab Two</A> -->

 

<LI id='tab2' class=tab2><A href="#" onClick="$('#ifr1').show(0); $('#ifr2').hide(0); return false;">Tab One</A>

<LI id='tab2' class=tab2><A href="#" onClick="$('#ifr2').show(0); $('#ifr1').hide(0); return false;">Tab Two</A>

 

 

 

</UL>

 

<iframe id="ifr1" frameborder="none" name="ifr1"  width="100%" style="border:none; margin:0px;" src="http://www.rediff.com"  scrolling="auto" height="600"></iframe>

 

<iframe id="ifr2" frameborder="none" load name="ifr2" width="100%" style="display:none; border:none; margin:0px;" src="http://www.sify.com" scrolling="auto" height="600"></iframe>

 

 

 

<script LANGUAGE="JavaScript">

 

<!--

 

$('#ifr2').hide(1);

 

-->

 

</script>

 

</BODY></HTML>

 

 

Link to comment
https://forums.phpfreaks.com/topic/109121-i-frame-in-php/#findComment-559751
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.