Esempio n. 1
0
function RenderUpdatePanel()
{
    $html = "";
    $html .= "<table>";
    $html .= "<tr>";
    $html .= "<td style='padding:3px;width:50px;'>Continent:</td>";
    $html .= "<td  style='padding:3px;'>";
    //Continent
    $html .= "<select id='selContinent' name='selContinent' style='width:100px' onchange='do_update()'>";
    $html .= "<option value='--'>--</option>";
    $result = mysql_query("select ContinentID,ContinentName from kcb_tbcontinents");
    while ($row = mysql_fetch_assoc($result)) {
        $_selected = false;
        if (isset($_POST["selContinent"]) && $_POST["selContinent"] == $row["ContinentID"]) {
            $_selected = true;
        }
        $html .= "<option value='" . $row["ContinentID"] . "' " . ($_selected ? "selected" : "") . ">" . $row["ContinentName"] . "</option>";
    }
    $html .= "</select>";
    $html .= "</td>";
    $html .= "</tr>";
    $html .= "<tr>";
    $html .= "<td  style='padding:3px;'>Country:</td>";
    $html .= "<td  style='padding:3px;'>";
    //Country
    if (isset($_POST["selContinent"]) && $_POST["selContinent"] != "--") {
        $html .= "<select id='selCountry' name='selCountry' style='width:100px' >";
        $html .= "<option value='--'>--</option>";
        $result = mysql_query("select CountryName from kcb_tbcountries where ContinentID=" . $_POST["selContinent"]);
        while ($row = mysql_fetch_assoc($result)) {
            $_selected = false;
            if (isset($_POST["selCountry"]) && $_POST["selCountry"] == $row["CountryName"]) {
                $_selected = true;
            }
            $html .= "<option value='" . $row["CountryName"] . "' " . ($_selected ? "selected" : "") . ">" . $row["CountryName"] . "</option>";
        }
        $html .= "</select>";
    } else {
        $html .= "<select id='selCountry' name='selCountries' style='width:100px' disabled></select>";
    }
    $html .= "</td>";
    $html .= "</tr>";
    $html .= "</table>";
    $myPanel = new UpdatePanel("myPanel");
    $myPanel->content = $html;
    $myPanel->setLoading("../../../../KoolControls/KoolAjax/loading/5.gif");
    return $myPanel->Render();
}
Esempio n. 2
0
	$StyleUpdate4->addTrigger( "btn4" , 'onclick' );
	// 4 UpdatePanel have the same css style
	$StyleUpdate1->cssclass = $StyleUpdate2->cssclass = $StyleUpdate3->cssclass = $StyleUpdate4->cssclass = "cssStyle";	
	// each loading 
	$StyleUpdate1->setLoading("$KoolControlsFolder/KoolAjax/loading/1.gif" , "white"   , 50 );	
	$StyleUpdate2->setLoading("$KoolControlsFolder/KoolAjax/loading/4.gif" , "#f4f4f4" , 70 );	
	$StyleUpdate3->setLoading("$KoolControlsFolder/KoolAjax/loading/3.gif" , "#fff4f5" , 55 );
	$StyleUpdate4->setLoading("$KoolControlsFolder/KoolAjax/loading/9.gif" , ""        , 75 );
?>
	<?php echo $koolajax->Render();?>
		<style>
			.cssStyle
			{
				border:solid 1px gray;
				width:190px;
				float:left;
				height:150px;
				padding : 10px;
				margin : 10px;				
			}
		</style>		
	<div style="width:650px;">			
			<?php					
				echo $StyleUpdate1->Render();
				echo $StyleUpdate2->Render();
				echo $StyleUpdate3->Render();
				echo $StyleUpdate4->Render();
			?>	
	</div>		
	<div style="clear:both"></div>
Esempio n. 3
0
						<div >'. $ksm->Render().
						'</div>						
						<input type="hidden" name="data" value="" />
						<input type="hidden" name="task" value="" />
						<script language="javascript">
							ksm.registerEvent("OnBeforeExpand",OnBeforeExpand_handle);
						</script>
					</div>';
	}
	
	$regisForm->cssclass = "cssRegisForm" ;
	$regisForm->content= $return ;
	
?>
<?php echo $koolajax->Render();?>
<?php echo $regisForm->Render();?>
<link rel="stylesheet" href="example.css" />
<script type="text/javascript" >
	var step1ok = "0000" ;
	var step2ok = false ;
	var step3ok = false ;
	function dostep1(){
		if ( step1ok == "1111" ){
			ksm.getItem( "step2" ).expand() ;
		}else{
			alert( "You must finish step 1 before continuousing with step 2" );
		}
	}
	function dostep2(){
		checkList = document.getElementsByName( "list" ) ;
		for (i = 0; i < checkList.length; i++){
Esempio n. 4
0
} else {
    $return = '	<script type="text/javascript" src="functions.js"></script>
					<div style="height:auto;width:500px;" id="registration-form">		
						<div id="my-tit" >Registration form</div><br/>
						<div >' . $ksm->Render() . '</div>						
						<input type="hidden" name="data" value="" />
						<input type="hidden" name="task" value="" />
						<script language="javascript">
							ksm.registerEvent("OnBeforeExpand",OnBeforeExpand_handle);
						</script>
					</div>';
}
$regisForm->cssclass = "cssRegisForm";
$regisForm->content = $return;
echo $koolajax->Render();
echo $regisForm->Render();
?>
<link rel="stylesheet" href="example.css" />
<script type="text/javascript" >
	var step1ok = "0000" ;
	var step2ok = false ;
	var step3ok = false ;
	function dostep1(){
		if ( step1ok == "1111" ){
			ksm.getItem( "step2" ).expand() ;
		}else{
			alert( "You must finish step 1 before continuousing with step 2" );
		}
	}
	function dostep2(){
		checkList = document.getElementsByName( "list" ) ;