All pastes #1704584 Raw Edit

test.php

public php v1 · immutable
#1704584 ·published 2009-12-06 20:08 UTC
rendered paste body
<?php$task = (isset($_POST["task"]) ? $_POST["task"] : "");if($task=="pilih"){  $sent = print_r($_POST, true); echo "POST:<br>".str_replace("\n","<br>", $sent); echo '<br><br><a href="test.php" target="_self">Back</a>';  exit(); }?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chained comboboxes demo</title><script language="JavaScript" type="text/javascript" src="jquery.js"></script><script language="JavaScript" type="text/javascript" src="jquery.chainedSelects.js"></script><script language="JavaScript" type="text/javascript">$(function(){	$('#hape').chainSelect('#tipe','combobox.php',	{ 		before:function (target) //before request hide the target combobox and display the loading message		{ 			$("#loading").css("display","block");			$(target).css("display","none");		},		after:function (target) //after request show the target combobox and hide the loading message		{ 			$("#loading").css("display","none");			$(target).css("display","inline");		}	});/*		$('#state').chainSelect('#city','combobox.php',	{ 		before:function (target) 		{ 			$("#loading").css("display","block");			$(target).css("display","none");		},		after:function (target) 		{ 			$("#loading").css("display","none");			$(target).css("display","inline");		}	});*/});</script><style>#loading{	position:absolute;	top:0px;	right:0px;	background:#ff0000;	color:#fff;	font-size:14px;	font-familly:Arial;	padding:2px;	display:none;}</style></head><body><div id="loading">Loading ...</div><h1>Chained select demo</h1><form name="formname" method="post" action="">	<!-- hape combobox -->	<select id="hape" name="hape">	<option value="1" selected>NOKIA</option>	<option value="2">ERICSON</option>	<option value="3">ESIA</option>	<option value="4">MOTOROLA</option>	</select>	<!-- tipe combobox is chained by country combobox-->	<select name="tipe" id="tipe" style="display:none"></select>		<input type="hidden" name="task" value="pilih">	<input type="submit" name="submit" value="GO"></form>