After submitting registration data on a Caspio URL submission form, an HTML confirmation page lists the information entered by the registrant in a <ul></ul> format. I need to selectively display or hide one or more of the <li></li> tags based on the value in the "type" field in the HTML form. My Script code is as follows but it does not work. Can you help me correct this?
<!DOCTYPE html>
<html>
<head>
<script>
function hide() {
var Ascend = document.getElementById("Ascd");
var t = document.getElementById ("InsertRecordtype").value;
if( t==="a" || t === "af")
{
Ascend.style.display= 'block' ; }
else {
Ascend.style.display= 'none'; }
}
</script>
</head>
<body onload = "hide()">
The element i'm trying to hide/display is shown below:
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Case
After submitting registration data on a Caspio URL submission form, an HTML confirmation page lists the information entered by the registrant in a <ul></ul> format. I need to selectively display or hide one or more of the <li></li> tags based on the value in the "type" field in the HTML form. My Script code is as follows but it does not work. Can you help me correct this?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.