PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 12th, 2009, 01:35 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,293 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 18 h 36 m 30 sec
Reputation Power: 4
Send a message via AIM to LLX Send a message via Yahoo to LLX
php5 - Iframes and sqlcontent

For the admin side of a project some of the content is so long that it scrolls forever. Since this is just the display of the index i want to make it smaller so admins can find the specific entry they want to edit.

So basicly i want to have a Iframe for the long content to load into but the long content isn't a seperate html page just a mysql data pull any way i can load that data dynamicly into a iframe?
__________________
29 years of creative writing
13 years of HTML
10 years of Photoshop
6 years of PHP/MySQL
And I never knew Photoshop could do HTML until 2004!
You learn something new every day.

Reply With Quote
  #2  
Old October 12th, 2009, 02:12 PM
MatthewJ MatthewJ is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2007
Location: Davenport, Iowa
Posts: 633 MatthewJ User rank is Private First Class (20 - 50 Reputation Level)MatthewJ User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 22 h 11 m 29 sec
Reputation Power: 3
I think you could just wrap that part of the content with div tags, set a height on them, then set overflow to auto on the div... that will lock the div height, and add a scroll bar for anything longer. Effectively the same as an iframe.

Quick Example

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#scrolling {
	height: 200px;
	overflow: auto;
}
</style>
</head>

<body>
<p>Just a test</p>
<div id="scrolling">
  <table border="0" cellspacing="0" cellpadding="0" width="600">
    <tbody>
      <tr>
        <td align="left"><p>The Bill of Rights: A Transcription</p>
          <p>The Preamble to The Bill of Rights</p>
          <p><strong>Congress of the United States</strong><br />
            begun and held at the City   of New-York, on<br />
            Wednesday the fourth of March, one thousand seven hundred and   eighty nine.</p>
          <p><strong>THE</strong> Conventions of a number of the States, having at the   time of their adopting the Constitution, expressed a desire, in order to prevent   misconstruction or abuse of its powers, that further declaratory and restrictive   clauses should be added: And as extending the ground of public confidence in the   Government, will best ensure the beneficent ends of its institution.</p>
          <p><strong>RESOLVED</strong> by the Senate and House of Representatives of the   United States of America, in Congress assembled, two thirds of both Houses   concurring, that the following Articles be proposed to the Legislatures of the   several States, as amendments to the Constitution of the United States, all, or   any of which Articles, when ratified by three fourths of the said Legislatures,   to be valid to all intents and purposes, as part of the said Constitution;   viz.</p>
          <p><strong>ARTICLES</strong> in addition to, and Amendment of the Constitution   of the United States of America, proposed by Congress, and ratified by the   Legislatures of the several States, pursuant to the fifth Article of the   original Constitution.</p>
          <p><strong>Note</strong>: The following text is a transcription of the first ten   amendments to the Constitution in their original form. These amendments were   ratified December 15, 1791, and form what is known as the "Bill of Rights."</p>
          <hr size="1" noshade="noshade" />
          <p><a name="1" id="1"></a>Amendment I</p>
          <p>Congress shall make no law respecting an establishment of religion, or   prohibiting the free exercise thereof; or abridging the freedom of speech, or of   the press; or the right of the people peaceably to assemble, and to petition the   Government for a redress of grievances.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="2" id="2"></a>Amendment II</p>
          <p>A well regulated Militia, being necessary to the security of a free State,   the right of the people to keep and bear Arms, shall not be infringed.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="3" id="3"></a>Amendment III</p>
          <p>No Soldier shall, in time of peace be quartered in any house, without the   consent of the Owner, nor in time of war, but in a manner to be prescribed by   law.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="4" id="4"></a>Amendment IV</p>
          <p>The right of the people to be secure in their persons, houses, papers, and   effects, against unreasonable searches and seizures, shall not be violated, and   no Warrants shall issue, but upon probable cause, supported by Oath or   affirmation, and particularly describing the place to be searched, and the   persons or things to be seized.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="5" id="5"></a>Amendment V</p>
          <p>No person shall be held to answer for a capital, or otherwise infamous crime,   unless on a presentment or indictment of a Grand Jury, except in cases arising   in the land or naval forces, or in the Militia, when in actual service in time   of War or public danger; nor shall any person be subject for the same offence to   be twice put in jeopardy of life or limb; nor shall be compelled in any criminal   case to be a witness against himself, nor be deprived of life, liberty, or   property, without due process of law; nor shall private property be taken for   public use, without just compensation.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="6" id="6"></a>Amendment VI</p>
          <p>In all criminal prosecutions, the accused shall enjoy the right to a speedy   and public trial, by an impartial jury of the State and district wherein the   crime shall have been committed, which district shall have been previously   ascertained by law, and to be informed of the nature and cause of the   accusation; to be confronted with the witnesses against him; to have compulsory   process for obtaining witnesses in his favor, and to have the Assistance of   Counsel for his defence.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="7" id="7"></a>Amendment VII</p>
          <p>In Suits at common law, where the value in controversy shall exceed twenty   dollars, the right of trial by jury shall be preserved, and no fact tried by a   jury, shall be otherwise re-examined in any Court of the United States, than   according to the rules of the common law.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="8" id="8"></a>Amendment VIII</p>
          <p>Excessive bail shall not be required, nor excessive fines imposed, nor cruel   and unusual punishments inflicted.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="9" id="9"></a>Amendment IX</p>
          <p>The enumeration in the Constitution, of certain rights, shall not be   construed to deny or disparage others retained by the people.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="10" id="10"></a>Amendment X</p>
          <p>The powers not delegated to the United States by the Constitution, nor   prohibited by it to the States, are reserved to the States respectively, or to   the people.</p>
          <p><a href="/exhibits/charters/constitution_amendments_11-27.html"><strong>Amendments   11-27</strong></a></p>
          <hr size="1" noshade="noshade" />
          <strong>Note:</strong> The capitalization and punctuation in this   version is from the enrolled original of the Joint Resolution of Congress   proposing the <a href="/exhibits/charters/bill_of_rights.html">Bill of   Rights</a>, which is on <a href="/nae/visit/">permanent display in the Rotunda   of the National Archives Building</a>, Washington, D.C. </td>
      </tr>
    </tbody>
  </table>

