Skip to content
Snippets Groups Projects
Commit 75a48d81 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Indexing fix for multiple slashes.

parent 688602ac
No related merge requests found
...@@ -152,11 +152,12 @@ function ajaxLoadTab(tabid) { ...@@ -152,11 +152,12 @@ function ajaxLoadTab(tabid) {
var id = $('.hiddenId')[0].value; var id = $('.hiddenId')[0].value;
// Grab the part of the url that is the Controller and Record ID // Grab the part of the url that is the Controller and Record ID
var urlroot = document.URL.match(new RegExp('/[^/]+/'+id+'(/|\\b)')); var urlroot = document.URL.match(new RegExp('/[^/]+/'+id+'(/|\\b)'));
if(urlroot[0].substring(-1) != '/') { urlroot = urlroot.slice(-1);
urlroot[0] += '/'; if(urlroot.substring(-1) != '/') {
urlroot += '/';
} }
$.ajax({ $.ajax({
url: path + urlroot[0] + 'AjaxTab', url: path + urlroot + 'AjaxTab',
type: 'POST', type: 'POST',
data: {tab: tabid}, data: {tab: tabid},
success: function(data) { success: function(data) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment