473,323 Members | 1,574 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,323 software developers and data experts.

Asp:Imagebutton and javascript

JIM
Hello,

I've an asp:Imagebutton on my form with the visible property set to false

<asp:Imagebutton ID="tstImage" runat=Server visible=False>

How can I set the visible propery to true using a javascript ?
I tried something like document.GetElementById('ImgTest').visible='true';
but without succes ....

Any idea ?

Many thanks,

KArel
Jul 22 '05 #1
1 1555
> How can I set the visible propery to true using a javascript ?
I tried something like document.GetElementById('ImgTest').visible='true';
but without succes ....


You can't. If you're setting the visibility on the control, then that's
being controlled by the codebehind. If it's set to be visible="false" it
won't even be rendered in the HTML.

For what you want, I think you want to place the button in a DIV and then
HIDE the div via javascript when the page loads. That way it's part of the
DOM and you can then do what you want with it via javascript.

-Darrel
Jul 22 '05 #2

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

Similar topics

5
by: John Davis | last post by:
When I create new documents in Dreamweaver, there are several choices for ASP creation: ASP JavaScript: run at client side?? ASP VBScript: run at server side?? ASP.NET C# ASP.NET VB I don't...
1
by: Darren Clark | last post by:
I need to be able to send through 2 peices of infomraiton in the commandArgument property of a image button... <asp:imagebutton CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+...
1
by: JIM | last post by:
Hello, Does anyone knows how to set the visible property of an asp:Imagebutton to true with javascript I've the following declared : <asp:ImageButton Id="tstImage" runat="server"...
2
by: fad | last post by:
How can I create a database access using asp+javascript withen the code?Is there (createdatabase)?If yes how can we use it? thanks for all -- fad...
1
by: Michael Evanchik | last post by:
The following tag works fine in internet explorer, but in mozilla the image is not sized and left at its actualy size. Anyone know why? I though asp.net works on any browswer. ...
3
by: JIM | last post by:
Hello, I've an asp:Imagebutton on my form with the visible property set to false <asp:Imagebutton ID="tstImage" runat=Server visible=False> How can I set the visible propery to true using a...
5
by: Alex D. | last post by:
Does any body knows how to link an asp:textbox to an asp:imagebutton, both inside a User Control in asp.net 2 beta 2? So when a user enter some text in the textbox and press the "Enter" key the...
13
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
1
by: Shapper | last post by:
Hello, I have 2 Asp:ImageButton in my .aspx file and I have the function "Run" in m .aspx.vb file. I need to run this function when one of the ImageButtons is pressed but I need to know which...
4
by: zfarooq01 | last post by:
Asp Javascript language paging larger database record sets i am firmiliar with asp javascript and not asp VB. i can display the results ok, but if i return 100 records from my table i would...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.