</div>
</body>
</html>

Last edited by MatthewJ : October 12th, 2009 at 02:15 PM.

Reply With Quote
  #3  
Old October 12th, 2009, 02:21 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,293 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 18 h 36 m 30 sec
Reputation Power: 4
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by MatthewJ
I think you could just wrap that part of the content with div tags, set a height on them, then set overflow to auto on the div... that will lock the div height, and add a scroll bar for anything longer. Effectively the same as an iframe.

Quick Example

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#scrolling {
	height: 200px;
	overflow: auto;
}
</style>
</head>

<body>
<p>Just a test</p>
<div id="scrolling">
  <table border="0" cellspacing="0" cellpadding="0" width="600">
    <tbody>
      <tr>
        <td align="left"><p>The Bill of Rights: A Transcription</p>
          <p>The Preamble to The Bill of Rights</p>
          <p><strong>Congress of the United States</strong><br />
            begun and held at the City   of New-York, on<br />
            Wednesday the fourth of March, one thousand seven hundred and   eighty nine.</p>
          <p><strong>THE</strong> Conventions of a number of the States, having at the   time of their adopting the Constitution, expressed a desire, in order to prevent   misconstruction or abuse of its powers, that further declaratory and restrictive   clauses should be added: And as extending the ground of public confidence in the   Government, will best ensure the beneficent ends of its institution.</p>
          <p><strong>RESOLVED</strong> by the Senate and House of Representatives of the   United States of America, in Congress assembled, two thirds of both Houses   concurring, that the following Articles be proposed to the Legislatures of the   several States, as amendments to the Constitution of the United States, all, or   any of which Articles, when ratified by three fourths of the said Legislatures,   to be valid to all intents and purposes, as part of the said Constitution;   viz.</p>
          <p><strong>ARTICLES</strong> in addition to, and Amendment of the Constitution   of the United States of America, proposed by Congress, and ratified by the   Legislatures of the several States, pursuant to the fifth Article of the   original Constitution.</p>
          <p><strong>Note</strong>: The following text is a transcription of the first ten   amendments to the Constitution in their original form. These amendments were   ratified December 15, 1791, and form what is known as the "Bill of Rights."</p>
          <hr size="1" noshade="noshade" />
          <p><a name="1" id="1"></a>Amendment I</p>
          <p>Congress shall make no law respecting an establishment of religion, or   prohibiting the free exercise thereof; or abridging the freedom of speech, or of   the press; or the right of the people peaceably to assemble, and to petition the   Government for a redress of grievances.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="2" id="2"></a>Amendment II</p>
          <p>A well regulated Militia, being necessary to the security of a free State,   the right of the people to keep and bear Arms, shall not be infringed.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="3" id="3"></a>Amendment III</p>
          <p>No Soldier shall, in time of peace be quartered in any house, without the   consent of the Owner, nor in time of war, but in a manner to be prescribed by   law.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="4" id="4"></a>Amendment IV</p>
          <p>The right of the people to be secure in their persons, houses, papers, and   effects, against unreasonable searches and seizures, shall not be violated, and   no Warrants shall issue, but upon probable cause, supported by Oath or   affirmation, and particularly describing the place to be searched, and the   persons or things to be seized.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="5" id="5"></a>Amendment V</p>
          <p>No person shall be held to answer for a capital, or otherwise infamous crime,   unless on a presentment or indictment of a Grand Jury, except in cases arising   in the land or naval forces, or in the Militia, when in actual service in time   of War or public danger; nor shall any person be subject for the same offence to   be twice put in jeopardy of life or limb; nor shall be compelled in any criminal   case to be a witness against himself, nor be deprived of life, liberty, or   property, without due process of law; nor shall private property be taken for   public use, without just compensation.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="6" id="6"></a>Amendment VI</p>
          <p>In all criminal prosecutions, the accused shall enjoy the right to a speedy   and public trial, by an impartial jury of the State and district wherein the   crime shall have been committed, which district shall have been previously   ascertained by law, and to be informed of the nature and cause of the   accusation; to be confronted with the witnesses against him; to have compulsory   process for obtaining witnesses in his favor, and to have the Assistance of   Counsel for his defence.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="7" id="7"></a>Amendment VII</p>
          <p>In Suits at common law, where the value in controversy shall exceed twenty   dollars, the right of trial by jury shall be preserved, and no fact tried by a   jury, shall be otherwise re-examined in any Court of the United States, than   according to the rules of the common law.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="8" id="8"></a>Amendment VIII</p>
          <p>Excessive bail shall not be required, nor excessive fines imposed, nor cruel   and unusual punishments inflicted.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="9" id="9"></a>Amendment IX</p>
          <p>The enumeration in the Constitution, of certain rights, shall not be   construed to deny or disparage others retained by the people.</p>
          <hr size="1" noshade="noshade" />
          <p><a name="10" id="10"></a>Amendment X</p>
          <p>The powers not delegated to the United States by the Constitution, nor   prohibited by it to the States, are reserved to the States respectively, or to   the people.</p>
          <p><a href="/exhibits/charters/constitution_amendments_11-27.html"><strong>Amendments   11-27</strong></a></p>
          <hr size="1" noshade="noshade" />
          <strong>Note:</strong> The capitalization and punctuation in this   version is from the enrolled original of the Joint Resolution of Congress   proposing the <a href="/exhibits/charters/bill_of_rights.html">Bill of   Rights</a>, which is on <a href="/nae/visit/">permanent display in the Rotunda   of the National Archives Building</a>, Washington, D.C. </td>
      </tr>
    </tbody>
  </table>

