This topic is locked

including code pending on values in the database

2/3/2011 2:09:54 AM
PHPRunner General questions
T
TKindermann author

Hello all,
My problem is little bit tricky, but i hope someone has the same problem in the past.
simple description:
I have a table
INDIVIDUAL (ID, PRENAME, POSTNAME)
I have with PHPRunner generated a list page, so fine so good :-)
Additional I have for each individual a HTML file with a name like <ID>_xxx.HTML where ID the key from the database.

This HTML file includes javascript components and other stuff.
Now my question: How can I include this 'HTML' for Each record on the list page pending on the <ID>-Field of the record.
I hope you can understand my description.
kind regards
Thomas

T
TKindermann author 2/4/2011

Ok, I have found a way to include the data with iFrame....

<IFRAME height=300 src="../timeline/html/TL_{$INDI_value}.HTML" width=1000

scrolling=yes>

<a href="iframe.html">


But how can i resize my frame when the browser window is resized?
Has anyony experience with that?



Hello all,
My problem is little bit tricky, but i hope someone has the same problem in the past.
simple description:
I have a table
INDIVIDUAL (ID, PRENAME, POSTNAME)
I have with PHPRunner generated a list page, so fine so good :-)
Additional I have for each individual a HTML file with a name like <ID>_xxx.HTML where ID the key from the database.

This HTML file includes javascript components and other stuff.
Now my question: How can I include this 'HTML' for Each record on the list page pending on the <ID>-Field of the record.
I hope you can understand my description.
kind regards
Thomas

Sergey Kornilov admin 2/4/2011

I found this piece of code on the web that resizes iframe automatically when main window is resized.

Hope it helps.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;

<html>

<head>

<style>

html, body {

height: 100%;

width: 100%;

margin: 0;

padding:0;

}

</style>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<title>Frame Test</title>

<script type="text/javascript" src="jquery-1.2.3.min.js"></script>

<script type="text/javascript">

window.onresize = resize_iframe;



function resize_iframe(){

$('#extContent').css('height',$("#wrapper").height()-100); // 104 to avoid scrollbars due to paddings and borders

}

</script>

</head>

<body style="margin:0px" onload='resize_iframe()'>



<div id='wrapper' style='width:100%;height:100%;'>

<table cellspacing="0" cellpadding="0" style="width:100%;height:100px;border-bottom:1px solid #000"><tr><td>Page Header</td></tr></table>

<IFRAME NAME="extContent" id="extContent" SRC="http://www.google.com"; ALIGN="top" WIDTH="100%" HSPACE="0" VSPACE="0" frameborder="0"></IFRAME>

</div>

</body>

</html>