dbetts
asked on
Some onClick() events not firing on PHP generated HTML
I have a php page with three main sections. Php generates all of the HTML for sections two and three with the echo(); command after variables are passed from the database.
Section one is just the meta tags, headers, style, etc.
Section two creates buttons and displays data. The buttons are created via this command:
echo("<input style=\"background-image:u rl(../imag es/pencil. gif); width:21px; height:20; border:0px; cursor: hand;\" name=edit".$info['lenderid ']." type=button value='' onClick=\"openEdits(lender sArray,'". $info['len derid']."' ,'ala".$in fo['lender id']."');\ ">");
There are four buttons generated per record returned from the DB and there are typically about 20-30 records returned. All buttons for all records are identical as the HTML is generated in a WHILE LOOP.
Section three creates <div></div> tags with a table and form inside that allow for modification of the records in section two. These are visible or hidden based on onClick() javascript events fired from section two.
Okay, now for the strange part...When I load the page, imagine that there is a virtual horizontal line 70cm (3") down from the top of the browser. NONE of the buttons ABOVE that line fire the onClick() event. It doesn't matter if I only return 2-6 records, or 50 records, tha same issue exists.
Now, if I comment out section two so that it doesn't get generated, ALL the buttons work as expected.
It seems to me that the system is going along generating the page, it gets started on section one stuff, but stops to see what's going on in section two, likes that better so it completes section two, then comes back to section one, only it ALWAYS forgets where it was and starts 70cm (3") below the top of the browser to begin implementing the onClick() events.
I realalize that the server doesn't have a personality, but that is the best way I can think of to explain the situation. Anyone have any ideas? If you need the code, I can email it or post the lot of it here.
Thanks,
Derrick
Section one is just the meta tags, headers, style, etc.
Section two creates buttons and displays data. The buttons are created via this command:
echo("<input style=\"background-image:u
There are four buttons generated per record returned from the DB and there are typically about 20-30 records returned. All buttons for all records are identical as the HTML is generated in a WHILE LOOP.
Section three creates <div></div> tags with a table and form inside that allow for modification of the records in section two. These are visible or hidden based on onClick() javascript events fired from section two.
Okay, now for the strange part...When I load the page, imagine that there is a virtual horizontal line 70cm (3") down from the top of the browser. NONE of the buttons ABOVE that line fire the onClick() event. It doesn't matter if I only return 2-6 records, or 50 records, tha same issue exists.
Now, if I comment out section two so that it doesn't get generated, ALL the buttons work as expected.
It seems to me that the system is going along generating the page, it gets started on section one stuff, but stops to see what's going on in section two, likes that better so it completes section two, then comes back to section one, only it ALWAYS forgets where it was and starts 70cm (3") below the top of the browser to begin implementing the onClick() events.
I realalize that the server doesn't have a personality, but that is the best way I can think of to explain the situation. Anyone have any ideas? If you need the code, I can email it or post the lot of it here.
Thanks,
Derrick
ASKER
Oops. I do mean 70mm, 3".
I tried it in Netscape and the onClick events DO fire for ALL the buttons, however, the "hand" cursor does NOT show when the mouse is over any of the buttons.
The alert(); I placed in the openEdits does NOT fire on those top few buttons in IE.
Thanks for looking into this,
Derrick
I tried it in Netscape and the onClick events DO fire for ALL the buttons, however, the "hand" cursor does NOT show when the mouse is over any of the buttons.
The alert(); I placed in the openEdits does NOT fire on those top few buttons in IE.
Thanks for looking into this,
Derrick
shouldn't it be
hand;\" name=edit".$info['lenderid ']." type=button value='' onClick=\"openEdits(lender sArray,'". $info['len derid']."' ,'ala".$in fo['lender id']."');\ ">");
hand;\" name=edit".$info['lenderid ']." type=button value=\"\" onClick=\"openEdits(lender sArray,'". $info['len derid']."' ,'ala".$in fo['lender id']."');\ ">");
? ie in HTML use double quotes
hand;\" name=edit".$info['lenderid
hand;\" name=edit".$info['lenderid
? ie in HTML use double quotes
Sorry, I didn't see your first reply.
Regarding the hand: cursor:hand is a Microsoft CSS rule, the official version is cursor:pointer. However, since you need hand to work on some IE browsers, declare your CSS like
.myclass {
cursor: pointer;
cursor: hand;
}
*with pointer first - important*
A couple of points about your PHP which shouldn't affect the result, but hey, you never know ;)
echo "Some text then ".$p['a_var']." then more text";
=
echo "Some text then {$p['a_var']} then more text";
which can cut down on your quote usage. Also, attribute values in HTML only need to be surrounded by quotes when they have non alphanumeric charaters in, but it's never a bad idea to put them in all the time.
Could you view the source of your HTML page and copy/paste the HTML for a button which works, and for one which doesn't please? Also the openEdits function might be useful, if you're ok to paste that as well :)
_Blue
Regarding the hand: cursor:hand is a Microsoft CSS rule, the official version is cursor:pointer. However, since you need hand to work on some IE browsers, declare your CSS like
.myclass {
cursor: pointer;
cursor: hand;
}
*with pointer first - important*
A couple of points about your PHP which shouldn't affect the result, but hey, you never know ;)
echo "Some text then ".$p['a_var']." then more text";
=
echo "Some text then {$p['a_var']} then more text";
which can cut down on your quote usage. Also, attribute values in HTML only need to be surrounded by quotes when they have non alphanumeric charaters in, but it's never a bad idea to put them in all the time.
Could you view the source of your HTML page and copy/paste the HTML for a button which works, and for one which doesn't please? Also the openEdits function might be useful, if you're ok to paste that as well :)
_Blue
ASKER
There is quite a bit. I am going to list the page's HTML/PHP code in its three sections in three posts:
Section One:
<?php
require '../Connections/db_gl_conn ect.php';
if ($logged_in == 0) {
die('Sorry you are not logged in, this area is restricted to registered agents. <a href="agent_login.php">Cli ck here</a> to log in.');
$db_object->disconnect();
}
$prefstate = $_COOKIE['prefstate'];
if (isset($_POST['submit'])) { // if data on form is to be saved...
function numericOnly($string) { //function to strip characters other than numerals from a string
$numString = ereg_replace("[^[:digit:]] ", "", $string);
return $numString;
}
$listnumber = $_POST['idnumber'];
//Pull all of the selected states from the post...
$msgid = 'sentmsg'.$listnumber;
$msg = $_POST[$msgid];
$aData = split(";",$msg);
$s = 'DELETE FROM lender_states WHERE lenderid = '.$listnumber.';';
for ( $i = 0; $i < count($aData); $i++ ) {
$thisVar = split(":",$aData[$i]);
$postName = $thisVar[0];
$postValue = $thisVar[1];
$length = strlen($postValue);
if ($length > 3) {
$value = substr($postValue,0,strlen ($postValu e)-3);
$s .= "INSERT INTO lender_states (lenderid, state) Values (".$listnumber.", '".$value."');";
}
}
$sql = $db_object->query($s);
if (DB::isError($sql)) {
die($s." ".$sql->getMessage());
}
$date = date('m d, Y');
$table_name = 'lenderinfo';
if ($listnumber == 'abc') {
$cr=chr(0x0D); //search for all LFCR and replace with <br />
$lf=chr(0x0A);
$programs = str_replace($cr.$lf, "<br />", $_POST['programsL']);
$fields_values = array(
'company' => $_POST['companyL'],
'phone' => numericOnly($_POST['phoneL ']), //Strip everything but the numbers....
'ext' => numericOnly($_POST['extL'] ),
'cellphone' => numericOnly($_POST['cellph oneL']),
'fax' => numericOnly($_POST['faxL'] ),
'email' => $_POST['emailL'],
'programs' => $programs,
'firstname' => $_POST['firstnameL'],
'lastname' => $_POST['lastnameL'],
'address' => $_POST['addressL'],
'city' => $_POST['cityL'],
'state' => $_POST['stateL'],
'zip' => $_POST['zipL'],
'lenderstation' => $_SESSION['busunit']
);
$res = $db_object->autoExecute($t able_name, $fields_values, DB_AUTOQUERY_INSERT);
if (DB::isError($res)) {
die($res->getMessage());
}
}
else {
$cr=chr(0x0D); //search for all LFCR and replace with \n\r
$lf=chr(0x0A);
$programs = str_replace($cr.$lf, "<br />",$_POST['programs'.$lis tnumber]);
$fields_values = array(
'company' => $_POST['company'.$listnumb er],
'phone' => numericOnly($_POST['phone' .$listnumb er]), //Strip everything but the numbers....
'ext' => numericOnly($_POST['ext'.$ listnumber ]),
'cellphone' => numericOnly($_POST['cellph one'.$list number]),
'fax' => numericOnly($_POST['fax'.$ listnumber ]),
'email' => $_POST['email'.$listnumber ],
'programs' => $programs,
'firstname' => $_POST['firstname'.$listnu mber],
'lastname' => $_POST['lastname'.$listnum ber],
'address' => $_POST['address'.$listnumb er],
'city' => $_POST['city'.$listnumber] ,
'state' => $_POST['state'.$listnumber ],
'zip' => $_POST['zip'.$listnumber],
'lenderstation' => $_SESSION['busunit']
);
$res = $db_object->autoExecute($t able_name, $fields_values, DB_AUTOQUERY_UPDATE, 'lenderid = '.$listnumber);
if (DB::isError($res)) {
die($res->getMessage());
}
}
$db_object->disconnect();
echo("<script language='javascript' type='text/javascript'>
window.location.href = 'https://secure.EvergreenMortgageInc.com/agents/applenders.php';
</script>");
} else { // if form hasn't been submitted
if (($prefstate != '') && ($prefstate != '*All*')) {
$sql = "SELECT * FROM lenderinfo WHERE lenderstation = '".$_SESSION['busunit']."'
AND lenderid in (SELECT lenderid FROM lender_states WHERE state = '".$prefstate."')
ORDER BY status,company";
} else {
$sql = "SELECT * FROM lenderinfo WHERE lenderstation = '".$_SESSION['busunit']."' ORDER BY status,company";
}
$check = $db_object->query($sql);
if (DB::isError($check)) {
echo("<script language='javascript' type='text/javascript'>
alert('There was an error opening the Approved Lenders data.\\nPlease login again');
window.location.href = 'https://secure.EvergreenMortgageInc.com/agents/agent_login.php';
</script>");
die($check->getMessage());
}
function formatPhone($phone) {
if (empty($phone)) return "";
sscanf($phone, "%3d%3d%4s", $area, $prefix, $exchange);
$out = @$area ? "($area) " : "";
$out .= $prefix . '-' . $exchange;
return $out;
}
function getGlyph($value) {
$hrd = round(($value*2), 0)/2;
if ($hrd == 0.5) {
$glyphname = "0_5.gif";
}
elseif ($hrd == 1) {
$glyphname = "1.gif";
}
elseif ($hrd == 1.5) {
$glyphname = "1_5.gif";
}
elseif ($hrd == 2) {
$glyphname = "2.gif";
}
elseif ($hrd == 2.5) {
$glyphname = "2_5.gif";
}
elseif ($hrd == 3) {
$glyphname = "3.gif";
}
elseif ($hrd == 3.5) {
$glyphname = "3_5.gif";
}
elseif ($hrd == 4) {
$glyphname = "4.gif";
}
elseif ($hrd == 4.5) {
$glyphname = "4_5.gif";
}
elseif ($hrd == 5) {
$glyphname = "5.gif";
}
else {
$glyphname = "unrated.gif";
}
return $glyphname;
}
?>
<html><!-- InstanceBegin template="/Templates/Secur e_Sub_Agen ts.dwt.php " codeOutsideHTMLIsLocked="f alse" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Evergreen Mortgage Inc.</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" -->
<link href="../css/evergreen.css " rel="stylesheet" type="text/css">
<script language="JavaScript" src="../scripts/applenders .js" type="text/javascript"></s cript>
<?php
echo("
<script language='JavaScript'>
var lendersArray=new Array();\n");
while ($info = $check->fetchRow()) {
echo("lendersArray[lenders Array.leng th] = 'ala".$info['lenderid']."' ;\n");
}
echo("
lendersArray[lendersArray. length] = 'addLender';\n
</script>");
?>
<style type="text/css">
<!--
iframe {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
border: 1px solid;
position: relative;
height: 63px;
width: 103px;
}
-->
</style>
<!-- InstanceEndEditable -->
<script language="JavaScript" type="text/javascript" src="../scripts/secure_age nts.js"></ script>
<SCRIPT>
function getTag(el,str) {
while ((el!=null) && (str.indexOf(el.tagName + ":")<0))
el = el.parentElement
return el
}
function navigateTo(sURL,target) {
if ((target == '_self') || (target=="")) {
window.location.replace(sU RL);
return false;
}
if (target == '_top') {
top.window.location.replac e(sURL);
return false
}
if (target =='_parent') {
parent.window.location.rep lace(sURL) ;
return false;
}
if (target == '_blank' || parent.frames.length < 1) {
window.open(sURL, target);
return false;
}
else {
if (parent.frames[target])
parent.frames[target].loca tion.repla ce(sURL);
else
window.open(sURL, target);
return false;
}
}
function checkIEClick() {
var el = getTag(event.srcElement,"A :AREA:")
if ((el!=null) && ((el.tagName=="A") || (el.tagName=="AREA"))) {
event.returnValue = false
navigateTo(el.href,String( el.target) .toLowerCa se())
}
}
function checkNSClick(ev) {
if (ev.target.href) {
navigateTo(ev.target.href, String(ev. target).to LowerCase( ))
return false
}
}
if ((document.all) || (document.layers))
if (document.layers) {
document.captureEvents(Eve nt.CLICK)
document.onclick = checkNSClick
}
else
document.onclick = checkIEClick
</SCRIPT>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<!-- InstanceBeginEditable name="Body_Script" --><!-- InstanceEndEditable -->
<table width=800 border=0 cellspacing=0 cellpadding=0>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="2"></td>
</tr>
<tr>
<td colspan="3"><img src="../images/top_bar.gif " width="800" height="12"></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="2"></td>
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="4"></td>
</tr>
<tr>
<td align="center" valign="middle"><img src="../images/logo.gif" width="174" height="64" hspace="13"></td>
<td background="../images/menu _vert_divi der.gif">< img src="../images/spacer.gif" width=4 height=1></td>
<td bgcolor="#909B8E"><!-- InstanceBeginEditable name="Page Header" --><img src="../images/top_shadow. gif" width="594" height="75"><!-- InstanceEndEditable --></td>
</tr>
<tr>
<td><img src="../images/spacer.gif" width="1" height="2"></td>
<td background="../images/menu _vert_divi der.gif">< img src="../images/spacer.gif" width=4 height=1></td>
<td><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td><img src="../images/spacer.gif" width="200" height="2"></td>
<td background="../images/menu _vert_divi der.gif">< img src="../images/spacer.gif" width=4 height=1></td>
<td><img src="../images/spacer.gif" width="596" height="1"></td>
</tr>
<tr valign="top">
<td background="../images/menu _2_divider .gif">
<table border="0" cellpadding="0" cellspacing="0" background="../images/menu _backgroun d4.gif">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<!-- InstanceBeginEditable name="Side Menu" -->
<tr>
<td colspan="2"><img src="../images/spacer.gif" width="176" height="60"></td>
<td rowspan="11"><img src="../images/spacer.gif" width="24" height="1"></td>
</tr>
<!-- InstanceEndEditable -->
<tr>
<td colspan="2" align="right"><a href="http://www.EvergreenMortgageInc.com"><img src="../images/home.gif" width="40" height="16" border="0"></a></td>
</tr>
<tr>
<td colspan="2"><img src="../images/spacer.gif" width="1" height="7"></td>
</tr>
<tr>
<td colspan="2" align="right"><a href="agentsmain.php"><img src="../images/agents_main .gif" width="91" height="16" border="0"></a></td>
</tr>
<tr>
<td colspan="2"><img src="../images/spacer.gif" width="1" height="8"></td>
</tr>
<tr><td>
<div align="right" id=Outline name=Outline>
<img src="../images/welcome.gif " alt="Welcome" width="48" height="17" id=Out1a style="cursor: hand" class="Outline"><img src='../images/closed_arro w.gif' width="8" height="8" vspace="3" id=Out1 style="cursor: hand" class="Outline"><br>
<div align="right" id=Out1d style="display:None">
<A href='welcome.html'><img src="../images/welcome_sub .gif" alt="Welcome Agents" width="40" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
<A href='successful_agent.htm l'><img src="../images/welcome_suc cessful.gi f" alt="How to be a successful Agent" width="135" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
<A href='manage_loans.html'>< img src="../images/welcome_man age.gif" alt="How to manage your loans" width="125" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
</div>
<img src="../images/prospect_li st.gif" alt="Prospect List" width="68" height="17" id=Out2a style="cursor: hand" class="Outline"><img src='../images/closed_arro w.gif' width="8" height="8" vspace="3" id=Out2 style="cursor: hand" class="Outline"><br>
<div align="right" id=Out2d style="display:None">
<A href='prospect_list.php'>< img src="../images/prospect_li st_sub.gif " alt="Prospect List" width="57" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
<A href='phone_script.html' target="_blank"><img src="../images/prospect_sc ript.gif" alt="Phone Script" width="56" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
</div>
<img src="../images/matrix.gif" alt="Open a Matrix" width="76" height="17" id=Out3a style="cursor: hand" class="Outline" border=0><img src='../images/closed_arro w.gif' width="8" height="8" vspace="3" id=Out3 style="cursor: hand" class="Outline"><br>
<div align="right" id=Out3d style="display:None">
<A href='open_matrix.php'><im g src="../images/open_matrix _sub.gif" alt="Open a Matrix" width="63" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
<A href='print_matrix.html' target="_blank"><img src="../images/print_matri x.gif" alt="Print a Blank Matrix" width="88" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
</div>
<A href="lender_replies.php"> <img src="../images/lender_repl ies.gif" alt="Lender Replies" width="78" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="applenders.php"><img src="../images/applenders. gif" alt="Approved Lenders" width="96" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="forum/"><img src="../images/forum.gif" alt="Agent's Forum" width="77" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="download.php"><img src="../images/downloads.g if" alt="Agent's Forum" width="60" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="lifeplan.html"><img src="../images/lifeplan.gi f" alt="Agent's Forum" width="47" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="logout.php"><img src="../images/logout.gif" alt="Agent's Forum" width="40" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript">Outl ine.onclic k=doOutlin e</script>
</td>
<td background="../images/menu _vert_divi der.gif">< img src="../images/spacer.gif" width=4 height=250></td>
<td valign="top" background="../images/bkGr nd.gif">
<table border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#FFFFFF">
<td colspan="5"><img src="../images/spacer.gif" width="1" height="20"></td>
</tr>
<tr>
<td><img src="../images/spacer.gif" width="20" height="6"></td>
<td><img src="../images/spacer.gif" width="7" height="1"></td>
<td><img src="../images/spacer.gif" width="4" height="1"></td>
<td><img src="../images/spacer.gif" width="545" height="1"></td>
<td><img src="../images/spacer.gif" width="20" height="1"></td>
</tr>
<tr>
<td><img src="../images/spacer.gif" width="20" height="1"></td>
<td colspan="3"><!-- InstanceBeginEditable name="Page SubHeader" --><img src="../images/approved_le nders_head er.gif" width="267" height="21"><!-- InstanceEndEditable --></td>
<td rowspan="4"><img src="../images/spacer.gif" width="20" height="1"></td>
</tr>
<tr>
<td rowspan="3"><img src="../images/spacer.gif" width="20" height="1"></td>
<td valign="top"><img src="../images/page_linerV .gif" width="7" height="102"></td>
<td><img src="../images/spacer.gif" width="10" height="1"></td>
<!-- InstanceBeginEditable name="Main Text" -->
<td valign="top">
<?php include('applenders_sub.ph p'); ?>
</td>
<!-- InstanceEndEditable --></tr>
</table></td>
</tr>
<tr>
<td background="../images/menu _2_divider .gif"><img src="../images/spacer.gif" width="1" height="4"></td>
<td colspan="2"><img src="../images/spacer.gif" width=1 height=1></td>
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td background="../images/menu _2_divider .gif"><img src="../images/spacer.gif" width="1" height="68"></td>
<td colspan="2"><img src="../images/spacer.gif" width=1 height=1></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="4"></td>
</tr>
<tr>
<td colspan="3" align="center" background="../images/bott om_bar.gif "> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="http://www.EvergreenMortgageInc.com/our_promise.html"><img src="../images/our_promise 2.gif" width="69" height="14" hspace="21" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="../clients/client_lo gin.php">< img src="../images/client_logi n2.gif" width="68" height="14" hspace="22" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="http://www.EvergreenMortgageInc.com/clients/sample_tracking.html"><img src="../images/loan_tracki ng2.gif" width="79" height="14" hspace="16" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="http://www.EvergreenMortgageInc.com/clients/articles/apr.html"><img src="../images/articles_in terest2.gi f" width="111" height="14" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="agent_login.php"><im g src="../images/agent_login 2.gif" width="67" height="14" hspace="22" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="108"></td>
</tr>
<tr>
<td colspan="3" align="center"> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a class="two" href="http://www.EvergreenMortgageInc.com/our_promise.html">Our Promise</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="../../clients/client _login.php ">Client Login</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="http://www.EvergreenMortgageInc.com/clients/sample_tracking.html">Loan Tracking</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="http://www.EvergreenMortgageInc.com/clients/articles/apr.html">Articles of Interest</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="../../agents/agent_l ogin.php"> Agent Login</a></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3" align="center"> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a class="two" href="#">Privacy Policy</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="#">Legal Statement</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="#">Contact Us</a></td>
</tr>
</table></td>
</tr>
</table>
<!-- InstanceBeginEditable name="EditRegion7" --><!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
<?php
}
?>
Section One:
<?php
require '../Connections/db_gl_conn
if ($logged_in == 0) {
die('Sorry you are not logged in, this area is restricted to registered agents. <a href="agent_login.php">Cli
$db_object->disconnect();
}
$prefstate = $_COOKIE['prefstate'];
if (isset($_POST['submit'])) { // if data on form is to be saved...
function numericOnly($string) { //function to strip characters other than numerals from a string
$numString = ereg_replace("[^[:digit:]]
return $numString;
}
$listnumber = $_POST['idnumber'];
//Pull all of the selected states from the post...
$msgid = 'sentmsg'.$listnumber;
$msg = $_POST[$msgid];
$aData = split(";",$msg);
$s = 'DELETE FROM lender_states WHERE lenderid = '.$listnumber.';';
for ( $i = 0; $i < count($aData); $i++ ) {
$thisVar = split(":",$aData[$i]);
$postName = $thisVar[0];
$postValue = $thisVar[1];
$length = strlen($postValue);
if ($length > 3) {
$value = substr($postValue,0,strlen
$s .= "INSERT INTO lender_states (lenderid, state) Values (".$listnumber.", '".$value."');";
}
}
$sql = $db_object->query($s);
if (DB::isError($sql)) {
die($s." ".$sql->getMessage());
}
$date = date('m d, Y');
$table_name = 'lenderinfo';
if ($listnumber == 'abc') {
$cr=chr(0x0D); //search for all LFCR and replace with <br />
$lf=chr(0x0A);
$programs = str_replace($cr.$lf, "<br />", $_POST['programsL']);
$fields_values = array(
'company' => $_POST['companyL'],
'phone' => numericOnly($_POST['phoneL
'ext' => numericOnly($_POST['extL']
'cellphone' => numericOnly($_POST['cellph
'fax' => numericOnly($_POST['faxL']
'email' => $_POST['emailL'],
'programs' => $programs,
'firstname' => $_POST['firstnameL'],
'lastname' => $_POST['lastnameL'],
'address' => $_POST['addressL'],
'city' => $_POST['cityL'],
'state' => $_POST['stateL'],
'zip' => $_POST['zipL'],
'lenderstation' => $_SESSION['busunit']
);
$res = $db_object->autoExecute($t
if (DB::isError($res)) {
die($res->getMessage());
}
}
else {
$cr=chr(0x0D); //search for all LFCR and replace with \n\r
$lf=chr(0x0A);
$programs = str_replace($cr.$lf, "<br />",$_POST['programs'.$lis
$fields_values = array(
'company' => $_POST['company'.$listnumb
'phone' => numericOnly($_POST['phone'
'ext' => numericOnly($_POST['ext'.$
'cellphone' => numericOnly($_POST['cellph
'fax' => numericOnly($_POST['fax'.$
'email' => $_POST['email'.$listnumber
'programs' => $programs,
'firstname' => $_POST['firstname'.$listnu
'lastname' => $_POST['lastname'.$listnum
'address' => $_POST['address'.$listnumb
'city' => $_POST['city'.$listnumber]
'state' => $_POST['state'.$listnumber
'zip' => $_POST['zip'.$listnumber],
'lenderstation' => $_SESSION['busunit']
);
$res = $db_object->autoExecute($t
if (DB::isError($res)) {
die($res->getMessage());
}
}
$db_object->disconnect();
echo("<script language='javascript' type='text/javascript'>
window.location.href = 'https://secure.EvergreenMortgageInc.com/agents/applenders.php';
</script>");
} else { // if form hasn't been submitted
if (($prefstate != '') && ($prefstate != '*All*')) {
$sql = "SELECT * FROM lenderinfo WHERE lenderstation = '".$_SESSION['busunit']."'
AND lenderid in (SELECT lenderid FROM lender_states WHERE state = '".$prefstate."')
ORDER BY status,company";
} else {
$sql = "SELECT * FROM lenderinfo WHERE lenderstation = '".$_SESSION['busunit']."'
}
$check = $db_object->query($sql);
if (DB::isError($check)) {
echo("<script language='javascript' type='text/javascript'>
alert('There was an error opening the Approved Lenders data.\\nPlease login again');
window.location.href = 'https://secure.EvergreenMortgageInc.com/agents/agent_login.php';
</script>");
die($check->getMessage());
}
function formatPhone($phone) {
if (empty($phone)) return "";
sscanf($phone, "%3d%3d%4s", $area, $prefix, $exchange);
$out = @$area ? "($area) " : "";
$out .= $prefix . '-' . $exchange;
return $out;
}
function getGlyph($value) {
$hrd = round(($value*2), 0)/2;
if ($hrd == 0.5) {
$glyphname = "0_5.gif";
}
elseif ($hrd == 1) {
$glyphname = "1.gif";
}
elseif ($hrd == 1.5) {
$glyphname = "1_5.gif";
}
elseif ($hrd == 2) {
$glyphname = "2.gif";
}
elseif ($hrd == 2.5) {
$glyphname = "2_5.gif";
}
elseif ($hrd == 3) {
$glyphname = "3.gif";
}
elseif ($hrd == 3.5) {
$glyphname = "3_5.gif";
}
elseif ($hrd == 4) {
$glyphname = "4.gif";
}
elseif ($hrd == 4.5) {
$glyphname = "4_5.gif";
}
elseif ($hrd == 5) {
$glyphname = "5.gif";
}
else {
$glyphname = "unrated.gif";
}
return $glyphname;
}
?>
<html><!-- InstanceBegin template="/Templates/Secur
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Evergreen Mortgage Inc.</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" -->
<link href="../css/evergreen.css
<script language="JavaScript" src="../scripts/applenders
<?php
echo("
<script language='JavaScript'>
var lendersArray=new Array();\n");
while ($info = $check->fetchRow()) {
echo("lendersArray[lenders
}
echo("
lendersArray[lendersArray.
</script>");
?>
<style type="text/css">
<!--
iframe {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
border: 1px solid;
position: relative;
height: 63px;
width: 103px;
}
-->
</style>
<!-- InstanceEndEditable -->
<script language="JavaScript" type="text/javascript" src="../scripts/secure_age
<SCRIPT>
function getTag(el,str) {
while ((el!=null) && (str.indexOf(el.tagName + ":")<0))
el = el.parentElement
return el
}
function navigateTo(sURL,target) {
if ((target == '_self') || (target=="")) {
window.location.replace(sU
return false;
}
if (target == '_top') {
top.window.location.replac
return false
}
if (target =='_parent') {
parent.window.location.rep
return false;
}
if (target == '_blank' || parent.frames.length < 1) {
window.open(sURL, target);
return false;
}
else {
if (parent.frames[target])
parent.frames[target].loca
else
window.open(sURL, target);
return false;
}
}
function checkIEClick() {
var el = getTag(event.srcElement,"A
if ((el!=null) && ((el.tagName=="A") || (el.tagName=="AREA"))) {
event.returnValue = false
navigateTo(el.href,String(
}
}
function checkNSClick(ev) {
if (ev.target.href) {
navigateTo(ev.target.href,
return false
}
}
if ((document.all) || (document.layers))
if (document.layers) {
document.captureEvents(Eve
document.onclick = checkNSClick
}
else
document.onclick = checkIEClick
</SCRIPT>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<!-- InstanceBeginEditable name="Body_Script" --><!-- InstanceEndEditable -->
<table width=800 border=0 cellspacing=0 cellpadding=0>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3"><img src="../images/top_bar.gif
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td align="center" valign="middle"><img src="../images/logo.gif" width="174" height="64" hspace="13"></td>
<td background="../images/menu
<td bgcolor="#909B8E"><!-- InstanceBeginEditable name="Page Header" --><img src="../images/top_shadow.
</tr>
<tr>
<td><img src="../images/spacer.gif"
<td background="../images/menu
<td><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif"
</tr>
<tr>
<td><img src="../images/spacer.gif"
<td background="../images/menu
<td><img src="../images/spacer.gif"
</tr>
<tr valign="top">
<td background="../images/menu
<table border="0" cellpadding="0" cellspacing="0" background="../images/menu
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<!-- InstanceBeginEditable name="Side Menu" -->
<tr>
<td colspan="2"><img src="../images/spacer.gif"
<td rowspan="11"><img src="../images/spacer.gif"
</tr>
<!-- InstanceEndEditable -->
<tr>
<td colspan="2" align="right"><a href="http://www.EvergreenMortgageInc.com"><img src="../images/home.gif" width="40" height="16" border="0"></a></td>
</tr>
<tr>
<td colspan="2"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="2" align="right"><a href="agentsmain.php"><img
</tr>
<tr>
<td colspan="2"><img src="../images/spacer.gif"
</tr>
<tr><td>
<div align="right" id=Outline name=Outline>
<img src="../images/welcome.gif
<div align="right" id=Out1d style="display:None">
<A href='welcome.html'><img src="../images/welcome_sub
<A href='successful_agent.htm
<A href='manage_loans.html'><
</div>
<img src="../images/prospect_li
<div align="right" id=Out2d style="display:None">
<A href='prospect_list.php'><
<A href='phone_script.html' target="_blank"><img src="../images/prospect_sc
</div>
<img src="../images/matrix.gif"
<div align="right" id=Out3d style="display:None">
<A href='open_matrix.php'><im
<A href='print_matrix.html' target="_blank"><img src="../images/print_matri
</div>
<A href="lender_replies.php">
<A href="applenders.php"><img
<A href="forum/"><img src="../images/forum.gif" alt="Agent's Forum" width="77" height="17" border=0><img src='../images/spacer.gif'
<A href="download.php"><img src="../images/downloads.g
<A href="lifeplan.html"><img src="../images/lifeplan.gi
<A href="logout.php"><img src="../images/logout.gif"
</div></td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript">Outl
</td>
<td background="../images/menu
<td valign="top" background="../images/bkGr
<table border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#FFFFFF">
<td colspan="5"><img src="../images/spacer.gif"
</tr>
<tr>
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
</tr>
<tr>
<td><img src="../images/spacer.gif"
<td colspan="3"><!-- InstanceBeginEditable name="Page SubHeader" --><img src="../images/approved_le
<td rowspan="4"><img src="../images/spacer.gif"
</tr>
<tr>
<td rowspan="3"><img src="../images/spacer.gif"
<td valign="top"><img src="../images/page_linerV
<td><img src="../images/spacer.gif"
<!-- InstanceBeginEditable name="Main Text" -->
<td valign="top">
<?php include('applenders_sub.ph
</td>
<!-- InstanceEndEditable --></tr>
</table></td>
</tr>
<tr>
<td background="../images/menu
<td colspan="2"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif"
</tr>
<tr>
<td background="../images/menu
<td colspan="2"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" align="center" background="../images/bott
<tr>
<td valign="top"><img src="../images/menu_middle
<td><a href="http://www.EvergreenMortgageInc.com/our_promise.html"><img src="../images/our_promise
<td valign="top"><img src="../images/menu_middle
<td><a href="../clients/client_lo
<td valign="top"><img src="../images/menu_middle
<td><a href="http://www.EvergreenMortgageInc.com/clients/sample_tracking.html"><img src="../images/loan_tracki
<td valign="top"><img src="../images/menu_middle
<td><a href="http://www.EvergreenMortgageInc.com/clients/articles/apr.html"><img src="../images/articles_in
<td valign="top"><img src="../images/menu_middle
<td><a href="agent_login.php"><im
<td valign="top"><img src="../images/menu_middle
</tr>
</table></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" align="center"> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a class="two" href="http://www.EvergreenMortgageInc.com/our_promise.html">Our Promise</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="../../clients/client
<td><img src="../images/menu_bottom
<td><a class="two" href="http://www.EvergreenMortgageInc.com/clients/sample_tracking.html">Loan Tracking</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="http://www.EvergreenMortgageInc.com/clients/articles/apr.html">Articles of Interest</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="../../agents/agent_l
</tr>
</table></td>
</tr>
<tr>
<td colspan="3" align="center"> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a class="two" href="#">Privacy Policy</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="#">Legal Statement</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="#">Contact Us</a></td>
</tr>
</table></td>
</tr>
</table>
<!-- InstanceBeginEditable name="EditRegion7" --><!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
<?php
}
?>
ASKER
Section Two: applenders_sub.php
<?php
require '../Connections/db_gl_conn ect.php';
if ($logged_in == 0) {
die('Sorry you are not logged in, this area is restricted to registered agents. <a href="agent_login.php">Cli ck here</a> to log in.');
$db_object->disconnect();
}
$prefstate = $_COOKIE['prefstate'];
if (isset($_POST['submit'])) { // if data on form is to be saved...
function numericOnly($string) { //function to strip characters other than numerals from a string
$numString = ereg_replace("[^[:digit:]] ", "", $string);
return $numString;
}
$listnumber = $_POST['idnumber'];
//Pull all of the selected states from the post...
$msgid = 'sentmsg'.$listnumber;
$msg = $_POST[$msgid];
$aData = split(";",$msg);
$s = 'DELETE FROM lender_states WHERE lenderid = '.$listnumber.';';
for ( $i = 0; $i < count($aData); $i++ ) {
$thisVar = split(":",$aData[$i]);
$postName = $thisVar[0];
$postValue = $thisVar[1];
$length = strlen($postValue);
if ($length > 3) {
$value = substr($postValue,0,strlen ($postValu e)-3);
$s .= "INSERT INTO lender_states (lenderid, state) Values (".$listnumber.", '".$value."');";
}
}
$sql = $db_object->query($s);
if (DB::isError($sql)) {
die($s." ".$sql->getMessage());
}
$date = date('m d, Y');
$table_name = 'lenderinfo';
if ($listnumber == 'abc') {
$cr=chr(0x0D); //search for all LFCR and replace with <br />
$lf=chr(0x0A);
$programs = str_replace($cr.$lf, "<br />", $_POST['programsL']);
$fields_values = array(
'company' => $_POST['companyL'],
'phone' => numericOnly($_POST['phoneL ']), //Strip everything but the numbers....
'ext' => numericOnly($_POST['extL'] ),
'cellphone' => numericOnly($_POST['cellph oneL']),
'fax' => numericOnly($_POST['faxL'] ),
'email' => $_POST['emailL'],
'programs' => $programs,
'firstname' => $_POST['firstnameL'],
'lastname' => $_POST['lastnameL'],
'address' => $_POST['addressL'],
'city' => $_POST['cityL'],
'state' => $_POST['stateL'],
'zip' => $_POST['zipL'],
'lenderstation' => $_SESSION['busunit']
);
$res = $db_object->autoExecute($t able_name, $fields_values, DB_AUTOQUERY_INSERT);
if (DB::isError($res)) {
die($res->getMessage());
}
}
else {
$cr=chr(0x0D); //search for all LFCR and replace with \n\r
$lf=chr(0x0A);
$programs = str_replace($cr.$lf, "<br />",$_POST['programs'.$lis tnumber]);
$fields_values = array(
'company' => $_POST['company'.$listnumb er],
'phone' => numericOnly($_POST['phone' .$listnumb er]), //Strip everything but the numbers....
'ext' => numericOnly($_POST['ext'.$ listnumber ]),
'cellphone' => numericOnly($_POST['cellph one'.$list number]),
'fax' => numericOnly($_POST['fax'.$ listnumber ]),
'email' => $_POST['email'.$listnumber ],
'programs' => $programs,
'firstname' => $_POST['firstname'.$listnu mber],
'lastname' => $_POST['lastname'.$listnum ber],
'address' => $_POST['address'.$listnumb er],
'city' => $_POST['city'.$listnumber] ,
'state' => $_POST['state'.$listnumber ],
'zip' => $_POST['zip'.$listnumber],
'lenderstation' => $_SESSION['busunit']
);
$res = $db_object->autoExecute($t able_name, $fields_values, DB_AUTOQUERY_UPDATE, 'lenderid = '.$listnumber);
if (DB::isError($res)) {
die($res->getMessage());
}
}
$db_object->disconnect();
echo("<script language='javascript' type='text/javascript'>
window.location.href = 'https://secure.EvergreenMortgageInc.com/agents/applenders.php';
</script>");
} else { // if form hasn't been submitted
if (($prefstate != '') && ($prefstate != '*All*')) {
$sql = "SELECT * FROM lenderinfo WHERE lenderstation = '".$_SESSION['busunit']."'
AND lenderid in (SELECT lenderid FROM lender_states WHERE state = '".$prefstate."')
ORDER BY status,company";
} else {
$sql = "SELECT * FROM lenderinfo WHERE lenderstation = '".$_SESSION['busunit']."' ORDER BY status,company";
}
$check = $db_object->query($sql);
if (DB::isError($check)) {
echo("<script language='javascript' type='text/javascript'>
alert('There was an error opening the Approved Lenders data.\\nPlease login again');
window.location.href = 'https://secure.EvergreenMortgageInc.com/agents/agent_login.php';
</script>");
die($check->getMessage());
}
function formatPhone($phone) {
if (empty($phone)) return "";
sscanf($phone, "%3d%3d%4s", $area, $prefix, $exchange);
$out = @$area ? "($area) " : "";
$out .= $prefix . '-' . $exchange;
return $out;
}
function getGlyph($value) {
$hrd = round(($value*2), 0)/2;
if ($hrd == 0.5) {
$glyphname = "0_5.gif";
}
elseif ($hrd == 1) {
$glyphname = "1.gif";
}
elseif ($hrd == 1.5) {
$glyphname = "1_5.gif";
}
elseif ($hrd == 2) {
$glyphname = "2.gif";
}
elseif ($hrd == 2.5) {
$glyphname = "2_5.gif";
}
elseif ($hrd == 3) {
$glyphname = "3.gif";
}
elseif ($hrd == 3.5) {
$glyphname = "3_5.gif";
}
elseif ($hrd == 4) {
$glyphname = "4.gif";
}
elseif ($hrd == 4.5) {
$glyphname = "4_5.gif";
}
elseif ($hrd == 5) {
$glyphname = "5.gif";
}
else {
$glyphname = "unrated.gif";
}
return $glyphname;
}
?>
<html><!-- InstanceBegin template="/Templates/Secur e_Sub_Agen ts.dwt.php " codeOutsideHTMLIsLocked="f alse" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Evergreen Mortgage Inc.</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" -->
<link href="../css/evergreen.css " rel="stylesheet" type="text/css">
<script language="JavaScript" src="../scripts/applenders .js" type="text/javascript"></s cript>
<?php
echo("
<script language='JavaScript'>
var lendersArray=new Array();\n");
while ($info = $check->fetchRow()) {
echo("lendersArray[lenders Array.leng th] = 'ala".$info['lenderid']."' ;\n");
}
echo("
lendersArray[lendersArray. length] = 'addLender';\n
</script>");
?>
<style type="text/css">
<!--
iframe {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
border: 1px solid;
position: relative;
height: 63px;
width: 103px;
}
-->
</style>
<!-- InstanceEndEditable -->
<script language="JavaScript" type="text/javascript" src="../scripts/secure_age nts.js"></ script>
<SCRIPT>
function getTag(el,str) {
while ((el!=null) && (str.indexOf(el.tagName + ":")<0))
el = el.parentElement
return el
}
function navigateTo(sURL,target) {
if ((target == '_self') || (target=="")) {
window.location.replace(sU RL);
return false;
}
if (target == '_top') {
top.window.location.replac e(sURL);
return false
}
if (target =='_parent') {
parent.window.location.rep lace(sURL) ;
return false;
}
if (target == '_blank' || parent.frames.length < 1) {
window.open(sURL, target);
return false;
}
else {
if (parent.frames[target])
parent.frames[target].loca tion.repla ce(sURL);
else
window.open(sURL, target);
return false;
}
}
function checkIEClick() {
var el = getTag(event.srcElement,"A :AREA:")
if ((el!=null) && ((el.tagName=="A") || (el.tagName=="AREA"))) {
event.returnValue = false
navigateTo(el.href,String( el.target) .toLowerCa se())
}
}
function checkNSClick(ev) {
if (ev.target.href) {
navigateTo(ev.target.href, String(ev. target).to LowerCase( ))
return false
}
}
if ((document.all) || (document.layers))
if (document.layers) {
document.captureEvents(Eve nt.CLICK)
document.onclick = checkNSClick
}
else
document.onclick = checkIEClick
</SCRIPT>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<!-- InstanceBeginEditable name="Body_Script" --><!-- InstanceEndEditable -->
<table width=800 border=0 cellspacing=0 cellpadding=0>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="2"></td>
</tr>
<tr>
<td colspan="3"><img src="../images/top_bar.gif " width="800" height="12"></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="2"></td>
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="4"></td>
</tr>
<tr>
<td align="center" valign="middle"><img src="../images/logo.gif" width="174" height="64" hspace="13"></td>
<td background="../images/menu _vert_divi der.gif">< img src="../images/spacer.gif" width=4 height=1></td>
<td bgcolor="#909B8E"><!-- InstanceBeginEditable name="Page Header" --><img src="../images/top_shadow. gif" width="594" height="75"><!-- InstanceEndEditable --></td>
</tr>
<tr>
<td><img src="../images/spacer.gif" width="1" height="2"></td>
<td background="../images/menu _vert_divi der.gif">< img src="../images/spacer.gif" width=4 height=1></td>
<td><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td><img src="../images/spacer.gif" width="200" height="2"></td>
<td background="../images/menu _vert_divi der.gif">< img src="../images/spacer.gif" width=4 height=1></td>
<td><img src="../images/spacer.gif" width="596" height="1"></td>
</tr>
<tr valign="top">
<td background="../images/menu _2_divider .gif">
<table border="0" cellpadding="0" cellspacing="0" background="../images/menu _backgroun d4.gif">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<!-- InstanceBeginEditable name="Side Menu" -->
<tr>
<td colspan="2"><img src="../images/spacer.gif" width="176" height="60"></td>
<td rowspan="11"><img src="../images/spacer.gif" width="24" height="1"></td>
</tr>
<!-- InstanceEndEditable -->
<tr>
<td colspan="2" align="right"><a href="http://www.EvergreenMortgageInc.com"><img src="../images/home.gif" width="40" height="16" border="0"></a></td>
</tr>
<tr>
<td colspan="2"><img src="../images/spacer.gif" width="1" height="7"></td>
</tr>
<tr>
<td colspan="2" align="right"><a href="agentsmain.php"><img src="../images/agents_main .gif" width="91" height="16" border="0"></a></td>
</tr>
<tr>
<td colspan="2"><img src="../images/spacer.gif" width="1" height="8"></td>
</tr>
<tr><td>
<div align="right" id=Outline name=Outline>
<img src="../images/welcome.gif " alt="Welcome" width="48" height="17" id=Out1a style="cursor: hand" class="Outline"><img src='../images/closed_arro w.gif' width="8" height="8" vspace="3" id=Out1 style="cursor: hand" class="Outline"><br>
<div align="right" id=Out1d style="display:None">
<A href='welcome.html'><img src="../images/welcome_sub .gif" alt="Welcome Agents" width="40" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
<A href='successful_agent.htm l'><img src="../images/welcome_suc cessful.gi f" alt="How to be a successful Agent" width="135" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
<A href='manage_loans.html'>< img src="../images/welcome_man age.gif" alt="How to manage your loans" width="125" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
</div>
<img src="../images/prospect_li st.gif" alt="Prospect List" width="68" height="17" id=Out2a style="cursor: hand" class="Outline"><img src='../images/closed_arro w.gif' width="8" height="8" vspace="3" id=Out2 style="cursor: hand" class="Outline"><br>
<div align="right" id=Out2d style="display:None">
<A href='prospect_list.php'>< img src="../images/prospect_li st_sub.gif " alt="Prospect List" width="57" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
<A href='phone_script.html' target="_blank"><img src="../images/prospect_sc ript.gif" alt="Phone Script" width="56" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
</div>
<img src="../images/matrix.gif" alt="Open a Matrix" width="76" height="17" id=Out3a style="cursor: hand" class="Outline" border=0><img src='../images/closed_arro w.gif' width="8" height="8" vspace="3" id=Out3 style="cursor: hand" class="Outline"><br>
<div align="right" id=Out3d style="display:None">
<A href='open_matrix.php'><im g src="../images/open_matrix _sub.gif" alt="Open a Matrix" width="63" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
<A href='print_matrix.html' target="_blank"><img src="../images/print_matri x.gif" alt="Print a Blank Matrix" width="88" height="14" border=0><IMG src="../images/spacer.gif" height=1 width=20 border=0></A><br>
</div>
<A href="lender_replies.php"> <img src="../images/lender_repl ies.gif" alt="Lender Replies" width="78" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="applenders.php"><img src="../images/applenders. gif" alt="Approved Lenders" width="96" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="forum/"><img src="../images/forum.gif" alt="Agent's Forum" width="77" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="download.php"><img src="../images/downloads.g if" alt="Agent's Forum" width="60" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="lifeplan.html"><img src="../images/lifeplan.gi f" alt="Agent's Forum" width="47" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
<A href="logout.php"><img src="../images/logout.gif" alt="Agent's Forum" width="40" height="17" border=0><img src='../images/spacer.gif' width="8" height="8" border=0></A><br>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript">Outl ine.onclic k=doOutlin e</script>
</td>
<td background="../images/menu _vert_divi der.gif">< img src="../images/spacer.gif" width=4 height=250></td>
<td valign="top" background="../images/bkGr nd.gif">
<table border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#FFFFFF">
<td colspan="5"><img src="../images/spacer.gif" width="1" height="20"></td>
</tr>
<tr>
<td><img src="../images/spacer.gif" width="20" height="6"></td>
<td><img src="../images/spacer.gif" width="7" height="1"></td>
<td><img src="../images/spacer.gif" width="4" height="1"></td>
<td><img src="../images/spacer.gif" width="545" height="1"></td>
<td><img src="../images/spacer.gif" width="20" height="1"></td>
</tr>
<tr>
<td><img src="../images/spacer.gif" width="20" height="1"></td>
<td colspan="3"><!-- InstanceBeginEditable name="Page SubHeader" --><img src="../images/approved_le nders_head er.gif" width="267" height="21"><!-- InstanceEndEditable --></td>
<td rowspan="4"><img src="../images/spacer.gif" width="20" height="1"></td>
</tr>
<tr>
<td rowspan="3"><img src="../images/spacer.gif" width="20" height="1"></td>
<td valign="top"><img src="../images/page_linerV .gif" width="7" height="102"></td>
<td><img src="../images/spacer.gif" width="10" height="1"></td>
<!-- InstanceBeginEditable name="Main Text" -->
<td valign="top">
<?php include('applenders_sub.ph p'); ?>
</td>
<!-- InstanceEndEditable --></tr>
</table></td>
</tr>
<tr>
<td background="../images/menu _2_divider .gif"><img src="../images/spacer.gif" width="1" height="4"></td>
<td colspan="2"><img src="../images/spacer.gif" width=1 height=1></td>
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td background="../images/menu _2_divider .gif"><img src="../images/spacer.gif" width="1" height="68"></td>
<td colspan="2"><img src="../images/spacer.gif" width=1 height=1></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="4"></td>
</tr>
<tr>
<td colspan="3" align="center" background="../images/bott om_bar.gif "> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="http://www.EvergreenMortgageInc.com/our_promise.html"><img src="../images/our_promise 2.gif" width="69" height="14" hspace="21" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="../clients/client_lo gin.php">< img src="../images/client_logi n2.gif" width="68" height="14" hspace="22" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="http://www.EvergreenMortgageInc.com/clients/sample_tracking.html"><img src="../images/loan_tracki ng2.gif" width="79" height="14" hspace="16" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="http://www.EvergreenMortgageInc.com/clients/articles/apr.html"><img src="../images/articles_in terest2.gi f" width="111" height="14" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
<td><a href="agent_login.php"><im g src="../images/agent_login 2.gif" width="67" height="14" hspace="22" border="0"></a></td>
<td valign="top"><img src="../images/menu_middle _line.gif" width="1" height="34" hspace="3"></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif" width="1" height="108"></td>
</tr>
<tr>
<td colspan="3" align="center"> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a class="two" href="http://www.EvergreenMortgageInc.com/our_promise.html">Our Promise</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="../../clients/client _login.php ">Client Login</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="http://www.EvergreenMortgageInc.com/clients/sample_tracking.html">Loan Tracking</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="http://www.EvergreenMortgageInc.com/clients/articles/apr.html">Articles of Interest</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="../../agents/agent_l ogin.php"> Agent Login</a></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3" align="center"> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a class="two" href="#">Privacy Policy</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="#">Legal Statement</a></td>
<td><img src="../images/menu_bottom _line.gif" width="1" height="15" hspace="3"></td>
<td><a class="two" href="#">Contact Us</a></td>
</tr>
</table></td>
</tr>
</table>
<!-- InstanceBeginEditable name="EditRegion7" --><!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
<?php
}
?>
<?php
require '../Connections/db_gl_conn
if ($logged_in == 0) {
die('Sorry you are not logged in, this area is restricted to registered agents. <a href="agent_login.php">Cli
$db_object->disconnect();
}
$prefstate = $_COOKIE['prefstate'];
if (isset($_POST['submit'])) { // if data on form is to be saved...
function numericOnly($string) { //function to strip characters other than numerals from a string
$numString = ereg_replace("[^[:digit:]]
return $numString;
}
$listnumber = $_POST['idnumber'];
//Pull all of the selected states from the post...
$msgid = 'sentmsg'.$listnumber;
$msg = $_POST[$msgid];
$aData = split(";",$msg);
$s = 'DELETE FROM lender_states WHERE lenderid = '.$listnumber.';';
for ( $i = 0; $i < count($aData); $i++ ) {
$thisVar = split(":",$aData[$i]);
$postName = $thisVar[0];
$postValue = $thisVar[1];
$length = strlen($postValue);
if ($length > 3) {
$value = substr($postValue,0,strlen
$s .= "INSERT INTO lender_states (lenderid, state) Values (".$listnumber.", '".$value."');";
}
}
$sql = $db_object->query($s);
if (DB::isError($sql)) {
die($s." ".$sql->getMessage());
}
$date = date('m d, Y');
$table_name = 'lenderinfo';
if ($listnumber == 'abc') {
$cr=chr(0x0D); //search for all LFCR and replace with <br />
$lf=chr(0x0A);
$programs = str_replace($cr.$lf, "<br />", $_POST['programsL']);
$fields_values = array(
'company' => $_POST['companyL'],
'phone' => numericOnly($_POST['phoneL
'ext' => numericOnly($_POST['extL']
'cellphone' => numericOnly($_POST['cellph
'fax' => numericOnly($_POST['faxL']
'email' => $_POST['emailL'],
'programs' => $programs,
'firstname' => $_POST['firstnameL'],
'lastname' => $_POST['lastnameL'],
'address' => $_POST['addressL'],
'city' => $_POST['cityL'],
'state' => $_POST['stateL'],
'zip' => $_POST['zipL'],
'lenderstation' => $_SESSION['busunit']
);
$res = $db_object->autoExecute($t
if (DB::isError($res)) {
die($res->getMessage());
}
}
else {
$cr=chr(0x0D); //search for all LFCR and replace with \n\r
$lf=chr(0x0A);
$programs = str_replace($cr.$lf, "<br />",$_POST['programs'.$lis
$fields_values = array(
'company' => $_POST['company'.$listnumb
'phone' => numericOnly($_POST['phone'
'ext' => numericOnly($_POST['ext'.$
'cellphone' => numericOnly($_POST['cellph
'fax' => numericOnly($_POST['fax'.$
'email' => $_POST['email'.$listnumber
'programs' => $programs,
'firstname' => $_POST['firstname'.$listnu
'lastname' => $_POST['lastname'.$listnum
'address' => $_POST['address'.$listnumb
'city' => $_POST['city'.$listnumber]
'state' => $_POST['state'.$listnumber
'zip' => $_POST['zip'.$listnumber],
'lenderstation' => $_SESSION['busunit']
);
$res = $db_object->autoExecute($t
if (DB::isError($res)) {
die($res->getMessage());
}
}
$db_object->disconnect();
echo("<script language='javascript' type='text/javascript'>
window.location.href = 'https://secure.EvergreenMortgageInc.com/agents/applenders.php';
</script>");
} else { // if form hasn't been submitted
if (($prefstate != '') && ($prefstate != '*All*')) {
$sql = "SELECT * FROM lenderinfo WHERE lenderstation = '".$_SESSION['busunit']."'
AND lenderid in (SELECT lenderid FROM lender_states WHERE state = '".$prefstate."')
ORDER BY status,company";
} else {
$sql = "SELECT * FROM lenderinfo WHERE lenderstation = '".$_SESSION['busunit']."'
}
$check = $db_object->query($sql);
if (DB::isError($check)) {
echo("<script language='javascript' type='text/javascript'>
alert('There was an error opening the Approved Lenders data.\\nPlease login again');
window.location.href = 'https://secure.EvergreenMortgageInc.com/agents/agent_login.php';
</script>");
die($check->getMessage());
}
function formatPhone($phone) {
if (empty($phone)) return "";
sscanf($phone, "%3d%3d%4s", $area, $prefix, $exchange);
$out = @$area ? "($area) " : "";
$out .= $prefix . '-' . $exchange;
return $out;
}
function getGlyph($value) {
$hrd = round(($value*2), 0)/2;
if ($hrd == 0.5) {
$glyphname = "0_5.gif";
}
elseif ($hrd == 1) {
$glyphname = "1.gif";
}
elseif ($hrd == 1.5) {
$glyphname = "1_5.gif";
}
elseif ($hrd == 2) {
$glyphname = "2.gif";
}
elseif ($hrd == 2.5) {
$glyphname = "2_5.gif";
}
elseif ($hrd == 3) {
$glyphname = "3.gif";
}
elseif ($hrd == 3.5) {
$glyphname = "3_5.gif";
}
elseif ($hrd == 4) {
$glyphname = "4.gif";
}
elseif ($hrd == 4.5) {
$glyphname = "4_5.gif";
}
elseif ($hrd == 5) {
$glyphname = "5.gif";
}
else {
$glyphname = "unrated.gif";
}
return $glyphname;
}
?>
<html><!-- InstanceBegin template="/Templates/Secur
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Evergreen Mortgage Inc.</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" -->
<link href="../css/evergreen.css
<script language="JavaScript" src="../scripts/applenders
<?php
echo("
<script language='JavaScript'>
var lendersArray=new Array();\n");
while ($info = $check->fetchRow()) {
echo("lendersArray[lenders
}
echo("
lendersArray[lendersArray.
</script>");
?>
<style type="text/css">
<!--
iframe {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
border: 1px solid;
position: relative;
height: 63px;
width: 103px;
}
-->
</style>
<!-- InstanceEndEditable -->
<script language="JavaScript" type="text/javascript" src="../scripts/secure_age
<SCRIPT>
function getTag(el,str) {
while ((el!=null) && (str.indexOf(el.tagName + ":")<0))
el = el.parentElement
return el
}
function navigateTo(sURL,target) {
if ((target == '_self') || (target=="")) {
window.location.replace(sU
return false;
}
if (target == '_top') {
top.window.location.replac
return false
}
if (target =='_parent') {
parent.window.location.rep
return false;
}
if (target == '_blank' || parent.frames.length < 1) {
window.open(sURL, target);
return false;
}
else {
if (parent.frames[target])
parent.frames[target].loca
else
window.open(sURL, target);
return false;
}
}
function checkIEClick() {
var el = getTag(event.srcElement,"A
if ((el!=null) && ((el.tagName=="A") || (el.tagName=="AREA"))) {
event.returnValue = false
navigateTo(el.href,String(
}
}
function checkNSClick(ev) {
if (ev.target.href) {
navigateTo(ev.target.href,
return false
}
}
if ((document.all) || (document.layers))
if (document.layers) {
document.captureEvents(Eve
document.onclick = checkNSClick
}
else
document.onclick = checkIEClick
</SCRIPT>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<!-- InstanceBeginEditable name="Body_Script" --><!-- InstanceEndEditable -->
<table width=800 border=0 cellspacing=0 cellpadding=0>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3"><img src="../images/top_bar.gif
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td align="center" valign="middle"><img src="../images/logo.gif" width="174" height="64" hspace="13"></td>
<td background="../images/menu
<td bgcolor="#909B8E"><!-- InstanceBeginEditable name="Page Header" --><img src="../images/top_shadow.
</tr>
<tr>
<td><img src="../images/spacer.gif"
<td background="../images/menu
<td><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif"
</tr>
<tr>
<td><img src="../images/spacer.gif"
<td background="../images/menu
<td><img src="../images/spacer.gif"
</tr>
<tr valign="top">
<td background="../images/menu
<table border="0" cellpadding="0" cellspacing="0" background="../images/menu
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<!-- InstanceBeginEditable name="Side Menu" -->
<tr>
<td colspan="2"><img src="../images/spacer.gif"
<td rowspan="11"><img src="../images/spacer.gif"
</tr>
<!-- InstanceEndEditable -->
<tr>
<td colspan="2" align="right"><a href="http://www.EvergreenMortgageInc.com"><img src="../images/home.gif" width="40" height="16" border="0"></a></td>
</tr>
<tr>
<td colspan="2"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="2" align="right"><a href="agentsmain.php"><img
</tr>
<tr>
<td colspan="2"><img src="../images/spacer.gif"
</tr>
<tr><td>
<div align="right" id=Outline name=Outline>
<img src="../images/welcome.gif
<div align="right" id=Out1d style="display:None">
<A href='welcome.html'><img src="../images/welcome_sub
<A href='successful_agent.htm
<A href='manage_loans.html'><
</div>
<img src="../images/prospect_li
<div align="right" id=Out2d style="display:None">
<A href='prospect_list.php'><
<A href='phone_script.html' target="_blank"><img src="../images/prospect_sc
</div>
<img src="../images/matrix.gif"
<div align="right" id=Out3d style="display:None">
<A href='open_matrix.php'><im
<A href='print_matrix.html' target="_blank"><img src="../images/print_matri
</div>
<A href="lender_replies.php">
<A href="applenders.php"><img
<A href="forum/"><img src="../images/forum.gif" alt="Agent's Forum" width="77" height="17" border=0><img src='../images/spacer.gif'
<A href="download.php"><img src="../images/downloads.g
<A href="lifeplan.html"><img src="../images/lifeplan.gi
<A href="logout.php"><img src="../images/logout.gif"
</div></td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript">Outl
</td>
<td background="../images/menu
<td valign="top" background="../images/bkGr
<table border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#FFFFFF">
<td colspan="5"><img src="../images/spacer.gif"
</tr>
<tr>
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
</tr>
<tr>
<td><img src="../images/spacer.gif"
<td colspan="3"><!-- InstanceBeginEditable name="Page SubHeader" --><img src="../images/approved_le
<td rowspan="4"><img src="../images/spacer.gif"
</tr>
<tr>
<td rowspan="3"><img src="../images/spacer.gif"
<td valign="top"><img src="../images/page_linerV
<td><img src="../images/spacer.gif"
<!-- InstanceBeginEditable name="Main Text" -->
<td valign="top">
<?php include('applenders_sub.ph
</td>
<!-- InstanceEndEditable --></tr>
</table></td>
</tr>
<tr>
<td background="../images/menu
<td colspan="2"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" bgcolor="#B5BABB"><img src="../images/spacer.gif"
</tr>
<tr>
<td background="../images/menu
<td colspan="2"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" align="center" background="../images/bott
<tr>
<td valign="top"><img src="../images/menu_middle
<td><a href="http://www.EvergreenMortgageInc.com/our_promise.html"><img src="../images/our_promise
<td valign="top"><img src="../images/menu_middle
<td><a href="../clients/client_lo
<td valign="top"><img src="../images/menu_middle
<td><a href="http://www.EvergreenMortgageInc.com/clients/sample_tracking.html"><img src="../images/loan_tracki
<td valign="top"><img src="../images/menu_middle
<td><a href="http://www.EvergreenMortgageInc.com/clients/articles/apr.html"><img src="../images/articles_in
<td valign="top"><img src="../images/menu_middle
<td><a href="agent_login.php"><im
<td valign="top"><img src="../images/menu_middle
</tr>
</table></td>
</tr>
<tr>
<td colspan="3"><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan="3" align="center"> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a class="two" href="http://www.EvergreenMortgageInc.com/our_promise.html">Our Promise</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="../../clients/client
<td><img src="../images/menu_bottom
<td><a class="two" href="http://www.EvergreenMortgageInc.com/clients/sample_tracking.html">Loan Tracking</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="http://www.EvergreenMortgageInc.com/clients/articles/apr.html">Articles of Interest</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="../../agents/agent_l
</tr>
</table></td>
</tr>
<tr>
<td colspan="3" align="center"> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a class="two" href="#">Privacy Policy</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="#">Legal Statement</a></td>
<td><img src="../images/menu_bottom
<td><a class="two" href="#">Contact Us</a></td>
</tr>
</table></td>
</tr>
</table>
<!-- InstanceBeginEditable name="EditRegion7" --><!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
<?php
}
?>
ASKER
Section Two: applenders_sub.php (the listing above was a copy on the main page [section one], sorry).
<?php
echo('
<table border=0 cellspacing=0 cellpadding=0>
<form name=lendersform action="'.$_SERVER['PHP_SE LF'].'" method=post>
<tr><!-- Column spacing -->
<td><img src="../images/spacer.gif" width=30 height=1></td>
<td><img src="../images/spacer.gif" width=150 height=1></td>
<td><img src="../images/spacer.gif" width=301 height=1></td>
<td><img src="../images/spacer.gif" width=86 height=1></td>
</tr>
<tr>
<td colspan=2><img src="../images/spacer.gif" width=1 height=1></td>
<td align=right><span class=five>Lender Region:</span></td>
<td><select name=prefstate onChange=SetCookie(\'prefs tate\')><o ption value='.$prefstate.' selected>'.$prefstate.'</o ption><opt ion value=*All*>*All*</option> <option value=AL>AL</option><optio n value=AK>AK</option><optio n value=AZ>AZ</option><optio n value=AR>AR</option><optio n value=CA>CA</option><optio n value=CO>CO</option><optio n value=CT>CT</option><optio n value=DE>DE</option><optio n value=DC>DC</option><optio n value=FL>FL</option><optio n value=GA>GA</option><optio n value=HI>HI</option><optio n value=ID>ID</option><optio n value=IL>IL</option><optio n value=IN>IN</option><optio n value=IA>IA</option><optio n value=KS>KS</option><optio n value=KY>KY</option><optio n value=LA>LA</option><optio n value=ME>ME</option><optio n value=MD>MD</option>
<option value=MA>MA</option><optio n value=MI>MI</option><optio n value=MN>MN</option><optio n value=MS>MS</option><optio n value=MO>MO</option><optio n value=MT>MT</option><optio n value=NE>NE</option><optio n value=NV>NV</option><optio n value=NH>NH</option><optio n value=NJ>NJ</option><optio n value=NM>NM</option><optio n value=NY>NY</option><optio n value=NC>NC</option><optio n value=ND>ND</option><optio n value=OH>OH</option><optio n value=OK>OK</option><optio n value=OR>OR</option><optio n value=PA>PA</option><optio n value=RI>RI</option><optio n value=SC>SC</option><optio n value=SD>SD</option><optio n value=TN>TN</option><optio n value=TX>TX</option><optio n value=UT>UT</option><optio n value=VT>VT</option><optio n value=VA>VA</option><optio n value=WA>WA</option><optio n value=WV>WV</option>
<option value=WI>WI</option><optio n value=WY>WY</option></sele ct></td>
</tr>
<tr><!-- Header -->
<td><span class=five> </span></ td>
<td><span class=five>Lender</span></ td>
<td><span class=five>Best Programs</span></td>
<td align=center><span class=five>Rating</span></ td>
</tr>
<tr>
<td colspan=5><img src="../images/dot_blue.gi f" width=567 height=1></td>
</tr>
');
$counter = 0;
while ($info = $check->fetchRow(DB_FETCHM ODE_ASSOC, $counter)) {
$counter++;
echo('<tr>
<td align=center valign=top><img src="../images/spacer.gif" width=1 height=7><br />
<input style="background-image:ur l(../image s/pencil.g if); width:21px;height:20;borde r:0px;curs or=pointer ;cursor:ha nd;" name=edit'.$info['lenderid '].' type=button value="" onClick="openEdits(lenders Array,\''. $info['len derid'].'\ ',\'ala'.$ info['lend erid'].'\' );">
');
if (($_SESSION['agenttype'] == 'admin') || ($_SESSION['agenttype'] == 'srmanager')) {
echo('<br /><img src="../images/spacer.gif" width=1 height=7><br />
<input style="background-image:ur l(../image s/delete.g if); width:21px; height:20; border:0px;cursor=pointer; cursor:han d;" name=delete'.$info['lender id'].' type=button value="" onClick="deleteLender(\''. $info['len derid'].'\ ',\''.$inf o['company '].'\');">
');
}
echo('<br /><img src="../images/spacer.gif" width=1 height=7><br />
<a href="mailto:'.$info['emai l'].'" target=_blank><img src="../images/email.gif" width=21 height=20 border=0;></a>
');
if ($info['status'] == 'a') {
echo('</td>
<td valign=top id='.$info['lenderid'].'>< span class=four><b>'.$info['com pany'].'</ b><br />'.$info['firstname'].' '.$info['lastname'].'<br />
');
} else {
echo('</td>
<td valign=top id='.$info['lenderid'].'>< span class="four-"><b>'.$info[' company']. '</b><br />'.$info['firstname'].' '.$info['lastname'].'<br />
');
}
if ($info['ext'] <> '') {
echo('Phone: '.formatPhone($info['phone ']).' x: '.$info['ext'].' <br />
');
}
else {
echo('Phone: '.formatPhone($info['phone ']).'<br />
');
}
echo('Fax: '.formatPhone($info['fax'] ).'<br />
Mobile: '.formatPhone($info['cellp hone']).'< /span></td >
<td rowspan=2 valign=top><span class=four>'.stripslashes( $info['pro grams']).' </span></t d>
<td valign=top align=center><img src="../images/spacer.gif" width=1 height=10><br /><img src="../images/'.getGlyph( $info['rat ing']).'" width=80 height=13><br />
<br /><input style="background-image:ur l(../image s/opinions .gif); width:106px; height:25;border:0px;curso r=pointer; cursor:han d;" name=rcard type=button value="" onClick="openRC(\''.$info[ 'lenderid' ].'\',\''. $info['com pany'].'\' ,\''.$info ['firstnam e'].' '.$info['lastname'].'\',\' '.getGlyph ($info['ra ting']).'\ ');"></td>
</tr>
<tr>
<td><img src="../images/spacer.gif" width=1 height=1></td>
<td><img src="../images/spacer.gif" width=1 height=1></td>
<td><img src="../images/spacer.gif" width=1 height=1></td>
</tr>
<tr>
<td colspan=4><img src="../images/dot_blue.gi f" width=567 height=1></td>
</tr>
');
}
echo('
<tr>
<td colspan=4><img src="../images/spacer.gif" width=1 height=12></td>
</tr>
<tr>
<td colspan=4 align=center><input id=addButton style="background-image:ur l(../image s/addlende r.gif); width:143px; height:25;border:0px;curso r=pointer; cursor:han d;" name=newlender type=button value="" onClick="addLender(lenders Array,\'ad dLender\') "></td>
</tr>
<tr>
<td colspan=4><img src="../images/spacer.gif" width=1 height=12></td>
</tr>
</form>
</table>
');
include('applenders_sub_su b.php');
echo("
<div id='addLender' style='visibility:hidden;p osition:ab solute;lef t:193px;to p:193px;bo rder:2px solid black;'>
<table width='567' border='0' cellspacing='0' cellpadding='0' background='../images/bkGr nd.gif'>
<form name='formLender' action='".$_SERVER['PHP_SE LF']."' method='post'>
<tr>
<td><img src='../images/spacer.gif' width=110 height=1></td>
<td><img src='../images/spacer.gif' width=457 height=1></td>
</tr>
<tr>
<td align='right'><span class='four'>Company Name</span></td>
<td><span class='four'><input name='companyL' type='text' size='30' maxlength='120' value=''><input name='idnumber' value='abc' type='hidden'></span></td> </tr>
<tr>
<td align='right'><span class='four'>Address</span ></td>
<td><span class='four'><input name='addressL' type='text' size='40' maxlength='120' value=''></span></td>
</tr>
<tr>
<td align='right'><span class='four'>City</span></ td>
<td><span class='four'><input name='cityL' type='text' size='20' maxlength='40' value=''> State
<select name='state16'><option value='' selected></option><option value='AL'>AL</option><opt ion value='AK'>AK</option><opt ion value='AZ'>AZ</option><opt ion value='AR'>AR</option><opt ion value='CA'>CA</option><opt ion value='CO'>CO</option><opt ion value='CT'>CT</option><opt ion value='DE'>DE</option><opt ion value='DC'>DC</option><opt ion value='FL'>FL</option><opt ion value='GA'>GA</option><opt ion value='HI'>HI</option><opt ion value='ID'>ID</option><opt ion value='IL'>IL</option><opt ion value='IN'>IN</option><opt ion value='IA'>IA</option><opt ion value='KS'>KS</option><opt ion value='KY'>KY</option><opt ion value='LA'>LA</option><opt ion value='ME'>ME</option><opt ion value='MD'>MD</option>
<option value='MA'>MA</option><opt ion value='MI'>MI</option><opt ion value='MN'>MN</option><opt ion value='MS'>MS</option><opt ion value='MO'>MO</option><opt ion value='MT'>MT</option><opt ion value='NE'>NE</option><opt ion value='NV'>NV</option><opt ion value='NH'>NH</option><opt ion value='NJ'>NJ</option><opt ion value='NM'>NM</option><opt ion value='NY'>NY</option><opt ion value='NC'>NC</option><opt ion value='ND'>ND</option><opt ion value='OH'>OH</option><opt ion value='OK'>OK</option><opt ion value='OR'>OR</option><opt ion value='PA'>PA</option><opt ion value='RI'>RI</option><opt ion value='SC'>SC</option><opt ion value='SD'>SD</option><opt ion value='TN'>TN</option><opt ion value='TX'>TX</option><opt ion value='UT'>UT</option><opt ion value='VT'>VT</option><opt ion value='VA'>VA</option><opt ion value='WA'>WA</option><opt ion value='WV'>WV</option>
<option value='WI'>WI</option><opt ion value='WY'>WY</option></se lect>
Zip <input name='zipL' type='text' size='6' maxlength='10' value=''></span></td>
</tr>
<tr>
<td align='right'><span class='four'>First Name</span></td>
<td><span class='four'><input name='firstnameL' type='text' size='16' maxlength='20' value=''> Last Name <input name='lastnameL' type='text' size='16' maxlength='20' value=''></span></td>
</tr>
<tr>
<td align='right'><span class='four'>Phone</span>< /td>
<td><span class='four'><input name='phoneL' type='text' size='14' maxlength='14' value=''> Ext <i nput name='extL' type='text' size='6' maxlength='6' value=''> Fax <i nput name='faxL' type='text' size='14' maxlength='14' value=''> Mobile  ;<input name='cellphoneL' type='text' size='14' maxlength='14' value=''></span></td>
</tr>
<tr>
<td align='right'><span class='four'>Email</span>< /td>
<td><span class='four'><input name='emailL' type='text' size='60' maxlength='120' value=''></span></td>
</tr>
<tr>
<td align='right'><span class='four'>Best Programs</span></td>
<td><span class='four'><textarea class='one_b' name='programsL'></textare a></span>< /td>
</tr>
<tr>
<td> </td>
<td><input style=\"background-image:u rl(../imag es/save.gi f); width:106px; height:25;border:0px; cursor: hand;\" name='submit' type='submit' value=''>   ;
<input style=\"background-image:u rl(../imag es/cancel. gif); width:106px; height:25;border:0px; cursor: hand;\" name=cancel type=button value='' onClick=\"openEdits(lender sArray,'ad dButton',' addLender' );\">
</td>
<tr>
<td colspan=2><img src='../images/spacer.gif' width=1 height=12></td>
</tr>
</form>
</table>
</div>
");
?>
<?php
echo('
<table border=0 cellspacing=0 cellpadding=0>
<form name=lendersform action="'.$_SERVER['PHP_SE
<tr><!-- Column spacing -->
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan=2><img src="../images/spacer.gif"
<td align=right><span class=five>Lender Region:</span></td>
<td><select name=prefstate onChange=SetCookie(\'prefs
<option value=MA>MA</option><optio
<option value=WI>WI</option><optio
</tr>
<tr><!-- Header -->
<td><span class=five> </span></
<td><span class=five>Lender</span></
<td><span class=five>Best Programs</span></td>
<td align=center><span class=five>Rating</span></
</tr>
<tr>
<td colspan=5><img src="../images/dot_blue.gi
</tr>
');
$counter = 0;
while ($info = $check->fetchRow(DB_FETCHM
$counter++;
echo('<tr>
<td align=center valign=top><img src="../images/spacer.gif"
<input style="background-image:ur
');
if (($_SESSION['agenttype'] == 'admin') || ($_SESSION['agenttype'] == 'srmanager')) {
echo('<br /><img src="../images/spacer.gif"
<input style="background-image:ur
');
}
echo('<br /><img src="../images/spacer.gif"
<a href="mailto:'.$info['emai
');
if ($info['status'] == 'a') {
echo('</td>
<td valign=top id='.$info['lenderid'].'><
');
} else {
echo('</td>
<td valign=top id='.$info['lenderid'].'><
');
}
if ($info['ext'] <> '') {
echo('Phone: '.formatPhone($info['phone
');
}
else {
echo('Phone: '.formatPhone($info['phone
');
}
echo('Fax: '.formatPhone($info['fax']
Mobile: '.formatPhone($info['cellp
<td rowspan=2 valign=top><span class=four>'.stripslashes(
<td valign=top align=center><img src="../images/spacer.gif"
<br /><input style="background-image:ur
</tr>
<tr>
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan=4><img src="../images/dot_blue.gi
</tr>
');
}
echo('
<tr>
<td colspan=4><img src="../images/spacer.gif"
</tr>
<tr>
<td colspan=4 align=center><input id=addButton style="background-image:ur
</tr>
<tr>
<td colspan=4><img src="../images/spacer.gif"
</tr>
</form>
</table>
');
include('applenders_sub_su
echo("
<div id='addLender' style='visibility:hidden;p
<table width='567' border='0' cellspacing='0' cellpadding='0' background='../images/bkGr
<form name='formLender' action='".$_SERVER['PHP_SE
<tr>
<td><img src='../images/spacer.gif'
<td><img src='../images/spacer.gif'
</tr>
<tr>
<td align='right'><span class='four'>Company Name</span></td>
<td><span class='four'><input name='companyL' type='text' size='30' maxlength='120' value=''><input name='idnumber' value='abc' type='hidden'></span></td>
<tr>
<td align='right'><span class='four'>Address</span
<td><span class='four'><input name='addressL' type='text' size='40' maxlength='120' value=''></span></td>
</tr>
<tr>
<td align='right'><span class='four'>City</span></
<td><span class='four'><input name='cityL' type='text' size='20' maxlength='40' value=''> State
<select name='state16'><option value='' selected></option><option value='AL'>AL</option><opt
<option value='MA'>MA</option><opt
<option value='WI'>WI</option><opt
Zip <input name='zipL' type='text' size='6' maxlength='10' value=''></span></td>
</tr>
<tr>
<td align='right'><span class='four'>First Name</span></td>
<td><span class='four'><input name='firstnameL' type='text' size='16' maxlength='20' value=''> Last Name <input name='lastnameL' type='text' size='16' maxlength='20' value=''></span></td>
</tr>
<tr>
<td align='right'><span class='four'>Phone</span><
<td><span class='four'><input name='phoneL' type='text' size='14' maxlength='14' value=''> Ext <i
</tr>
<tr>
<td align='right'><span class='four'>Email</span><
<td><span class='four'><input name='emailL' type='text' size='60' maxlength='120' value=''></span></td>
</tr>
<tr>
<td align='right'><span class='four'>Best Programs</span></td>
<td><span class='four'><textarea class='one_b' name='programsL'></textare
</tr>
<tr>
<td> </td>
<td><input style=\"background-image:u
<input style=\"background-image:u
</td>
<tr>
<td colspan=2><img src='../images/spacer.gif'
</tr>
</form>
</table>
</div>
");
?>
ASKER
Section Three: applenders_sub_sub.php (This is the page I can comment out and ALL the buttons work as expected)
<?php
$counter = 0;
$cr=chr(0x0D); //search for all <br /> and replace with LFCR
$lf=chr(0x0A);
while ($info = $check->fetchRow(DB_FETCHM ODE_ASSOC, $counter)) {
$counter++;
$programs = str_replace("<br />",$cr.$lf,$info['program s']);
echo('
<div id=ala'.$info['lenderid']. ' style="visibility:hidden;p osition:ab solute;lef t:193px;to p:193px;bo rder:2px solid black;">
<table width=567 border=0 cellspacing=0 cellpadding=0 background="../images/bkGr nd.gif">
<form name="form'.$info['lenderi d'].'" action="'.$_SERVER['PHP_SE LF'].'" method="post" onSubmit="return SubmitMe('.$info['lenderid '].');">
<tr>
<td><img src="../images/spacer.gif" width=110 height=1></td>
<td><img src="../images/spacer.gif" width=348 height=1></td>
<td><img src="../images/spacer.gif" width=102 height=1></td>
</tr><input type=hidden id="sentmsg'.$info['lender id'].'" name="sentmsg'.$info['lend erid'].'" value="">
<tr>
<td align="right"><span class="four">Company Name</span></td>
<td><span class="four"><input name="company'.$info['lend erid'].'" type="text" size="47" maxlength="120" value="'.$info['company']. '"></span> <input name="idnumber" value="'.$info['lenderid'] .'" type="hidden"></td>
<td rowspan=4 valign=top>
<span class="four">Licensed States</span><iframe id="ifm'.$info['lenderid'] .'" name="ifm'.$info['lenderid '].'" src="../images/spacer.gif" ></iframe>
</td>
</tr>
<tr>
<td align="right"><span class="four">Address</span ></td>
<td><span class="four"><input name="address'.$info['lend erid'].'" type="text" size="47" maxlength="120" value="'.$info['address']. '"></span> </td>
</tr>
<tr>
<td align="right"><span class="four">City</span></ td>
<td><span class="four"><input name="city'.$info['lenderi d'].'" type="text" size="20" maxlength="40" value="'.$info['city'].'"> Stat e
<select name="state'.$info['lender id'].'"><o ption value="'.$info['state'].'" selected>'.$info['state']. '</option> <option value="AL">AL</option><opt ion value="AK">AK</option><opt ion value="AZ">AZ</option><opt ion value="AR">AR</option><opt ion value="CA">CA</option><opt ion value="CO">CO</option><opt ion value="CT">CT</option><opt ion value="DE">DE</option><opt ion value="DC">DC</option><opt ion value="FL">FL</option><opt ion value="GA">GA</option><opt ion value="HI">HI</option><opt ion value="ID">ID</option><opt ion value="IL">IL</option><opt ion value="IN">IN</option><opt ion value="IA">IA</option><opt ion value="KS">KS</option><opt ion value="KY">KY</option><opt ion value="LA">LA</option><opt ion value="ME">ME</option><opt ion value="MD">MD</option>
<option value="MA">MA</option><opt ion value="MI">MI</option><opt ion value="MN">MN</option><opt ion value="MS">MS</option><opt ion value="MO">MO</option><opt ion value="MT">MT</option><opt ion value="NE">NE</option><opt ion value="NV">NV</option><opt ion value="NH">NH</option><opt ion value="NJ">NJ</option><opt ion value="NM">NM</option><opt ion value="NY">NY</option><opt ion value="NC">NC</option><opt ion value="ND">ND</option><opt ion value="OH">OH</option><opt ion value="OK">OK</option><opt ion value="OR">OR</option><opt ion value="PA">PA</option><opt ion value="RI">RI</option><opt ion value="SC">SC</option><opt ion value="SD">SD</option><opt ion value="TN">TN</option><opt ion value="TX">TX</option><opt ion value="UT">UT</option><opt ion value="VT">VT</option><opt ion value="VA">VA</option><opt ion value="WA">WA</option><opt ion value="WV">WV</option>
<option value="WI">WI</option><opt ion value="WY">WY</option></se lect>
Zip <input name="zip'.$info['lenderid '].'" type="text" size="6" maxlength="10" value="'.$info['zip'].'">< /span></td >
</tr>
<tr>
<td align="right"><span class="four">First Name</span></td>
<td><span class="four"><input name="firstname'.$info['le nderid'].' " type="text" size="16" maxlength="20" value="'.$info['firstname' ].'">  ;Last Name <input name="lastname'.$info['len derid'].'" type="text" size="16" maxlength="20" value="'.$info['lastname'] .'"></span ></td>
</tr>
<tr>
<td align="right"><span class="four">Phone</span>< /td>
<td colspan=2><span class="four"><input name="phone'.$info['lender id'].'" type="text" size="14" maxlength="14" value="'.formatPhone($info ['phone']) .'"> Ext < input name="ext'.$info['lenderid '].'" type="text" size="6" maxlength="6" value="'.$info['ext'].'">& nbsp;Fax&n bsp;<input name="fax'.$info['lenderid '].'" type="text" size="14" maxlength="14" value="'.formatPhone($info ['fax']).' "> Mo bile <input name="cellphone'.$info['le nderid'].' " type="text" size="14" maxlength="14" value="'.formatPhone($info ['cellphon e']).'"></ span></td>
</tr>
<tr>
<td align="right"><span class="four">Email</span>< /td>
<td colspan=2><span class="four"><input name="email'.$info['lender id'].'" type="text" size="60" maxlength="120" value="'.$info['email'].'" ></span></ td>
</tr>
<tr>
<td align="right"><span class="four">Best Programs</span></td>
<td colspan=2><span class="four"><textarea class="one_b" name="programs'.$info['len derid'].'" >'.stripsl ashes($pro grams).'</ textarea>< /span></td >
</tr>
<tr>
<td> </td>
<td colspan=2><input style="background-image:ur l(../image s/save.gif ); width:106px; height:25;border:0px; cursor: hand;" name=submit type=submit value="">   ;
<input style="background-image:ur l(../image s/cancel.g if); width:106px; height:25;border:0px; cursor: hand;" name=cancel type=button value="" onClick="openEdits(lenders Array,\''. $info['len derid'].'\ ',\'ala'.$ info['lend erid'].'\' );"></td>
</tr>
<tr>
<td colspan=3><img src="../images/spacer.gif" width=1 height=12></td>
</tr>
</form>
</table>
</div>
');
}
?>
<?php
$counter = 0;
$cr=chr(0x0D); //search for all <br /> and replace with LFCR
$lf=chr(0x0A);
while ($info = $check->fetchRow(DB_FETCHM
$counter++;
$programs = str_replace("<br />",$cr.$lf,$info['program
echo('
<div id=ala'.$info['lenderid'].
<table width=567 border=0 cellspacing=0 cellpadding=0 background="../images/bkGr
<form name="form'.$info['lenderi
<tr>
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
<td><img src="../images/spacer.gif"
</tr><input type=hidden id="sentmsg'.$info['lender
<tr>
<td align="right"><span class="four">Company Name</span></td>
<td><span class="four"><input name="company'.$info['lend
<td rowspan=4 valign=top>
<span class="four">Licensed States</span><iframe id="ifm'.$info['lenderid']
</td>
</tr>
<tr>
<td align="right"><span class="four">Address</span
<td><span class="four"><input name="address'.$info['lend
</tr>
<tr>
<td align="right"><span class="four">City</span></
<td><span class="four"><input name="city'.$info['lenderi
<select name="state'.$info['lender
<option value="MA">MA</option><opt
<option value="WI">WI</option><opt
Zip <input name="zip'.$info['lenderid
</tr>
<tr>
<td align="right"><span class="four">First Name</span></td>
<td><span class="four"><input name="firstname'.$info['le
</tr>
<tr>
<td align="right"><span class="four">Phone</span><
<td colspan=2><span class="four"><input name="phone'.$info['lender
</tr>
<tr>
<td align="right"><span class="four">Email</span><
<td colspan=2><span class="four"><input name="email'.$info['lender
</tr>
<tr>
<td align="right"><span class="four">Best Programs</span></td>
<td colspan=2><span class="four"><textarea class="one_b" name="programs'.$info['len
</tr>
<tr>
<td> </td>
<td colspan=2><input style="background-image:ur
<input style="background-image:ur
</tr>
<tr>
<td colspan=3><img src="../images/spacer.gif"
</tr>
</form>
</table>
</div>
');
}
?>
ASKER
You will notice in the above code that all the buttons are created in a while loop. Therefore if one group of buttons works, they all should work. But they don't. The top three groups of buttons don't work in the IE browser.
Thanks for helping out,
Derrick
Thanks for helping out,
Derrick
Again, can you paste from the resulting page, one of the <input type='button'> which works, and one which doesn't. Also, the openEdits function from scripts/applenders.js or scripts/secure_agents.js, I don't know which.
Can you also change the while loop to change the onclick to start with
onclick="alert('onclick called');openEdits(...
and tell me how that affects the program
Nearly narrowed this down,
_Blue
Can you also change the while loop to change the onclick to start with
onclick="alert('onclick called');openEdits(...
and tell me how that affects the program
Nearly narrowed this down,
_Blue
ASKER
Buttons don't work:
<tr>
<td align=center valign=top><img src="../images/spacer.gif" width=1 height=7><br />
<input style="background-image:ur l(../image s/pencil.g if); width:21px;height:20;borde r:0px;curs or=pointer ;cursor:ha nd;" name=edit67 type=button value="" onClick="openEdits(lenders Array,'67' ,'ala67'); ">
<br /><img src="../images/spacer.gif" width=1 height=7><br />
<input style="background-image:ur l(../image s/delete.g if); width:21px; height:20; border:0px;cursor=pointer; cursor:han d;" name=delete67 type=button value="" onClick="deleteLender('67' ,'Alliance Mortgage Company');">
<br /><img src="../images/spacer.gif" width=1 height=7><br />
<a href="mailto:" target=_blank><img src="../images/email.gif" width=21 height=20 border=0;></a>
</td>
<td valign=top id=67><span class=four><b>Alliance Mortgage Company</b><br /> <br />
Phone: <br />
Fax: <br />
Mobile: </span></td>
<td rowspan=2 valign=top><span class=four>no #</span></td>
<td valign=top align=center><img src="../images/spacer.gif" width=1 height=10><br /><img src="../images/unrated.gif " width=80 height=13><br />
<br /><input style="background-image:ur l(../image s/opinions .gif); width:106px; height:25;border:0px;curso r=pointer; cursor:han d;" name=rcard type=button value="" onClick="openRC('67','Alli ance Mortgage Company',' ','unrated.gif');"></td>
</tr>
Buttons DO work:
<tr>
<td align=center valign=top><img src="../images/spacer.gif" width=1 height=7><br />
<input style="background-image:ur l(../image s/pencil.g if); width:21px;height:20;borde r:0px;curs or=pointer ;cursor:ha nd;" name=edit16 type=button value="" onClick="openEdits(lenders Array,'16' ,'ala16'); ">
<br /><img src="../images/spacer.gif" width=1 height=7><br />
<input style="background-image:ur l(../image s/delete.g if); width:21px; height:20; border:0px;cursor=pointer; cursor:han d;" name=delete16 type=button value="" onClick="deleteLender('16' ,'American Mortgage Network');">
<br /><img src="../images/spacer.gif" width=1 height=7><br />
<a href="mailto:bpacky@amnetm ortgage.co m" target=_blank><img src="../images/email.gif" width=21 height=20 border=0;></a>
</td>
<td valign=top id=16><span class=four><b>American Mortgage Network</b><br />Beverly Packie<br />
Phone: (925) 691-5393<br />
Fax: (925) 691-5394<br />
Mobile: (510) 409-9787</span></td>
<td rowspan=2 valign=top><span class=four>100% to $2 Million with 620 FICO full doc or $650k stated with 660 FICO. Also, non-owner interest only.</span></td>
<td valign=top align=center><img src="../images/spacer.gif" width=1 height=10><br /><img src="../images/unrated.gif " width=80 height=13><br />
<br /><input style="background-image:ur l(../image s/opinions .gif); width:106px; height:25;border:0px;curso r=pointer; cursor:han d;" name=rcard type=button value="" onClick="openRC('16','Amer ican Mortgage Network','Beverly Packie','unrated.gif');">< /td>
</tr>
<tr>
<td align=center valign=top><img src="../images/spacer.gif"
<input style="background-image:ur
<br /><img src="../images/spacer.gif"
<input style="background-image:ur
<br /><img src="../images/spacer.gif"
<a href="mailto:" target=_blank><img src="../images/email.gif" width=21 height=20 border=0;></a>
</td>
<td valign=top id=67><span class=four><b>Alliance Mortgage Company</b><br /> <br />
Phone: <br />
Fax: <br />
Mobile: </span></td>
<td rowspan=2 valign=top><span class=four>no #</span></td>
<td valign=top align=center><img src="../images/spacer.gif"
<br /><input style="background-image:ur
</tr>
Buttons DO work:
<tr>
<td align=center valign=top><img src="../images/spacer.gif"
<input style="background-image:ur
<br /><img src="../images/spacer.gif"
<input style="background-image:ur
<br /><img src="../images/spacer.gif"
<a href="mailto:bpacky@amnetm
</td>
<td valign=top id=16><span class=four><b>American Mortgage Network</b><br />Beverly Packie<br />
Phone: (925) 691-5393<br />
Fax: (925) 691-5394<br />
Mobile: (510) 409-9787</span></td>
<td rowspan=2 valign=top><span class=four>100% to $2 Million with 620 FICO full doc or $650k stated with 660 FICO. Also, non-owner interest only.</span></td>
<td valign=top align=center><img src="../images/spacer.gif"
<br /><input style="background-image:ur
</tr>
ASKER
This is the openEdits javascript function:
function openEdits(idArray,cell,div _id) {
//Load the iframe with the proper source...
theFrame = getElem('ifm'+cell);
theFrame.src = "states.php?lenderid="+cel l;
//Change visibility...
var style_sheet = getStyleObject(div_id);
if (style_sheet) {
var state = style_sheet.visibility;
if (state == "hidden") {
hideAllArray(idArray);
changeObjectVisibility(div _id,"visib le");
}
else {
changeObjectVisibility(div _id,"hidde n");
}
moveBox(cell,div_id);
}
else
{
alert("sorry, this only works in browsers that support Dynamic HTML");
}
}
function getStyleObject(objectId) {
// checkW3C DOM, then MSIE 4, then NN 4.
//
if(document.getElementById && document.getElementById(ob jectId)) {
return document.getElementById(ob jectId).st yle;
}
else if (document.all && document.all(objectId)) {
return document.all(objectId).sty le;
}
else if (document.layers && document.layers[objectId]) {
return document.layers[objectId];
} else {
return false;
}
}
function getElem(div) {
if(document.getElementById && document.getElementById(di v)) {
return document.getElementById(di v);
} else if (document.all && document.all(div)) {
return document.all(div);
} else if (document.layers && document.layers[div]) {
return document.layers[div];
} else {
return false;
}
}
function openEdits(idArray,cell,div
//Load the iframe with the proper source...
theFrame = getElem('ifm'+cell);
theFrame.src = "states.php?lenderid="+cel
//Change visibility...
var style_sheet = getStyleObject(div_id);
if (style_sheet) {
var state = style_sheet.visibility;
if (state == "hidden") {
hideAllArray(idArray);
changeObjectVisibility(div
}
else {
changeObjectVisibility(div
}
moveBox(cell,div_id);
}
else
{
alert("sorry, this only works in browsers that support Dynamic HTML");
}
}
function getStyleObject(objectId) {
// checkW3C DOM, then MSIE 4, then NN 4.
//
if(document.getElementById
return document.getElementById(ob
}
else if (document.all && document.all(objectId)) {
return document.all(objectId).sty
}
else if (document.layers && document.layers[objectId])
return document.layers[objectId];
} else {
return false;
}
}
function getElem(div) {
if(document.getElementById
return document.getElementById(di
} else if (document.all && document.all(div)) {
return document.all(div);
} else if (document.layers && document.layers[div]) {
return document.layers[div];
} else {
return false;
}
}
ASKER
You asked:
Can you also change the while loop to change the onclick to start with
onclick="alert('onclick called');openEdits(...
and tell me how that affects the program
The alert is never fired in IE.
Thanks again,
Derrick
Can you also change the while loop to change the onclick to start with
onclick="alert('onclick called');openEdits(...
and tell me how that affects the program
The alert is never fired in IE.
Thanks again,
Derrick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent! Points for you and a lollypop too.
Those darn IE bugs. (Although it probably isn't a bug, just a matter of me not fully understanding all the programing options with CSS).
Thanks for your help.
Derrick
Those darn IE bugs. (Although it probably isn't a bug, just a matter of me not fully understanding all the programing options with CSS).
Thanks for your help.
Derrick
Yeah, in this case I would think IE had the right behaviour (or at least the common sense behavious). But then, I don't know the W3C specs off by heart.
can you put an alert() at the start of the openEdits() function and confirm that the event isn't firing please.
Also, test in a different browser such as Mozilla (you didn't specify but I assume you're talking about IE here)
Exactly how many records don't work? 7cm is a strange unit to use ;) - and I guess you mean 7cm rather than 70cm (30")
Thanks, hope we can sort this quickly.
_Blue