Skip to content

Instantly share code, notes, and snippets.

@apipkin
Created February 25, 2010 22:45
Show Gist options
  • Save apipkin/315127 to your computer and use it in GitHub Desktop.
Save apipkin/315127 to your computer and use it in GitHub Desktop.
updateModalUrl : function(type, value) {
var url = Y.Echofin.Modal.Upload.getUrl();
if(url.indexOf(type) < 0) {
url += '/' + type + '/' + value;
}else{
var start = url.indexOf(type) + type.length + 1;
var end = url.indexOf('/',start);
var build = url.substring(0,start) + value + url.substring(end);
url = build
}
Y.log(url);
Y.Echofin.Modal.Upload.getUrl();
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment