Leftfield Posted February 6, 2011 Share Posted February 6, 2011 Hi all . I have a button now when i click the button an mypages is valid can i make that button in the page invisible in postback with php?? I know you can in C# by saying button1.Visible = false; Thanks for input... Link to comment https://forums.phpfreaks.com/topic/226890-can-you-make-a-control-invisible-in-php-code/ Share on other sites More sharing options...
BlueSkyIS Posted February 6, 2011 Share Posted February 6, 2011 if you want the button to be 'invisible', don't send the button HTML it to the browser. Link to comment https://forums.phpfreaks.com/topic/226890-can-you-make-a-control-invisible-in-php-code/#findComment-1170689 Share on other sites More sharing options...
Leftfield Posted February 6, 2011 Author Share Posted February 6, 2011 I know you can do it in Javascript but it is not gonna work that way .. Can you set the Button value with php??? Link to comment https://forums.phpfreaks.com/topic/226890-can-you-make-a-control-invisible-in-php-code/#findComment-1170697 Share on other sites More sharing options...
BlueSkyIS Posted February 6, 2011 Share Posted February 6, 2011 if you want the button to be 'invisible', don't send the button HTML it to the browser. <?php if ($somecondition == 'met') { // show button echo "<input type='submit' name='somebutton' value='hello world'>"; } else { // Don't show button } ?> Link to comment https://forums.phpfreaks.com/topic/226890-can-you-make-a-control-invisible-in-php-code/#findComment-1170698 Share on other sites More sharing options...
Leftfield Posted February 6, 2011 Author Share Posted February 6, 2011 Thx i will take a look at it... Link to comment https://forums.phpfreaks.com/topic/226890-can-you-make-a-control-invisible-in-php-code/#findComment-1170700 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.