formprocessing - index.php - AJAX Search Code ~ Ajax Training, Learn Ajax Video Tutorials Online, Ajax Examples
Ajax Training, Learn Ajax Video Tutorials Online, Ajax Examples: formprocessing - index.php - AJAX Search Code

formprocessing - index.php - AJAX Search Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>CowAJAX::Form Processing Example</title>
<script language="javascript" type="text/javascript" src="../../js/ajax.lib.js"></script>
<script language="javascript" type="text/javascript" src="../../js/dhtml.lib.js"></script>
<style type="text/css">

body {font-family: verdana, arial;
font-size: 12px;
overflow: hidden;
}

h1 {font-size: 16px; margin: 0px;}

#form1 {width: 45%;
position: absolute;
top: 50px;
}

#form2 {width: 45%;
margin-left: 50%;
position: absolute;
top: 50px;
}

#inner {width: 100%}

form {margin: 0px;
padding: 8px;
border: 12px solid gray;
background: #FFF;
color: #000;
}

form div label {display: block;
width: 150px;
text-align: right;
float: left;
}

.fieldbox {border: 1px solid #4EAE4E;
background-color: #EEFFEE;
padding: 3px;
margin-bottom: 4px;
}

.fieldbox span{color: #4EAE4E;}

</style>
<script>
window.history.back = function() {

}
</script>
</head>
<body>
<!-- Start of Form Processing -->
<h1>Form Processing Example...</h1>
<br />
<div id="form1">
<form method="post" action="controller.php" name="form1">
<div id="inner">
<div class="fieldbox">
<label>Text Field 1:</label>
<input type="text" name="textfield1"/>
</div>
<div class="fieldbox">
<label>Text Field 2:</label>
<input type="text" name="textfield2" />

</div>
<div class="fieldbox">
<label>Textarea:</label>
<textarea name="textarea" cols="38" rows="4"></textarea>
</div>
<div class="fieldbox">
<label>Checkboxes:</label>
<input type="checkbox" name="checxkbox1" />1
<input type="checkbox" name="checxkbox2" />2
<input type="checkbox" name="checxkbox3" />3
<input type="checkbox" name="checxkbox4" />4
</div>
<div class="fieldbox">
<label>Radio Buttons:</label>
<input type="radio" name="radiobutton" value="1"/>Yes
<input type="radio" name="radiobutton" value="0"/>No
</div>
<div class="fieldbox">
<label>Dropdown List (select):</label>
<select name="select">
<option value="0">--Select Option--</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
</div>
<div class="fieldbox">
<label>Multiple Select:</label>
<select name="multiple[]" multiple="multiple">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
</div>
<input type="button" name="submitForm1" value="Submit >>" style="float: right; margin-left: 6px;"/>
<input type="reset" name="reset" value="Reset" style="float: right"/>
<div style="clear: both"></div>
</div>
</form>
</div>
<div id="form2">
<form method="post" action="controller.php" name="form2">
<div id="inner">
<div class="fieldbox">
<label>Text Field 1:</label>
<input type="text" name="textfield1"/>
</div>
<div class="fieldbox">
<label>Text Field 2:</label>
<input type="text" name="textfield2" />

</div>
<div class="fieldbox">
<label>Textarea:</label>
<textarea name="textarea" cols="38" rows="4"></textarea>
</div>
<div class="fieldbox">
<label>Checkboxes:</label>
<input type="checkbox" name="checxkbox1" />1
<input type="checkbox" name="checxkbox2" />2
<input type="checkbox" name="checxkbox3" />3
<input type="checkbox" name="checxkbox4" />4
</div>
<div class="fieldbox">
<label>Radio Buttons:</label>
<input type="radio" name="radiobutton" value="1"/>Yes
<input type="radio" name="radiobutton" value="0"/>No
</div>
<div class="fieldbox">
<label>Dropdown List (select):</label>
<select name="select">
<option value="0">--Select Option--</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
</div>
<div class="fieldbox">
<label>Multiple Select:</label>
<select name="multiple[]" multiple="multiple">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
</div>
<input type="button" name="submitForm2" value="<< Submit"/>
<input type="reset" name="reset" value="Reset"/>
<div style="clear: both"></div>
</div>
</form>
</div>
<!-- End of Form Processing -->
<!-- ######################## -->
<!-- Start of PHP source -->
<br />
<b><u>PHP Code</u></b>
<div style="margin-top: 4px; width: 45%; overflow: auto; height: 150px; border: 1px solid gray; border-style: inset; position: absolute; top: 500px; left: 10px;">
<?php
highlight_file('controller.php');
?>
</div>
<!-- End of PHP source -->
</body>
</html>

Related Posts by Categories

0 comments:

Useful Links on Adobe Flex

Your Ad Here

Latest Books on Adobe Flex