Forum Discussion
GeorgeBramhall2
4 years agoQrew Cadet
This is the code I originally had. It never closes the Popup. It leaves me with the pop open and at the point where I started but within the popup.
------------------------------
George Bramhall
------------------------------
------------------------------
George Bramhall
------------------------------
MarkShnier__You
Qrew Legend
4 years agoII had not looked at those code page examples in a while. This work for me to open a record in edit mode and upon save it close the pop-up.
URLRoot() &"db/" & Dbid() & "?a=er"& "&rid=" & [Record ID#]
& "&NextURL=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=11")
But this did not refresh the original page. I'm not sure if you need that to happen but there seem to be other examples that would refresh the page.
Page 11 was the code page example here
CloseWindow.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<script>
window.close();
</script>
<body>
</body>
</html>
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
URLRoot() &"db/" & Dbid() & "?a=er"& "&rid=" & [Record ID#]
& "&NextURL=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=11")
But this did not refresh the original page. I'm not sure if you need that to happen but there seem to be other examples that would refresh the page.
Page 11 was the code page example here
CloseWindow.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<script>
window.close();
</script>
<body>
</body>
</html>
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
- MikeTamoush4 years agoQrew Elite
Mark,
That also worked for me. But I discovered something (why I thought it didn't work for me before). This seems to only work when triggered from the record itself (meaning, when you are in the record on the form).
I tried it from the table view (the button was one of my columns) and interestingly, it does not work when the button is pushed from a report.
Also, regarding auto refresh - in my testing it DOES auto refresh if the button is Formula Rich Text, but interestingly does NOT auto-refresh if the button is formula URL.
------------------------------
Mike Tamoush
------------------------------- ElenaLarrabee14 years agoQrew CaptainEdit - Just kidding! It's because I had it set as a formula url and not rich text.
Hey guys, I'm also in the process of trying to get this to work - I can get it working perfectly, but when I try to use the code to refresh the source page I get an error message.
This works:
URLRoot() & "db/" & [_DBID_SUPPORT_FILES] & "?a=API_GenAddRecordForm&_fid_28=" & URLEncode ([Record ID#]) & "&dfid=10" & "&z=" & "&NextURL=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=47")
This does not:
var text url = URLRoot() & "db/" & [_DBID_SUPPORT_FILES] & "?a=API_GenAddRecordForm&_fid_28=" & URLEncode ([Record ID#]) & "&dfid=10" & "&z=" & "&NextURL=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=47");
"<a class='Vibrant Danger OpenAsPopup' href='" & $url & "' data-height=500 data-width=500 data-refresh=true title='Clicking this button will open a popup'>Add Child in Popup w/ Auto Close on Save - Rich Text</a>"
And I get this message:
I'm sure I'm making a super obvious syntax error...
------------------------------
Elena Larrabee
------------------------------