Javascript function calling on page refresh -
new bear me...
trying call following function twitter bootstrap modal window
twitter bootstrap html: <button id="modal-agree-btn" class="btn btn-primary" onclick="rentalagreement('true')">i agree</button>
javascript function rentalagreement():
function rentalagreement(value){ if(value=='true'){ <?php $updatequery = "update prospect set registration_flag='yes' p_id=$prospectid"; $dbcon->query($updatequery); error_log("clicked"); ?> $('#mymodal').modal('hide'); var brokeragreementbox = document.getelementbyid('brokeragreementmodalbutton'); brokeragreementbox.style.visibility = 'hidden'; var brokeragreeheader = document.getelementbyid('brokeragreementheader'); brokeragreeheader.style.visibility = 'hidden'; document.getelementbyid('noregflagmove').appendchild( document.getelementbyid('uploadheader') ); document.getelementbyid('noregflagmove').appendchild( document.getelementbyid('uploadbox') ); var brokeragtag = document.getelementbyid('brokeragreementtag'); brokeragtag.style.color = "green"; brokeragtag.class = "icon-ok-sign"; } };
it works great if enter page via login screen when refresh page function executes without button being clicked. causing function call or how can debug figure out?
Comments
Post a Comment