</div>
</body>
</html>


I don't suppose you know how to use the overflow with the style defined per div as apposed to a global CSS

Reply With Quote
  #4  
Old October 12th, 2009, 02:35 PM
MatthewJ MatthewJ is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2007
Location: Davenport, Iowa
Posts: 633 MatthewJ User rank is Private First Class (20 - 50 Reputation Level)MatthewJ User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 22 h 11 m 29 sec
Reputation Power: 3
Quote:
Originally Posted by LLX
I don't suppose you know how to use the overflow with the style defined per div as apposed to a global CSS


I get it now

Post the code for the div in question... mainly you should just need to add

height: 200px; overflow: auto;

into the style for said div.

Last edited by MatthewJ : October 12th, 2009 at 02:37 PM.

Reply With Quote
  #5  
Old October 13th, 2009, 02:00 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,293 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 18 h 36 m 30 sec
Reputation Power: 4
Send a message via AIM to LLX Send a message via Yahoo to LLX
sure, right now it looks something like this

echo '<B>Teaser:</B> <BR><DIV height=300 overflow=auto>'.$MainArray['Teaser'].'</DIV><BR>';

Reply With Quote
  #6  
Old October 13th, 2009, 02:23 PM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
 
Join Date: Apr 2007
Location: San Diego, CA
Posts: 2,070 IAmALlama User rank is Private First Class (20 - 50 Reputation Level)IAmALlama User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 6 Days 8 h 15 m 37 sec
Reputation Power: 5
for any css that you want to do inline with a tag you use the style attribute like so:

