Setting html button invisible

M

MW de Jager

I'm trying to create an html page that will change dynamically. I need to
switch html -buttons between visible and invisible.

Is there any way I can do this with a script?

Regards
MW
 
M

MW de Jager

Thanks Eliyahu

I knew you would come up with a quick and easy solution.

Now I have a different problem though. I'm using showModalDialog to display
my html page and I receive a result back from showModalDialog. I would like
to respond to this result immediately in C#, but by the time the user
pressed a button, the pageload of my initial calling page has already fired.

Is there any way to refresh my page once the dialog was closed?

Kind regards

MW
 
E

Eliyahu Goldin

Sure,

<input type=button id=myButton value="Press me">

myButton.style.display="none";

myButton.style.display="inline";

Eliyahu
 
M

MW de Jager

Correct.

I am getting the result on the server side in a hidden component. The
problem is, I want server side to do something immediately on receiving the
result back.

Here is the scenario:
Say you have a page where the user flags a number of items for deletion. If
he flags all of them, you popup a dialog to confirm deleting all the items
on the page. If he clicks yes, server side needs to know that immediately,
to start processing.

I cannot do this from client side, unless I can find a way to fire the
pageload or a refresh of some kind from the client side code.
Is there another way to do this that I'm missing?

Kind regards
MW
 
E

Eliyahu Goldin

MW,

This time I am not in luck. I don't get what exactly you want to achieve.

Can you elaborate your scenario?

The calling page client side calls showModalDialog,
The calling page client side gets result back,
You want to get the result in the calling page server-side
???

Eliyahu
 
M

MW de Jager

Hi Eliyahu

I now know how they make those miserable little popups that refuse to close
on some of those seedy websites. I forgot to set my hidden control that
starts the whole thing, back to null. Anyway fixed it and now its working
beautifully!

Thanks again, your help is very much appreciated.

Kind regards
MW
 
E

Eliyahu Goldin

Call myForm.submit() on the client. This will post back to the server. You
can communicate any extra information to the server in other hidden fields.
For example, you might want to tell the server that you want it to delete
items. Allocate a hidden input for "action code" like "delete" etc.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top