Forum Discussion

LijaHarris's avatar
Qrew Cadet
2 years ago

Code Page Submit Button Redirects to Webpage with Record ID

So I have a code page that is client facing so when the user hit submits (the submit button) I would like them to be directed to another webpage (code page) that in the URL holds the newly created record id.  Below is some of the code: The xxxx are placeholders

</table><input type=hidden name=rdr value=''>
<input type=submit value=Submit>

ideally the value should be: "" + "&rid=" + rid

Here is the java code:

$.ajax({url: "xxxxxxxxxxx?act=API_AddRecord",
type: 'POST',
data: req1,
contentType: "text/xml",
dataType: "xml",
processData: false,
success: function(data, status, xhr) {
var _rid = $(data).find('rid');
var rid = _rid[0].innerHTML;
var customRedirectURL = "" + "&rid=" + rid;
window.location.href = customRedirectURL;

Lija Harris