<div id='whatever' style='overflow:auto;'>something</div>

the css inside the style attribute is pretty much any css that goes between the braces { and } at the top of a page after selecting an element.

Reply With Quote
  #7  
Old October 13th, 2009, 02:47 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,293 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 18 h 36 m 30 sec
Reputation Power: 4
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by IAmALlama
for any css that you want to do inline with a tag you use the style attribute like so:

<div id='whatever' style='overflow:auto;'>something</div>

the css inside the style attribute is pretty much any css that goes between the braces { and } at the top of a page after selecting an element.


must be doing something wrong

this created a horizontal scroll dive but doesnt restrict the height

echo '<B>Teaser:</B> <BR><DIV id=\'Teaser'.$MainArray['ContentID'].'\' height=300 style=\'overflow:auto;\'>'.$MainArray['Teaser'].'</DIV><BR>';


Also when their "bad" content it can break the page, that the main reason i wanted to use a iframe as a iframe wont break the layout around it if codded badly.

Any thoughts on these 2 issues?

Reply With Quote
  #8  
Old October 13th, 2009, 03:49 PM
MatthewJ MatthewJ is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2007
Location: Davenport, Iowa
Posts: 633 MatthewJ User rank is Private First Class (20 - 50 Reputation Level)MatthewJ User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 22 h 11 m 29 sec
Reputation Power: 3
Code:
echo '<B>Teaser:</B> <BR><DIV id=\'Teaser'.$MainArray['ContentID'].'\'  style=\'overflow: auto; height: 300;\'>'.$MainArray['Teaser'].'</DIV><BR>';


That should work...

When using height=... within the table tag itself, it is an attribute of the table tag. It needs to be contained within the style attribute.

If there is bad content, I personally would check for that before displaying it and provide a message to that effect if it is bad.

You could though use your iframe approach, just move the logic to query and display that content into it's own page and set it as the iframe source.

Last edited by MatthewJ : October 13th, 2009 at 03:53 PM.

Reply With Quote
  #9  
Old October 13th, 2009, 05:38 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,293 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 18 h 36 m 30 sec
Reputation Power: 4
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by MatthewJ
Code:
echo '<B>Teaser:</B> <BR><DIV id=\'Teaser'.$MainArray['ContentID'].'\'  style=\'overflow: auto; height: 300;\'>'.$MainArray['Teaser'].'</DIV><BR>';


