|
-
Apr 28th, 2006, 07:57 PM
#1
Thread Starter
Member
-
Apr 28th, 2006, 08:16 PM
#2
Stuck in the 80s
Re: Need Help to this case ...
Maybe something like...
Code:
<form action="" method="post">
Do you have a car?
<input type="radio" name="car" value="yes"
onclick="this.form.sellDamaged[0].disabled=false; this.form.sellDamaged[1].disabled=false;" /> Yes
<input type="radio" name="car" value="no"
onclick="this.form.sellDamaged[0].disabled=true; this.form.sellDamaged[1].disabled=true;" /> No <br />
Do you want to sell your car if your car is damaged?
<input type="radio" name="sellDamaged" value="yes" /> Yes
<input type="radio" name="sellDamaged" value="no" /> No <br />
</form>
-
Apr 28th, 2006, 08:28 PM
#3
Thread Starter
Member
Re: Need Help to this case ...
Thank you,
but Can you make it not visible ???
-
Apr 28th, 2006, 11:32 PM
#4
Stuck in the 80s
Re: Need Help to this case ...
Try putting the relevant portion within a DIV, give it an ID, and then use the same method I showed to toggle it's .visibility.
-
Apr 30th, 2006, 08:08 PM
#5
Thread Starter
Member
Re: Need Help to this case ...
-
Apr 30th, 2006, 09:11 PM
#6
Stuck in the 80s
Re: Need Help to this case ...
I only tested it in IE 6 and the latest Firefox, not sure what browsers it'll work in:
Code:
<html>
<head>
<title></title>
<style type="text/css">
</style>
<script type="text/javascript">
function hideIt(theElement) {
document.getElementById(theElement).style.visibility = 'hidden';
}
</script>
</head>
<body onload="hideIt('sellDamagedDIV');">
<form action="" method="post">
Do you have a car?
<input type="radio" name="car" value="yes"
onclick="document.getElementById('sellDamagedDIV').style.visibility = 'visible';" /> Yes
<input type="radio" name="car" value="no"
onclick="document.getElementById('sellDamagedDIV').style.visibility = 'hidden';" /> No <br />
<div id="sellDamagedDIV">
Do you want to sell your car if your car is damaged?
<input type="radio" name="sellDamaged" value="yes" /> Yes
<input type="radio" name="sellDamaged" value="no" /> No <br />
</div>
</form>
</body>
</html>
-
Apr 30th, 2006, 11:57 PM
#7
Thread Starter
Member
-
May 1st, 2006, 06:43 AM
#8
Stuck in the 80s
Re: Need Help to this case ...
I don't know...it works fine for me in IE and Firefox. Are you sure you changed the code from sellDamagedDIV to P6b?
For your TEXT field, you're going to want to do something like this:
Code:
echo nl2br($result['fieldName']);
This will add the html tag <br /> where newline characters are present.
-
May 1st, 2006, 06:45 AM
#9
Stuck in the 80s
Re: Need Help to this case ...
Ah, you have to have the entire table within the DIV, not just part of it, ie:
Code:
<div>
<table>
...
</table>
</div>
as opposed to:
Code:
<table>
<div>
...
</div>
</table>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|