xerox02 Posted May 4, 2010 Share Posted May 4, 2010 Is there a way I could get the value of a button I designed, and if I click the button it would be one value, and if it was not clicked it would be another . After that I can echo the checked values into a I am trying to make it so, if I have a button I designed click, it would select a certain table in mysql. Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/ Share on other sites More sharing options...
xerox02 Posted May 4, 2010 Author Share Posted May 4, 2010 bump Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1052884 Share on other sites More sharing options...
xerox02 Posted May 4, 2010 Author Share Posted May 4, 2010 Sorry to rebump, but I researched my problem a little bit, and I am wondering if can getting values from a custom button without java script. It seems that the only way to do it is with java script. Is this true? Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1052980 Share on other sites More sharing options...
xerox02 Posted May 5, 2010 Author Share Posted May 5, 2010 bump Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1053468 Share on other sites More sharing options...
xerox02 Posted May 5, 2010 Author Share Posted May 5, 2010 bump bump Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1053867 Share on other sites More sharing options...
Muddy_Funster Posted May 5, 2010 Share Posted May 5, 2010 so basicly you want to use a button as a check box? Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1053875 Share on other sites More sharing options...
xerox02 Posted May 6, 2010 Author Share Posted May 6, 2010 so basicly you want to use a button as a check box? yeah, just a button I design as a check box, and then I just want to get the values . Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1053938 Share on other sites More sharing options...
Pikachu2000 Posted May 6, 2010 Share Posted May 6, 2010 This may sound like a silly question, but if you want it to function as a checkbox, why not just use a checkbox? Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1053944 Share on other sites More sharing options...
xerox02 Posted May 6, 2010 Author Share Posted May 6, 2010 This may sound like a silly question, but if you want it to function as a checkbox, why not just use a checkbox? lol, well I guess it's a personally prefernce, but standard check boxes look kind of tacky. I do graphic design, so designing a button is convenient. All it is basically, you click it, and the button turns white, and then you click it again, and it turns black. After that, I want to get the value of the button, where it is white or black (checked or not checked) (clicked or not clicked, lol) . Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1054160 Share on other sites More sharing options...
xerox02 Posted May 6, 2010 Author Share Posted May 6, 2010 bump Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1054268 Share on other sites More sharing options...
seniramsu Posted May 6, 2010 Share Posted May 6, 2010 try using CSS? Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1054345 Share on other sites More sharing options...
mtnmchgrl Posted May 6, 2010 Share Posted May 6, 2010 This may sound like a silly question, but if you want it to function as a checkbox, why not just use a checkbox? lol, well I guess it's a personally prefernce, but standard check boxes look kind of tacky. I do graphic design, so designing a button is convenient. All it is basically, you click it, and the button turns white, and then you click it again, and it turns black. After that, I want to get the value of the button, where it is white or black (checked or not checked) (clicked or not clicked, lol) . Hmm....I did something kind of like this using CSS. My nav bar....the link buttons when not clicked are one color and when clicked, they display an image.....is that kind of what you mean ? Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1054366 Share on other sites More sharing options...
xerox02 Posted May 7, 2010 Author Share Posted May 7, 2010 This may sound like a silly question, but if you want it to function as a checkbox, why not just use a checkbox? lol, well I guess it's a personally prefernce, but standard check boxes look kind of tacky. I do graphic design, so designing a button is convenient. All it is basically, you click it, and the button turns white, and then you click it again, and it turns black. After that, I want to get the value of the button, where it is white or black (checked or not checked) (clicked or not clicked, lol) . Hmm....I did something kind of like this using CSS. My nav bar....the link buttons when not clicked are one color and when clicked, they display an image.....is that kind of what you mean ? yes, but after that want to have a value for the button when it is one color(when clicked) and another(when not clicked). I ll put that value in a variable. EXTRA STUFF:and based on that variable I will chose which table in mysql database to choose from. Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1054385 Share on other sites More sharing options...
xerox02 Posted May 7, 2010 Author Share Posted May 7, 2010 This may sound like a silly question, but if you want it to function as a checkbox, why not just use a checkbox? lol, well I guess it's a personally prefernce, but standard check boxes look kind of tacky. I do graphic design, so designing a button is convenient. All it is basically, you click it, and the button turns white, and then you click it again, and it turns black. After that, I want to get the value of the button, where it is white or black (checked or not checked) (clicked or not clicked, lol) . Hmm....I did something kind of like this using CSS. My nav bar....the link buttons when not clicked are one color and when clicked, they display an image.....is that kind of what you mean ? yes, but after that want to have a value for the button when it is one color(when clicked) and another(when not clicked). I ll put that value in a variable. EXTRA STUFF:and based on that variable I will chose which table in mysql database to choose from. It seems maybe this can only be done using jquery or javascript. Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1054483 Share on other sites More sharing options...
xerox02 Posted May 7, 2010 Author Share Posted May 7, 2010 bump Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1054749 Share on other sites More sharing options...
xerox02 Posted May 8, 2010 Author Share Posted May 8, 2010 bump bump Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1054913 Share on other sites More sharing options...
trq Posted May 8, 2010 Share Posted May 8, 2010 You would need to use Javascript to store the state of the button within a hidden field. You can then read the value of that field once the form has been submitted. If your not looking to submit a form (along with this button) then you'll need to use Javascript to make an Ajax request back to the server. Either way, your question has nothing to do with php or what editor you designed your button in. Quote Link to comment https://forums.phpfreaks.com/topic/200623-designed-button-in-dreamweaver-and-then-get-value-of-button-when-clicked/#findComment-1054934 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.