robert_gsfame Posted November 25, 2009 Share Posted November 25, 2009 can i have let say "<a href="#">Check All</a>" and once clicked the word "Click here" change into "Uncheck All" and it will change back into Check All if i click "Uncheck All" Can anyone help this Quote Link to comment Share on other sites More sharing options...
Goldeneye Posted November 25, 2009 Share Posted November 25, 2009 This could potentially be a JavaScript request. BUT you can do this in PHP set a variable like $_GET['checkall']. This variable will equal either 1 (for true) or 0 (for false) if($_GET['checkall'] == 1) echo '<a href="?checkall=0">Uncheck All</a>'; else echo '<a href="?checkall=1">Check All</a>'; Quote Link to comment Share on other sites More sharing options...
dropfaith Posted November 25, 2009 Share Posted November 25, 2009 <div onclick="changeText(this)">some text</div> then the js function changeText(currentElement){ currentElement.firstChild.data="new text"; } Quote Link to comment Share on other sites More sharing options...
robert_gsfame Posted November 25, 2009 Author Share Posted November 25, 2009 if i use $_GET like what you said means that i redirect to the same page, i wish to have it without redirecting the page.. And yes javascript would be nice..anyway thanks for your input Quote Link to comment Share on other sites More sharing options...
dropfaith Posted November 25, 2009 Share Posted November 25, 2009 yea without refreshing its a javascript issue i think my quick tag should do the trick tho Quote Link to comment Share on other sites More sharing options...
robert_gsfame Posted November 25, 2009 Author Share Posted November 25, 2009 but dropfaith, i have tried the code it will only change the text once...when i click again, no changing occured Quote Link to comment 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.