MDanz Posted June 19, 2010 Share Posted June 19, 2010 e.g. <table><tr><td onclick='ChgText()'>test</td></tr></table> now "test" are results from mysql. So i want all those results to load before onclick on the column can be enabled. This is because if i press onclick too quickly, the function doesn't capture certain information. any help? Link to comment https://forums.phpfreaks.com/topic/205259-no-onclick-before-php-loads/ Share on other sites More sharing options...
MDanz Posted June 19, 2010 Author Share Posted June 19, 2010 if (document.readyState != "complete") {document.onclick = null; } else {} i tried this but it doesn't work. Link to comment https://forums.phpfreaks.com/topic/205259-no-onclick-before-php-loads/#findComment-1074405 Share on other sites More sharing options...
haku Posted June 20, 2010 Share Posted June 20, 2010 window.onload = function() { // create your onClick function in here. Don't put it in your HTML like you are now. } Link to comment https://forums.phpfreaks.com/topic/205259-no-onclick-before-php-loads/#findComment-1074539 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.