ArchiveUser
8 years agoQrew Captain
How to add a custom image to a button containing javascript?
I have a button that that updates a Status field to "Complete."
It is set up with Javascript because I want the update to be "instant" and the page to not reload.
How would I add my own icon from a QB-hosted PNG image to replace the built-in button?
My code looks like:
var text URL =
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] &
"&_fid_7="&URLEncode("Complete") &
"&_fid_8=" &Now();
"javascript:" &
"$.get('" &
$url &
"',function(){" &
"$.jGrowl('Status changed to Complete.', {life: 5000, theme: 'jGrowl-green'});" &
"});" &
"void(0);
It is set up with Javascript because I want the update to be "instant" and the page to not reload.
How would I add my own icon from a QB-hosted PNG image to replace the built-in button?
My code looks like:
var text URL =
URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] &
"&_fid_7="&URLEncode("Complete") &
"&_fid_8=" &Now();
"javascript:" &
"$.get('" &
$url &
"',function(){" &
"$.jGrowl('Status changed to Complete.', {life: 5000, theme: 'jGrowl-green'});" &
"});" &
"void(0);