1.) queryLookup.php (which builds the div elements, which are hidden and are displayed when user selects query they which to run from a drop down (eg, Search Prospective Student Query), upon selecting the query, a table is displayed w/ the fields for this query as well as the option of setting conditions). It also generates two IFRAMES, one called queryHistory which is a small little iframe that sits inline w/ the div box element whose url is pointed to the same script w/ flags (ie, queryLookup.php?queryFlag=1). I added some code at the very top of this script that handles this IFRAME;
$_SESSION['queryCount'] holds the number of queries user has run.
Code: Select all
if(isset($_GET['queryFlag'] ))
{?>
<meta http-equiv="refresh" content="60">
<div class=readTxt>
<span class=emphasizedRed>Query History</span><br>
<?php
$queryList = getQueryId();
for($i = 0; $i < $_SESSION['queryCount']; $i++)
{
for($c = 0; $c < count($queryList); $c++)
{
if($queryList[$c] == $_SESSION['querylookupid'.$i])
{
echo $i . ') <a href=queryResult.php?queryFlag=1&queryCount='.$i.' target=queryResponse>'. $queryList[$c]['name'];
}
}
}
exit();
}It also keeps refreshing itself which allows for new queries to be displayed. As it stands I only allow 3 queries to be displayed. $_SESSION variables keeps count of queries. $_SESSION variables are created and primarily dealt w/ in queryResult.php. Anyways, the next IFRAME it generates is queryResponse. This is the iframe that the form in queryLookup.php targets (form name=queryForm id=queryForm action=queryResult.php method=post target=queryResponse), I've also used this variation to set the target (onsubmit="document.getElementById('queryForm').target = 'queryResponse'"). This IFRAME is the last of the code in the script as it sits below the queryForm and queryHistory IFRAME and takes up 70% of the browser. So the skeleton structure of this script is as follow:
Code: Select all
if(flag_to_generate_html_for_query_history_is_set)
{
generate_html_for_queryhistory
exit()
}
<script>
script to handle the hidden elements in queryLookup.php, also handles the switching back and forth from hidden to block or inline
</script>
<?php
<code that generates form queryForm>
code ...
<iframe for queryHistory></iframe>
<iframe for queryResult></iframe>
</form>
</html>
?>Code: Select all
if(isset($_POST['contactPhone']))
{
$query = "SELECT personid FROM prospectivestudent";
$result = retrieveRows($query);
$k = 0;
for($i = 0; $i < count($result); $i++)
{
$string = 'check'.$result[$i]['personid'];
if($result[$i]['personid'] == $_POST[$string])
{
$person[$k] = $result[$i]['personid'];
$k++;
}
}
updateProspectiveStudent($person);
}The last script is queryHandler.lib which is a library file w/ function calls used by both queryLookup and queryResult.php - an explanation of this script is not important.
What happens is this, once I submit the form from queryResult.php (the update prospective students) I can no longer target the IFRAME queryResponse that was created in queryLookup.php, the same IFRAME which displays results from queryResult.php- instead what happens if I run another query from queryLookup.php is that it opens up a new window instead, same thing for queryHistory, which display an href link whose target is also queryResult. I cant understand why, I've tried so many things to fix it, but it just doesnt work after I click on updated prospective student. MOZILLA based browsers have no problem w/ it, they keep targeting queryResponse successfully. I'm on a deadline for work and I really really need some help here. Why isnt IE targeting this IFRAME any longer and MOZILLA can?? I know it has something to do when I submit the form in IFRAME queryResult. Hopefully, I have provided enough information and code example to help u guys out - if not lemme know. I know I prob didnt explain myself correctly so please follow up w/ any questions you might have. I thank you for your help, guys. I greatly appreciate any sort of comment.
feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]