That should work...

When using height=... within the table tag itself, it is an attribute of the table tag. It needs to be contained within the style attribute.

If there is bad content, I personally would check for that before displaying it and provide a message to that effect if it is bad.

You could though use your iframe approach, just move the logic to query and display that content into it's own page and set it as the iframe source.


when i say bad i mena like unterminated tables, divs, etc. i don't think you can check for that before posting

Reply With Quote
  #10  
Old October 13th, 2009, 05:51 PM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,293 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 18 h 36 m 30 sec
Reputation Power: 4
Send a message via AIM to LLX Send a message via Yahoo to LLX
the problem with the iframe is i would need 3 for each entry and some of the content wont break the page but some can

Take a look

PHP Code:
<?
$viewissueID 
'';
if (!isset(
$_GET['Issue'])){
$result2 mysql_query("SELECT * FROM Issues WHERE Status = 2")or die(mysql_error());
$check2=mysql_fetch_assoc($result2);
$viewissueID $check2['IssueID'];
} else {
$viewissueID $_GET['Issue'];
}
//if

$content .= '<B>Issues: </b>';
$ISHListQ mysql_query("SELECT * FROM Issues WHERE Status != 3 ORDER BY Number ASC")or die(mysql_error());
while (
$ISHListArr=mysql_fetch_assoc($ISHListQ)){
    
$IshID $ISHListArr['IssueID'];
if (
$IshID == $viewissueID){
$content .= '<B>['.$ISHListArr['Name'].']</B>';
}else{
$content .= '<a href="Admin'.$page.'s.php?Issue='.$IshID.'">['.$ISHListArr['Name'].']</a>';
};
//if loop
};//while
if ($viewissueID == "0"){
$content .= '<B>[Unknown]</B>';
}else{
$content .= '<a href="Admin'.$page.'s.php?Issue=0">[Unknown]</a>';
};
//if loop for unknowns
$content .= '<BR><BR>';
echo 
$content;

if (
$_GET['ID'] == "T"){
$querystring2='SELECT * FROM '.$dtable.' WHERE Status = 3';
}else{
$querystring2='SELECT * FROM '.$dtable.' WHERE Status < 2 AND IssueID = '.$viewissueID.' ORDER BY Status ASC';
};
// switches querry to show trash


