The JavaScript I have for a popup in asp.net seems to be returning blank variables from text boxes on the web page. It appears like there might be something missing in my document.getElementById function, either it's not being used correctly or I should be using a different approach.
This is the example of my JavaScript code:
<!DOCTYPE html>
<title></title>
<script type = "text/javascript">
function Confirm() {
var confirm_value = document.createElement("INPUT");
confirm_value.type = "hidden";
confirm_value.name = "confirm_value";
var ppn = document.getElementById("<%= pifPassportNbr %>")
...
This is the example of my asp.net code:
<tr>
<td style="padding-top: 5px;">
<asp:UpdatePanel ID="updPassport" runat="server" UpdateMode="Conditional" Visible="false" >
...
 
<asp:CheckBox ID="ckbExpirationDate" runat="server" Checked="false" />
</asp:TableCell>
</asp:TableRow></asp:Table><table width="98%" cellpadding="20px" style="margin-top: 5px;margin-bottom: 3px" >
...
<asp:Button ID="btnPassportUpdate" visible = "true" text="Update" CssClass="btnUpdate" runat="server" OnClientClick="Confirm()"/>