gw1500se Posted November 16, 2021 Share Posted November 16, 2021 I have a page with a 'continue' button: <input class="th_s" data-i18n="[value]report.ContinueButtonResource1" id="MainContinueButton" type="button" value="Continue"/> When this button is clicked it appears to trigger some Ajax script but I can't figure out how it can do anything when clicked. Can someone help me figure out how this button is working? TIA. Quote Link to comment https://forums.phpfreaks.com/topic/314240-button-with-no-onclick-causes-page-action/ Share on other sites More sharing options...
requinix Posted November 17, 2021 Share Posted November 17, 2021 Set a Javascript breakpoint to stop when that button is clicked, then see what the handling code belongs to. Quote Link to comment https://forums.phpfreaks.com/topic/314240-button-with-no-onclick-causes-page-action/#findComment-1592176 Share on other sites More sharing options...
gw1500se Posted November 17, 2021 Author Share Posted November 17, 2021 Thanks for the reply. I have not used the developer tools much in Firefox so I don't know how to do that. I also don't know what javascript is being triggered. I'm only guessing it is Ajax since there is no form tag. Quote Link to comment https://forums.phpfreaks.com/topic/314240-button-with-no-onclick-causes-page-action/#findComment-1592179 Share on other sites More sharing options...
requinix Posted November 17, 2021 Share Posted November 17, 2021 I assume you've already searched your code for "MainContinueButton" to see if something added a handler to that specific button? You should know if it does AJAX by monitoring the part of the developer tools that shows you network requests and seeing that a request gets made. If Firefox's is anything like Chrome's then it can also tell you where the request originated from in code. For breakpoints, I don't know Firefox or what it can do. It should be possible to break on any newly running Javascript code, but it's easy for things like mouse movements to hit that too. Meanwhile Chrome's tools can list the event listeners registered on elements. Quote Link to comment https://forums.phpfreaks.com/topic/314240-button-with-no-onclick-causes-page-action/#findComment-1592180 Share on other sites More sharing options...
gw1500se Posted November 17, 2021 Author Share Posted November 17, 2021 (edited) Thanks. I think I found the script. I'll have to open a new thread on the python forum. Edited November 17, 2021 by gw1500se Quote Link to comment https://forums.phpfreaks.com/topic/314240-button-with-no-onclick-causes-page-action/#findComment-1592186 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.