$run querya($querystring2);
echo 
'<h2>'.$pagetitle.' Manager ';
echo 
'[<a href="NEW'.$page.'.php">Add</a>]</h2>';
if (
$_GET['ID'] == "T"){
echo 
'(<a href="Admin'.$page.'s.php">View Live Content</a>)<BR><BR>';
}else{
echo 
'(<a href="Admin'.$page.'s.php?ID=T">View Trash</a>)<BR><BR>';
};
// switches querry to show trash
foreach($run as $MainArray){
echo 
'<B>Content ID Number:</B> '.$MainArray['ContentID'];
echo 
'<BR>';
echo 
'<B>Title:</B> '.$MainArray['Title'];
echo 
'<BR>';
echo 
'<B>Subtitle:</B> '.$MainArray['Subtitle'];
echo 
'<BR>';
echo 
'<B>Status:</B> '.IssueStatus($MainArray['Status']).'<BR>';
if (
$MainArray['BylineType'] != 3){
$written '';
switch (
$MainArray['BylineType']){
case 
0:
$written 'Written by ';
break;
case 
1:
$written 'Photography by ';
break;
case 
2:
$written 'Illistration by ';
break;
};
$querystring3='SELECT * FROM Bylines WHERE BylineID="'.$MainArray['BylineID'].'"';
$run2 querya($querystring3);
foreach(
$run2 as $BylinesArray){
echo 
'<B>Byline:</B> '.$written.$BylinesArray['Name'].'<BR>';
};};
//byline
$querystring4='SELECT * FROM Issues WHERE IssueID="'.$MainArray['IssueID'].'"';
$run3 querya($querystring4);
foreach(
$run3 as $IssueArray){
echo 
'<B>Issue:</B> '.$IssueArray['Name'].'<BR>';
};
//for the issue
$querystring5='SELECT * FROM Category WHERE CatagoryID="'.$MainArray['CatagoryID'].'"';
$run4 querya($querystring5);
foreach(
$run4 as $CategoryArray){
$querystring6='SELECT * FROM Menu WHERE MenuID="'.$CategoryArray['MenuID'].'"';
$run5 querya($querystring6);
foreach(
$run5 as $MenuArray){
echo 
'<B>Category:</B> '.$MenuArray['Name'].'->'.$CategoryArray['Name'].'<BR>';
};
//for the menu
};//for the category
echo '<B>Feature/Teaser Picture:</B> '.DynamicPicReturn($uploads.$MainArray['TeaserPic'], 90);
echo 
'<BR>';
echo 
'<B>Feature/Frontpage Teaser:</B> <BR><DIV id=\'FeatTeaser'.$MainArray['ContentID'].'\'  style=\'overflow: auto; height: 300;\'>'.$MainArray['FeatCopy'].'</DIV><BR>';
echo 
'<B>Location:</B> ';
SWITCH (
$MainArray['Location']){
CASE 
0:
echo 
'Regular';
BREAK;
CASE 
1:
echo 
'Front Page';
BREAK;
CASE 
2:
echo 
'Feature';
BREAK;
CASE 
3:
echo 
'Standard Page - index.php?MID='.$MainArray[$keyID];
BREAK;
};
//switch for location
echo '<BR>';
echo 
'<B>Teaser:</B> <BR><DIV id=\'Teaser'.$MainArray['ContentID'].'\'  style=\'overflow: auto; height: 300;\'>'.$MainArray['Teaser'].'</DIV><BR>';
echo 
'<B>Copy:</B> <BR><DIV id=\'Copy'.$MainArray['ContentID'].'\'  style=\'overflow: auto; height: 300;\'>'.$MainArray['Copy'].'</DIV><BR>';
if (
$_GET['ID'] == "T"){
echo 
'[<a href="EDIT'.$page.'.php?ID='.$MainArray[$keyID].'">Edit and Restore</a>]';
}else{
echo 
'[<a href="EDIT'.$page.'.php?ID='.$MainArray[$keyID].'">Edit</a>]';
echo 
'[<a href="TRASH'.$page.'.php?ID='.$MainArray[$keyID].'">Delete (Temporary)</a>]';
};
// switches querry to show trash
echo '[<a href="PURGE'.$page.'.php?ID='.$MainArray[$keyID].'">Permanent Delete</a>]';
//echo '[Archive]';
//echo '[Move]';
echo '<BR><HR><BR>';

};
//for each for data
} else {
    
//cather for direct access
echo 'Unauthorized!';
};
};
//for each for user array

Reply With Quote
  #11  
Old October 28th, 2009, 10:11 AM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,293 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 18 h 36 m 30 sec
Reputation Power: 4
Send a message via AIM to LLX Send a message via Yahoo to LLX
found the problem, a real eggface moment

i se height to 300 not 300px

the px fixed it

Reply With Quote
  #12  
Old October 29th, 2009, 11:56 AM
LLX LLX is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Glendale, CA, USA
Posts: 1,293 LLX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 18 h 36 m 30 sec
Reputation Power: 4
Send a message via AIM to LLX Send a message via Yahoo to LLX
Quote:
Originally Posted by LLX
found the problem, a real eggface moment

i se height to 300 not 300px

the px fixed it


so i've been using the new divs a couple days now and saw something kind of anoying. Now if the copy is less then 300 px theirs a big white space. Is there a good way to only set the max div height is content is > 300?

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > php5 - Iframes and sqlcontent


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 12 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek