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

How to hide and show a button after executing javascript function

Mic
Hi,

How can I hide a button before executing a javascript function and
make it visible again after execution of the javascript function?

What I need to do is:

VB Page_Load:
1) Hide Button1: Button1.Visible = False
2) Execute JavaScript (I'm using
Page.ClientScript.RegisterStartupScript)
3) Show Button1: Button1.Visible = True

I am new using these mixed languages and I have not been able to do
it.

Thanks

Aug 29 '07 #1
2 1916
On Aug 30, 12:26 am, Mic <d...@globetrotter.netwrote:
Hi,

How can I hide a button before executing a javascript function and
make it visible again after execution of the javascript function?

What I need to do is:

VB Page_Load:
1) Hide Button1: Button1.Visible = False
2) Execute JavaScript (I'm using
Page.ClientScript.RegisterStartupScript)
3) Show Button1: Button1.Visible = True

I am new using these mixed languages and I have not been able to do
it.

Thanks
Mic, you have to do 1st and 3rd steps using a javascript after you did
step #2. RegisterStartupScript does register a client-side script and
not execute it.

Aug 29 '07 #2
On Aug 31, 9:07 pm, Mic <d...@globetrotter.netwrote:
Hi Alexey,

I'm lost here because code gets executed with
Page.ClientScript.RegisterStartupScript because printing occurs when
code reaches this line. The name RegisterStartupScript would suggest
that it should only register the script to be used later somehow but
it executes the code.
Well, maybe I misunderstood you. I'm reading your first post again:
where do you need a button? Do you want to open the print dialog on a
button click or when the page is loaded?

Aug 31 '07 #3

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

Similar topics

5
by: Zambien | last post by:
Hi all, Here's my problem. I have tables that are using the menu/submenu idea for hiding rows. This works fine in IE (of course) and does show/hide correctly in netscape, but as soon as the...
2
by: MOHSEN KASHANI | last post by:
Hi, I am trying to hide some form elements in a form by default and show/hide depending on which radio button is clicked. This is what I have but it is not working: <head> <style> ..noshow {...
4
by: jerryyang_la1 | last post by:
I've found this script that allows be to hide/show form elements.. <script language="JavaScript"><!-- var toggle = true; function show(object) { if (document.layers && document.layers)...
7
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field...
3
by: Bubu | last post by:
It's possible to hide or show e div from a iFrame page with javascript? If yes, please can anyone tell me how to do this? Thanks Bubu
3
by: toodi4 | last post by:
I'm using a javascript that hides and unhides text based on a button click. It works great across static fields on a form. The problem I have is that I'm trying to hide and unhide various fields...
6
by: michael941 | last post by:
Hi, I have 2 tables in an html page. I have div them separately and id them as id1 and id2. I have a link there. What I need is click the link to hide one table and show the other and verse when...
18
by: Liquidtouch | last post by:
I have been searching on this for awhile and cant find anything and playing around with it got me no where. I will start with what I am after and then explain what I have. I have a table with 3...
6
by: Jeremy | last post by:
I've got a floating div which becomes visible when a link is clicked. I want the div to be hidden when the user clicks anywhere on the page except for whithin the div. What is the best way to do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.