[biomart-users] property 'split' of undefined

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[biomart-users] property 'split' of undefined

Mohd Amin Azuwar
function initialize() {
var queryString = location.search.substr(1), 
parts = queryString.split('&'), 
_gui = parts[0].split('=')[1], 
_mart = parts[1].split('=')[1];

 $.ajax({
url: '/rest/json/gui/' + _gui, 
success: function(json) { 
var gui = json, 
mart;

for (var i=0; mart=gui.marts[i]; i++) { 
if (mart.name == _mart) { 
break;
$('#gui')
.append('<p><strong>GUI:</strong> ' 
+ gui.displayName + '</p>')
.append('<p><strong>Number of marts:</strong> ' 
+ gui.marts.length + '</p>');
$('#mart')
.append('<p><strong>Mart:</strong> ' 
+ mart.displayName + '</p>')
.append('<p><strong>Operation:</strong> ' 
+ mart.operation + '</p>');
}
});
}
_________________
this is the error showed once i inspect the page : Uncaught TypeError: Cannot read property 'split' of undefined

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [biomart-users] property 'split' of undefined

Arek Kasprzyk
Hi Mohd,

you need to give us some context to this problem so we could try to help you

a.

On 17 May 2016 at 03:22, Mohd Amin Azuwar <[hidden email]> wrote:
function initialize() {
var queryString = location.search.substr(1), 
parts = queryString.split('&'), 
_gui = parts[0].split('=')[1], 
_mart = parts[1].split('=')[1];

 $.ajax({
url: '/rest/json/gui/' + _gui, 
success: function(json) { 
var gui = json, 
mart;

for (var i=0; mart=gui.marts[i]; i++) { 
if (mart.name == _mart) { 
break;
$('#gui')
.append('<p><strong>GUI:</strong> ' 
+ gui.displayName + '</p>')
.append('<p><strong>Number of marts:</strong> ' 
+ gui.marts.length + '</p>');
$('#mart')
.append('<p><strong>Mart:</strong> ' 
+ mart.displayName + '</p>')
.append('<p><strong>Operation:</strong> ' 
+ mart.operation + '</p>');
}
});
}
_________________
this is the error showed once i inspect the page : Uncaught TypeError: Cannot read property 'split' of undefined

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.