PDA

View Full Version : dynamic form radiobuttons onclick show textfields



SYMBIO
Nov 28th, 2002, 04:16 PM
hi, people> problem in a nutshell.

im doing a change password feature. i want the option for a person to keep existing password (which the form when created by ASP checks as default) but if the "edit" radio button is checked, produce 2/3 text fields (origpwd, pwd, pwd2) to error check via ASP.

heres the deal i dont want to submit the form. there is a way of doing this completely client side right?

SYMBIO
Nov 29th, 2002, 02:13 PM
to raj

<?xml version="1.0" encoding = "UTF-8"?>
<!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" xml:lang="en" lang="en">
<head>
<title>SONY HOMEPAGE</title>

<script language=javascript>

function doMoveBrowser(form) {
parent.location.href=form.list.options[getSelectedValue()].value; }

function getSelectedValue() {
return document.form1.list.selectedIndex }

function showURL(form) {
form.TextBox.value = form.list.options[getSelectedValue()].value; }
</script>

<script type="text/javascript">
function confirmm() {
return (confirm("Click OK to go to this page."));
}
</script>

<script src="scrolling.js"></script>

<link rel="stylesheet" href="sony.css" type="text/css" />
<script language="javascript" type="text/javascript">
<!-- Hide script from old browsers

adImages = new Array("images/sonyps2.jpg","images/aibo.gif","images/aibo1.gif")
thisAd = 0
imgCt = adImages.length

function rotate() {
if (document.images) {
thisAd++
if (thisAd == imgCt) {
thisAd = 0
}
document.adBanner.src=adImages[thisAd]
setTimeout("rotate()", 3 * 1000)
}
}

// End hiding script from old browsers -->
</script>

</head>

<body bgcolor="#FFFFFF" OnLoad="tmx1a=window.setTimeout('scroll_status(100)',50);" >
<b><h1 align="center">SONY</h1></b>
<p align="center">


<IMG SRC="javascript:rotate()" WIDTH="400" HEIGHT="200" NAME="adBanner" ALT="SONY">


<form name=form1>
<select name=list onChange=showURL(this.form)>
<option selected value=0>Sony products
<option value=http://www.cse.dmu.ac.uk/~hc01rsg/mult2002/sonycameras.html>Sony Cameras
<option value=http://den.usc.edu>Distance Education Network
<option value=http://cs.usc.edu>Computer Science at USC
</select>
<input type=button value=Go onClick=doMoveBrowser(this.form)>
<input type=reset value=Reset>
<input type=text name=TextBox size=40>
</form</p><br/><br/><br/><br/><br/><br/><br/><br/><br/>


<a onclick="return confirmm()" href="sonycameras.html">Cameras</a> <a onclick="return confirmm()" href="page3.html">Page 3</a> <a onclick="return confirmm()" href="page4.html">Page 4</a>
</body>
</html>