![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
16/11/2009, 07:46
|
| | Fecha de Ingreso: octubre-2009
Mensajes: 154
Antigüedad: 15 años, 3 meses Puntos: 0 | |
Respuesta: No entra en un bucle este es el codigo html del formulario:
<html><head>
<title>Search</title>
<link href="templates/style/buttons.css" type=text/css rel=stylesheet>
<link href="templates/style/W3C-REC.css" type=text/css rel=stylesheet>
<script language="JavaScript" type="text/javascript">
var bV=parseInt(navigator.appVersion);
NS4=(document.layers)&&(bV>=4) ? true : false;
IE4=((document.all)&&(bV>=4)) ? true : false;
DOM= (!document.layers && !document.all && bV>=4) ? true : false; // A hack to guess if the browser supports the DOM
capable = (NS4 || IE4 || DOM) ? true : false;
function expandIt(){return;}
</script>
</head>
<body {color} background="images/topBG2.png">
<script language="JavaScript" type="text/javascript" src="templates/FX.js">
alert("Error, It Can't Load JavaScript LIBRARY");
</script>
<script>
function recall(form,control)
{
//dir = "select_customer.php?letter="+document.forms[0].elements['letter'].value;
// alert(control);
window.location.href = "search_customer.php?country_html="+document.f orms[0].elements['country_html'].value+"&companylist_html="+document.forms[0].elements['companylist_html'].value;
}
//********************* aqui e puesto search_customer porq yendo hacia selectcustomer3 es lioso *************
</script>
<p align=LEFT>
<table width = 535 height="1" bordercolor="#000080" border="0">
<tr>
<td align = left width="33" valign="top" height="40" bgcolor="#000080">
</td>
<td align = left width="637" valign="top" height="40" bgcolor="#000080">
<h1>{NAME} Customer</h1></font>
</td>
</tr>
<tr>
<td align = left width="33" valign="top" height="1">
</td>
<td align = left width="637" valign="top" height="1">
</td>
</tr>
<tr>
<td align = left width="33" valign="top" height="13" bgcolor="#000099">
</td>
<td align = left width="637" valign="top" height="13" bgcolor="#000099">
<font color="#FFFFFF" face="Arial Black">Please enter the information about the Customer you
wish to find</font>
</td>
</tr>
<tr>
<td align = left width="33" valign="top" height="1">
</td>
<td align = left width="637" valign="top" height="1">
</td>
</tr>
<tr>
<td align = left width="33" valign="top" height="1">
</td>
<td align = left width="637" valign="top" height="1">
</td>
</tr>
</table>
<br>
<form method="GET" action="{SCRIPT}">
<table width = 535 height="1" bordercolor="#000080" border="0">
<tr>
<td width="20" valign="bottom">
<table>
<tr>
<td>
<td width="30%"><font color=black color=white face="Times New Roman, Times, serif"><B>First name</B>
<input type = "text" name = "customer_name_html" style="width:200px" value="" size = "24" maxlength="255">
</select>
<br>
<font color=black color=white face="Times New Roman, Times, serif"><B> Last name</B>
<input type = "text" name = "customer_name_html" style="width:200px" value="" size = "24" maxlength="255">
</select>
<br>
<font> <B>Country</B></font> <br>
<select name="country_html" style="width:200px" size="1" onchange=recall(this.form,"country")>
{COUNTRY}
</select>
<font><B>Company List</B> </font><br>
<select name="companylist_html" style="width:200px" size="1" onchange=recall(this.form,"companylist")>
{COMPANYLIST}
</select>
</td>
</tr>
</table>
<td width="50" valign="bottom">
<table heigth="10">
<font><B> Customers List</B></font><br>
<select name=id style="width:265px" size="5">
{TABLE_ROW}
</select>
</td>
<td width ="30" align="center" valign="bottom">
{BUTTONS}
</td>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
*************************************************
*************************************************
y este es mi codigo php en el archivo search_customer.php
*************************************************
*************************************************
session_start();
require_once('class.FastTemplate.php4');
require_once('connection_data.php');
require_once('mysql_func.php');
require_once('insertFunc.php');
require_once('editFunc.php');
require_once('class.rc4crypt.php');
require_once('crypt.inc.php');
require_once('search_func.php');
//------------------------------ main -------------------------------------
$ret = 2;
//get the information via http post
echo $search;
$search = $HTTP_POST_VARS[Search];
//initialize the fast templates
$tpl = new FastTemplate(".");
$tpl->define(array("main" => "templates/search.tpl"));
$tpl->assign(SCRIPT,$PHP_SELF);
$tpl->assign(NAME, "Search");
country_select($tpl,$country_html); //*** funcion de insertFunc.php ***//
company_select($tpl,$companylist_html); //*** funcion de editFunc.php ***//
getSelectValue_3($tpl,"search_customer.php",$lette r); //*** funcion de editFunc.php ***//
//------------------------------------------------------------------------------------------------------------------- if ($search == 'Search') //'si presiono el boton search'
{
$ret = checkSmallValues($tpl);
else resetValues_search($tpl);
if ($ret==0)
{
?>
<script>
function redir(){
window.location.href = "select_customer3.php"
}
redir();
</script>
<?php
//insert values in show_search.ptl
$tpl->define(array("main" => "templates/show_search.tpl"));//
showInformation("templates/show_search.tpl");
confirmInsertion_2("templates/show_search.tpl");
//reset values
reset($HTTP_POST_VARS);
$ret = 2;
$insert = "";
exit();
}
else if ($ret==1)
{
$tpl->assign(NAME, "<FONT COLOR=\"red\"> Warning Field </FONT>");
}
$tpl->assign(BUTTONS, '<input class="buttons" type = "submit" value="Search" color=blue name="Search">');
//display the template
$tpl->parse(result, "main");
$tpl->FastPrint(result); |