C
c.verma
I am not able to hide a href element using javascript. Here is my code
written on aspx page.
On the click of "OK" button, I want to hide href element. But I am
getting message: Object required. Any ideas?
<asp:textbox id="txtWait" style="DISPLAY: none" runat="server"
Width="326px" BorderStyle="None" BorderColor="whitesmoke"
ForeColor="Red" ReadOnly="true" Font-Bold="True">Please wait while we
process your information...</asp:textbox><br>
<asp:Button ID="btnOK" Runat="server" ForeColor="White"
Font-Size="8pt" BorderColor="ActiveBorder" BackColor="#003366"
BorderStyle="Outset" BorderWidth="1px" Font-Names="Tahoma" Text="OK"
Height="19" Width="100"></asp:Button>
<input id="btnAttach" style="FONT-SIZE: 8pt; COLOR: white;
FONT-FAMILY: tahoma; BACKGROUND-COLOR: #003366" type="button"
value="Upload Attachments">
<A class="HelpText" style="DISPLAY: ;" id="txtAref"
onclick="showHide('uploadinfo')">(Attachment Info)</A>
<script language=javascript event=onclick
for="<%=btnOK.UniqueID %>" >
var hWnd =
window.showModalDialog("ConfirmInvoiceSubmit.aspx","Dialog Box
Arguments # 1","dialogHeight: 300px; dialogWidth: 410px; dialogTop:
300px; dialogLeft: 300px; edge: Raised; center: Yes; help: No;
resizable: No; status: No;");
if((hWnd == 1) || (hWnd == 2))
{
document.forms[0].item("hdnInvoiceSubmit").value = hWnd;
document.forms[0].item("btnOK").style.display = "none";
document.forms[0].item("btnAttach").style.display = "none";
//problem: document.forms[0].item("txtAref").style.display =
"none";
document.forms[0].item("txtWait").style.display = "";
return true;
}
if(hWnd == 3)
{
return false;
}
else
{
document.forms[0].item("btnOK").style.display = "";
document.forms[0].item("btnAttach").style.display = "";
document.forms[0].item("txtWait").style.display = "none";
return false;
}
</script>
<ASP:TEXTBOX id="hdnInvoiceSubmit" runat="server" Width="20"
Visible="true"></ASP:TEXTBOX>
Thanks
written on aspx page.
On the click of "OK" button, I want to hide href element. But I am
getting message: Object required. Any ideas?
<asp:textbox id="txtWait" style="DISPLAY: none" runat="server"
Width="326px" BorderStyle="None" BorderColor="whitesmoke"
ForeColor="Red" ReadOnly="true" Font-Bold="True">Please wait while we
process your information...</asp:textbox><br>
<asp:Button ID="btnOK" Runat="server" ForeColor="White"
Font-Size="8pt" BorderColor="ActiveBorder" BackColor="#003366"
BorderStyle="Outset" BorderWidth="1px" Font-Names="Tahoma" Text="OK"
Height="19" Width="100"></asp:Button>
<input id="btnAttach" style="FONT-SIZE: 8pt; COLOR: white;
FONT-FAMILY: tahoma; BACKGROUND-COLOR: #003366" type="button"
value="Upload Attachments">
<A class="HelpText" style="DISPLAY: ;" id="txtAref"
onclick="showHide('uploadinfo')">(Attachment Info)</A>
<script language=javascript event=onclick
for="<%=btnOK.UniqueID %>" >
var hWnd =
window.showModalDialog("ConfirmInvoiceSubmit.aspx","Dialog Box
Arguments # 1","dialogHeight: 300px; dialogWidth: 410px; dialogTop:
300px; dialogLeft: 300px; edge: Raised; center: Yes; help: No;
resizable: No; status: No;");
if((hWnd == 1) || (hWnd == 2))
{
document.forms[0].item("hdnInvoiceSubmit").value = hWnd;
document.forms[0].item("btnOK").style.display = "none";
document.forms[0].item("btnAttach").style.display = "none";
//problem: document.forms[0].item("txtAref").style.display =
"none";
document.forms[0].item("txtWait").style.display = "";
return true;
}
if(hWnd == 3)
{
return false;
}
else
{
document.forms[0].item("btnOK").style.display = "";
document.forms[0].item("btnAttach").style.display = "";
document.forms[0].item("txtWait").style.display = "none";
return false;
}
</script>
<ASP:TEXTBOX id="hdnInvoiceSubmit" runat="server" Width="20"
Visible="true"></ASP:TEXTBOX>
Thanks