RichM Posted September 7, 2021 Report Share Posted September 7, 2021 Hi, can anyone help me? I have been using the code below without issue on an Caspio HTML data page, but am having issues when I add it to an HTML block in a report. <button class="block" onclick="document.location='https://--myURL--? UniqueProjectID=[@UniqueProjectID]">MY URL</button> When I add the button to a report, the report seems to automatically activate the update_event (even without this button, or the update button being pressed). If I change the button's to hyperlinks, that I block up to look like a button, this seems to get round the issue, but really I would like to still use buttons. Changing responsive or AJAX doesn't solve the issue, and if the change the configure settings to stay on the same page after update, the page just blinks every second on a continuous refresh Quote Link to comment Share on other sites More sharing options...
RichM Posted September 7, 2021 Author Report Share Posted September 7, 2021 24 minutes ago, RichM said: Hi, can anyone help me? I have been using the code below without issue on an Caspio HTML data page, but am having issues when I add it to an HTML block in a report. <button class="block" onclick="document.location='https://--myURL--? UniqueProjectID=[@UniqueProjectID]">MY URL</button> When I add the button to a report, the report seems to automatically activate the update_event (even without this button, or the update button being pressed). If I change the button's to hyperlinks, that I block up to look like a button, this seems to get round the issue, but really I would like to still use buttons. Changing responsive or AJAX doesn't solve the issue, and if the change the configure settings to stay on the same page after update, the page just blinks every second on a continuous refresh Hi . . I Just found the fix to this, but thought it is worth leaving up incase anyone has had this issue. I read on the CASPIO JS forum, that on Results pages the html code needs to be in the footer, rather than in an HTML block, or else it will execute for every record. Since moving my code to the footer, I have had no issues with the buttons - all behaving normally. Quote Link to comment Share on other sites More sharing options...
PotatoMato Posted September 15, 2021 Report Share Posted September 15, 2021 Also, just to add, here is the link to the Caspio Javascript guide: 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.
Note: Your post will require moderator approval before it will be visible.