473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Problem in hiding a href using Javascript

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

Mar 29 '06 #1
1 2126
c.*****@gmail.com wrote:
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>
[loads of ugly *tab-indented* ASP code]


Your ASP code is irrelevant and unwanted here because the client-side script
that is used to hide the element has to operate on what is generated from
it. Have a look at that client-side code, debug it, and probably you will
see what is going wrong. If not, post the relevant parts of it (and indent
blocks with multiples of two spaces not the Tab character), or the public
URL of a stripped-down test case.

<URL:http://jibbering.com/faq/>
PointedEars
Mar 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: mcheu | last post by:
Hi, I'm trying to figure out how to hide text in a DIV block and then hide and unhide it using javascript. In the code that follows, the message is initially invisible, and when you click on...
1
by: Julius Mong | last post by:
Dear all, according to the ASV3 manual known problem section, to make an <a> execute some Javascript onclick: ...
39
by: WindAndWaves | last post by:
Hi Gurus I have a page, which looks a bit like this: .... <body> <div ID=id1>................</DIV> <div ID=gsd>................</DIV> <div ID=ewd>................</DIV> <div...
1
by: Bill H | last post by:
I run a dbms application that interfaces with the web. This module creates a frames page with two frames ('main' and 'mwinfoframe'). All communication with the dbms is routed through the...
15
by: Steve Horrillo | last post by:
I can't figure out why this script won't insert the subject in the email and why can't I control the font and size being used? I'm not sure where to post this. Let me know where if this is OT. ...
4
by: web_design | last post by:
I put this together from some other scripts I am using on a site. I'm trying to make a better email hiding script. It isn't working. Also, it causes Internet Explorer 6 SP2 to block the script...
4
by: Van Duijn | last post by:
I use an inlineframe to display pages with images with javascript pop up links. These image pages redirect to each other with the trusted <meta http-equiv="refresh" content="10; url=vb9.htm">...
1
by: Grimm | last post by:
I am developing an internalk inteface that integrates alot of seperate tools into one interface. The current version uses one Iframe inside a div layer for positioning. Currently the seperate web...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.