Skip to main content
Question

custom save and keep working and edit record

  • September 20, 2019
  • 0 replies
  • 17 views

I have the following code that works 

<a class='Vibrant' style='font-size:14px; color:white; background:#6BBD57; white-space:nowrap;' onclick='$("#saveAndKeepWorkingMenuOption").click();'>VIEW MAP</a>

but I would like it to also edit the record (before saving) and check a check box. 

This works for that ides: 
"<a class='Vibrant Snowy' style=\"width:100px; text-align: center; background-color:#81DBF8; \" href=\"javascript:if($('#_fid_1422').val() != '1') {$('#_fid_1422').attr('checked', true); DoSaveAdd();}else{alert('PLEASE USE THE SAVE BUTTON AT THE TOP OF THE PAGE')}\">VIEW MAP</a>"

But it does not redirect the way I want it to...I want it to redirect to the current record in edit mode.

The one catch is that this button is generally pressed before the record was ever saved, so there is no record ID...that's why I need to use a JS 
DoSaveAdd or the onclick option.

Any ideas of how to combine the 2?

Thanks!


------------------------------
E. P.
------------------------------
This topic has been closed for replies.

EverettPatterso
Forum|alt.badge.img+10
Try it with the DoSaveAdd in the onclick and use the href for redirect

var text URLONE = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & URLEncode ([Record ID#]); 
"<a class='Vibrant Snowy' style=\"width:100px; text-align: center; background-color:#81DBF8; onclick=\"javascript: DoSaveAdd();\" \" href=\"" & $URLONE & "\">VIEW MAP</a>"






------------------------------
Everett Patterson
------------------------------