Hi Tadabase,
I would like to ask if anyone can help me with the code. I’ve been working on this for 2 weeks now and I am unsuccessful. I am getting “/undefined” when I click the submit button, it suppose to go under the the same record.
What I want to achieve is that, I want to go to the “Add Job page” after clicking the submit button on the form on “Add Department page”.
Here is the code I used:
var setOnClickEventsForSubmitButton = function(){
$('.submit-button').click(function(event){
event.preventDefault();
var recordId = $(this).parents('form').find('.recordId span').html();
window.location.href = "/adding-referee/company/add-job/"+recordId;
});
};
TB.render('component_6', function(data) {
setOnClickEventsForSubmitButton();
$('body').on('submit', '#recordForm', function(){
setTimeout(function(){
setOnClickEventsForSubmitButton();
}, 800);
});
});