|
|
|
|
|
|
|
|
|
| |
If selected country is US then shows state dropdown else shows textfield to enter state without using database
|
<script language="javascript" type="text/javascript">
function call(){
var indice = document.registration.Country.selectedIndex;
if(document.registration.Country.options[indice].value =="United States") {
document.getElementById('selectstate').style.display = 'block';
document.getElementById('textstate').style.display = 'none';
}
else{
document.getElementById('selectstate').style.display = 'none';
document.getElementById('textstate').style.display = 'block';
}
}
</script>
<form name="registration" enctype="multipart/form-data" method="post" action="">
<table>
<tr class="firstraw">
<td align="left" id="field"><span class="star">*</span> Country:</td>
<td align="left"><select name="Country" onchange="call()" >
<?
include "countrylist.inc"; ?>
</select> </td>
</tr>
<tr class="secondraw">
<td align="left" id="field"><span class="star">*</span> state:</td>
<td>
<div id="selectstate" style="display:none">
<select name="State" class="textfield" >
<? include "statelist.inc"; ?>
</select>
</div>
<div id="textstate" style="display:none">
<input name="State" type="text" size="22" maxlength="100" value="<? echo $_REQUEST['State'];?>" class="textfield" /></div>
</td>
</tr>
</table>
</form> | | |
|
| Remote Scripting: send form POST data to a script and insert the results into a page without refreshing the page. Categories : PHP, AJAX, HTML and PHP, Java Script | | | PHP4 session helper HTML file.
Categories : PHP, Java Script, HTML and PHP, Sessions | | | Local-to-user date and time display regardless of time zone or where the website's server is located Categories : PHP, Date Time, HTML and PHP, Java Script | | | Dynamic Calendar in PHP, Javascript and HTML. Categories : PHP, Java Script, HTML and PHP, Calendar | | | Dynamic generation of textboxes, select items etc in a table for use with databases applications, matrimonials and for job sites Categories : PHP, HTML and PHP, Java Script | | | Pull Down Surfing - Surf on Change Categories : Java Script, MySQL, HTML and PHP, PHP, Databases | | | Validator 98 - a PHP-script to generate form-validation-code in JavaScript. Categories : Complete Programs, Java Script, PHP, HTML and PHP | | | This PHP function creates dropdown select lists for time and date that you can change, outputs a 14 char MySQL timestamp in a text field Categories : PHP, MySQL, Java Script, HTML and PHP | | | Newbie Notes #9 - Hyperlinking a post Categories : PHP, Java Script, HTML and PHP, Beginner Guides | | | Function that allows a Javascript cookie to be set after HTML has been outputted to the page.
Categories : PHP, Java Script, Cookies, HTML and PHP | | | OverEasy - PHP generated JavaScript to do mouseovers on
your pages. Modify one file and one function does it all
for you! Categories : PHP, Java Script, HTML and PHP, MySQL | | | PHP3: Formmail. Just a cgi formmail, but than in PHP. It is easy to use! Categories : HTML and PHP, Email, PHP, Perl, HTML and PHP | | | Tree Menu Dynamic (+Static) with Loading in Progress.. Categories : PHP, Java Script, HTML and PHP | | | Calendar using Date function Categories : HTML and PHP, PHP, Date Time, Calendar | | | Using PHP im HTML image tags Categories : PHP, HTML and PHP, Graphics, Beginner Guides | |
| |
| |
|