Skip to main content
Question

URL code help

  • October 11, 2019
  • 0 replies
  • 44 views

Forum|alt.badge.img+14
Hi,

I am very new to URL coding, and everything I have done so far is copy paste from what I find (usually some code Kirk has made). I found two bits of code I would like to combine, but am not sure how to go about doing it.

The first bit of code is to toggle a checkbox on and off.

The second bid of code is a pop up that states "Email has been sent." I was hoping I could just add the second bit of code after the first, but I wasn't that lucky. Is it possible to combine?

Thank you.

If([Checkbox] = false, URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=d9eascudwjxs2sesxkjccwgtq9r" &
"&_fid_101=1" &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() &
"?a=dr&rid=" & [Record ID#]),

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=d9eascudwjxs2sesxkjccwgtq9r" &
"&_fid_101=0" &
"&rdr=" &
URLEncode(URLRoot() & "db/" & Dbid() &
"?a=dr&rid=" & [Record ID#]))

2nd code I would like to add on

"javascript:" &

"$.get('" &

$url &

"',function(){" &

"$.jGrowl('Email has been sent', {life: 5000, theme: 'jGrowl-green'});" &

"});" &

"void(0);"



------------------------------
Mike Tamoush
------------------------------

MarkShnierYou
Forum|alt.badge.img+24
Try this
var bool NewToggle = not [The name of your checkbox field];

var text URL = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord"
& 
"&rid=" & [Record ID#]
& 
"&apptoken=d9eascudwjxs2sesxkjccwgtq9r"
& 
"&_fid_101=" & $NewToggle;

"javascript:" &
"$.get('" &
$url &
"',function(){" &
"$.jGrowl('Email has been sent', {life: 5000, theme: 'jGrowl-green'});" &
"});" &
"void(0);"

 


------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------