473,666 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visible and Invisible buttion

250 Contributor
I have a php page which is having "sumbit" and "cancel" buttion in default. but when user click submit button I want to hide"submit" button and display "ok" button. How can I do that?
Jul 14 '09 #1
6 4147
Dormilich
8,658 Recognized Expert Moderator Expert
@ghjk
what for? if you wand to submit a form, a submit button seems to be the way to go...

further, PHP can only take action after the form was submitted (and there I'm wondering what the OK button should be for). for any changes before submission you may consider Javascript to change the buttons.
Jul 14 '09 #2
creative1
274 Contributor
I imagine doing it by:
1. Create a button with dynamic text on it, That will change after click. You can use session variable to check that. and ofcourse, it will be done after form SUBMIT and will require a page reloading.
2. Display both button on the page and make ok button invisible. You would need Java script for that.

Please, correct me if I am wrong.
Jul 14 '09 #3
pdkadam
6 New Member
Use jQuery AJAX to change the SUBMIT button to OK button.
First of all use only a part of the page for the form. Using AJAX call, you can submit only this selected part and not entire page. Hence the whole page will not be reloaded. The section which will be refreshed will have SUBMIT button replaced by OK button using jQuery replacewith() function.

Here's a link for reference:
http://docs.jquery.com/Manipulation/replaceWith
Jul 14 '09 #4
Dormilich
8,658 Recognized Expert Moderator Expert
still the question remains, why an OK button?
Jul 14 '09 #5
pdkadam
6 New Member
May be the case is like this: After clicking a submit button, i.e. after submitting the form, a message is displayed to the user which has an OK button as an acknowledgement that the user has read the message. It do not see such a thing normally but you can have something like this.
Jul 14 '09 #6
Dormilich
8,658 Recognized Expert Moderator Expert
I would do that with a different page, since the original form is not needed anymore
Jul 14 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4200
by: PCB | last post by:
Hi all, Not sure if this is possible, but can I change the controls of a command button on a per record bases in a subform. In my case, I would like to make a command button visible only if certain fields in a table are a certain value. The buttons are adjacent to each record (i.e. - if there are 5 records, there would be 5 buttons; 10 records, 10 buttons; etc.) Here is the subroutine I've written so far: Public Sub IsButtonVisible()
3
2033
by: lauren quantrell | last post by:
I have an Access 2000 form that I open showing only the header. The form's detail section visible property is set to false. The detail section contains a subform. Using a command button, I use the code: Me.Detail.Visible = true Me.SubFormName.Form.RecordSource = "sprocXYZ" It returns the following error: "2455 - You have entered an expression that has an invalid reference to the property Form/Report."
3
6822
by: Susan Bricker | last post by:
Greetings. I have three forms that are open at the same time. They are related and cascading. The first form (frmEventAdd) is the anchor. Each event can have many Trials. The second form is frmTrialInfo. Each Trial can have three Classes. The third form is frmClassInfo. These forms are used for update and adding new records. The user displays an event for update (frmEventAdd). Then clicks on a button to display the Trials for that event...
2
1960
by: john | last post by:
I have some controls that I want to be invisible, but if the user does something, they will become visible using javascript. So I can't set its "visible" property to false, because then they won't even be rendered in the page at all. I can set them to invisible using javascript, but I don't want to do that because then their visibility isn't saved in the viewstate. Is there any way to make them invisible from the code-behind file in a way...
4
7119
by: Miguel Dias Moura | last post by:
Hello, i have 5 panels in an ASP.net / VB page. The panel 1 is visible the other 4 are NOT visible. I also have 5 images: image 1, image 2, ..., image5. When i click one of the images, image N, the panel N becomes visible and all the other invisible.
8
3988
by: Roy | last post by:
What is the best way to approach this problem? I have a datagrid with an imagebutton. When one clicks the imagebutton it triggers an onClick sub which makes column 9 (a user control) visible or invisible. Only problem is when one clicks the imagebutton on a specific row, I want *only* that row's column 9 to appear or disappear. ********My imagebutton******************* <asp:TemplateColumn><ItemTemplate> <asp:ImageButton...
6
2031
by: Nick Stansbury | last post by:
Hi, I have a loop running on Page_PreRender that sets a number of controls to invisible based on a set of criteria. Before I do this however, I set all of the drop down lists to be visible with a straightforward recursive loop. Now - I'm really muddled by this - why does this: If TypeOf Ctl Is DropDownList Then Ctl.Visible = true End If
6
14688
by: Selden McCabe | last post by:
I have a form with a bunch of image buttons. When the user moves the mouse over a button, I want to do two things: 1. change the Imagebutton's picture, and 2. make another control visible. I'm using the Imagebutton.Attributes.Add("onMouseOver","this.src = 'somepicture.jpg') and that works fine. I've tried some java script to change the other control's visible property by changing is className, but that doesn't seem to work
4
3209
by: TS | last post by:
I am losing my colgroup html element of a table that i toggle back and forth of being visible=true/false. is there any workaround since the rendered html doesn't contain it even though it has not been explicitely been made invisible? note also that even when the table is made visible=true, colgroup still doesn't show up
0
8440
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8355
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8638
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6191
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4365
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.