I like using the Magic Button app to find code and graphics for buttons for my app. I just copied one and am having multiple weird behaviors. The button I want is to let our staff close-out items on a report.
1. Click on button on the report, it goes to the record and shows it unmodified from the button.
2. I refresh the record and it then shows it as modified as 'Done' per the button.
3. I use the back button to go back to the report, it shows as unmodified still.
4. I refresh the report and the record shows as 'Done'.
I suspect that (1) is caused by the click on the line being captured as a hyperlink to the record first, then secondarily as a click on the button. And (3) is caused by caching, but I'm not used to QB caching info like this, I guess this is related to the Javascript modifying the record instead of yours truly.
My button is a formula/text, I've only really modified it to add a 'if' statement to deactivate it if the status doesn't need to be changed. Skipping the Var declaration of the URL:
If([Status]="Done","Done","<a href=\"javascript:" & "$.get('" & $url &
"', function(){" & "location.reload();" & "});" &
"void(0);\"><img src=\"https://images.quickbase.com/si/32/110-touchscreen.png\"></a>")
I could switch to a URL field, but I like being able to disable the button when it it done. Is the behavior I am describing normal, or am I crazy? Or my browser (Firefox)?
1. Click on button on the report, it goes to the record and shows it unmodified from the button.
2. I refresh the record and it then shows it as modified as 'Done' per the button.
3. I use the back button to go back to the report, it shows as unmodified still.
4. I refresh the report and the record shows as 'Done'.
I suspect that (1) is caused by the click on the line being captured as a hyperlink to the record first, then secondarily as a click on the button. And (3) is caused by caching, but I'm not used to QB caching info like this, I guess this is related to the Javascript modifying the record instead of yours truly.
My button is a formula/text, I've only really modified it to add a 'if' statement to deactivate it if the status doesn't need to be changed. Skipping the Var declaration of the URL:
If([Status]="Done","Done","<a href=\"javascript:" & "$.get('" & $url &
"', function(){" & "location.reload();" & "});" &
"void(0);\"><img src=\"https://images.quickbase.com/si/32/110-touchscreen.png\"></a>")
I could switch to a URL field, but I like being able to disable the button when it it done. Is the behavior I am describing normal, or am I crazy? Or my browser (Firefox)?