Linking click issue with the backbone JS frame work










1















I have a very weird problem happening in my application. I am using backbone JS framework as well as loading the screens one depending on another. To explain my problem below is the example of URL formation, the screens are loading and URL is getting formed one by one. But when I directly create the same URL & hit into the browser the screens are not getting loaded. I needed this as we want to link one screen to another



For example:
First, the parent is loading depending on parent id, children are loading, depending on children grandchildren are loading.



So below is URL formation.



https://example.com/#/parent-detail/xxx?child1=xxx&child2=xxx&child3=xxxxxxx&child4=xxxxxxxxxxxxx


In the above URL each child id depending on one another.



When I want to link the last child using this URL, then this is not going through that particular page.



But when I go with to the page by clicking one by one to each child then it's loading the respected child page.



Please help me out how should I link the last grandchild using the URL.



I am using below technical stack:



Backbone JS & Javascript - For Frontend
Node JS - for backend
Mysql - database
MongoDB - database
Redis server - caching
HTML5 & CSS3 - design


EDIT



Here is how I am forming the URL on my frontend pages dahboard.html:



<a href="#/parent-detail_2/<%= child[0].parent_id %>?s=<%= child[0].child1 %>&child2=<%= child[0].child2 %>&child3=<%= child[0]._id %>"><span></span> <b><%= child[i].child[0].name %></b></a>


This URL is getting formed with above code that I am using in the dashboard.



Here are my application routes from routes.js:



 routes:

"dashboard" : "dashboard",
"dashboard/parent/:id" : "dashboard_parent",
"signup" : "signup",
"forgotpassword" : "forgotpassword",
"change-password/:token" : "resetpassword",
"login" : "login",
"logout" : "logout",
"parents/" : "parents",
"parent-detail/:id" : "parent_detail",
"parent-detail_1/:id" : "parent_detail_1",
"parent-detail_2/:id" : "parent_detail_2",
"verify_user/:token" : "verifyEmail"



Here is the carter code:



window.ParentView = Backbone.View.extend(
el: "#content2",
initialize: function()
this.render();
,
render: function()
var self = this;
// $('body').attr('class', 'fixed-topbar fixed-sidebar theme-sdtl color-default dashboard');

$.get(BASEURL + "template/parents/parents.html", function(html)
var template = _.template(html);
var vars = username: window.localStorage.getItem('username') ;
html = template(vars);
self.$el.html(html);
);
,

);

var ParentTabsView = Backbone.View.extend(
el: '#parents-tabs',
props: ,

initialize: function(params)
// console.log(params);
if(params && params.sharedParentModel)
this.sharedParentModel = params.sharedParentModel

//console.log(this.sharedParentModel);
,
renderChat: function(parent)
var _this = this;
$.get(BASEURL + "template/parents/right_section/chat.html", function(html)
$(parent).html(html);
);
,
renderTasks: function(parent, activity_id)
this.sharedParentModel.activity_id = activity_id;
var _this = this;
$.get(BASEURL + "template/parents/right_section/tasks_layout.html", function(html)
var template = _.template(html);
$(parent).html(template());
).done(function()
new TasksView(sharedParentModel: _this.sharedParentModel).load_data_and_render();
);
,
renderInvitePeople: function(parent)
this.clearIt(parent);
$(parent).append(new InvitePeopleView(sharedParentModel: this.sharedParentModel).render().el);
,
renderShowInvitedPeople: function(parent)
this.clearIt(parent);
$(parent).append(new ShowInvitedPeopleView(sharedParentModel: this.sharedParentModel).render().el);
,
renderTeam: function(parent)
var _this = this;
// console.log(this.sharedParentModel);

this.clearIt(parent);
$(parent).append(new TeamListParentView(sharedParentModel: this.sharedParentModel).render().el);
,
renderTasksInfoChat: function(parent)
this.clearIt(parent);

var outerTemplate = crel('div', class: 'row');
var promiseOne = new Promise(function(resolve, reject)
$.get(BASEURL + "template/parents/right_section/task_info.html")
.done(function(html) resolve(html); )
.fail(function(err) reject(err));
);
var promiseTwo = new Promise(function(resolve, reject)
$.get(BASEURL + "template/parents/right_section/chat.html")
.done(function(html) resolve(html); )
.fail(function(err) reject(err); );
);

Promise.all([promiseOne, promiseTwo]).then(function(values)
var view = _.map(values, function(dom) $(outerTemplate).append(dom); );
$(parent).append(outerTemplate);
);
,
clearThem: function(parents)
var _this = this;
_.each(parents, function(parent)
$(parent).empty();
)
,
clearIt: function(parent)
$(parent).empty();
,
destroy_view: function()
// COMPLETELY UNBIND THE VIEW
this.undelegateEvents();
this.$el.removeData().unbind();
// Remove view from DOM
this.remove();
Backbone.View.prototype.remove.call(this);
,
set_params: function(params)
if(params && params.sharedParentModel)
this.sharedParentModel = params.sharedParentModel

,
);


What is wrong here.



Please help.
Thanks in advance.










share|improve this question



















  • 1





    Nice that's you're using a such a stack. However, we really don't need all that detail for the question being asked, nor is it appropriate to "spam" all those tags onto your question which is seemingly solely about a "front end design" concept. Despite someone's wayward vote here, this is NOT a good question. The best way to ask "What is wrong here". Is to give people enough code to reproduce the problem.. So we don't need to see all those backend things unless you actually include backend code that is relevant to those services. Hope that's clear

    – Neil Lunn
    Nov 15 '18 at 6:31











  • Yes sure, let me edit the question and include the backend code.

    – Sumit Munot
    Nov 15 '18 at 6:38






  • 1





    I think you're missing the point. We don't want the backend unless it's absolutely relevant to the question being asked. From what I can gather, it's NOT. The relevant code missing rather is "front end code". Also really obtuse and obscure questions which receive votes immediately on posting get noticed, and not in a good way. You might consider that as well.

    – Neil Lunn
    Nov 15 '18 at 6:43












  • Yes, I considered that I will put all the relevant code here with which I am facing the issue. Just adding that for both the side. So that it would be more clear.

    – Sumit Munot
    Nov 15 '18 at 6:48






  • 1





    typo in your route: paent-detail... You need also a route to cater for any query strings, where's the code for that?

    – Stuart
    Nov 16 '18 at 19:00















1















I have a very weird problem happening in my application. I am using backbone JS framework as well as loading the screens one depending on another. To explain my problem below is the example of URL formation, the screens are loading and URL is getting formed one by one. But when I directly create the same URL & hit into the browser the screens are not getting loaded. I needed this as we want to link one screen to another



For example:
First, the parent is loading depending on parent id, children are loading, depending on children grandchildren are loading.



So below is URL formation.



https://example.com/#/parent-detail/xxx?child1=xxx&child2=xxx&child3=xxxxxxx&child4=xxxxxxxxxxxxx


In the above URL each child id depending on one another.



When I want to link the last child using this URL, then this is not going through that particular page.



But when I go with to the page by clicking one by one to each child then it's loading the respected child page.



Please help me out how should I link the last grandchild using the URL.



I am using below technical stack:



Backbone JS & Javascript - For Frontend
Node JS - for backend
Mysql - database
MongoDB - database
Redis server - caching
HTML5 & CSS3 - design


EDIT



Here is how I am forming the URL on my frontend pages dahboard.html:



<a href="#/parent-detail_2/<%= child[0].parent_id %>?s=<%= child[0].child1 %>&child2=<%= child[0].child2 %>&child3=<%= child[0]._id %>"><span></span> <b><%= child[i].child[0].name %></b></a>


This URL is getting formed with above code that I am using in the dashboard.



Here are my application routes from routes.js:



 routes:

"dashboard" : "dashboard",
"dashboard/parent/:id" : "dashboard_parent",
"signup" : "signup",
"forgotpassword" : "forgotpassword",
"change-password/:token" : "resetpassword",
"login" : "login",
"logout" : "logout",
"parents/" : "parents",
"parent-detail/:id" : "parent_detail",
"parent-detail_1/:id" : "parent_detail_1",
"parent-detail_2/:id" : "parent_detail_2",
"verify_user/:token" : "verifyEmail"



Here is the carter code:



window.ParentView = Backbone.View.extend(
el: "#content2",
initialize: function()
this.render();
,
render: function()
var self = this;
// $('body').attr('class', 'fixed-topbar fixed-sidebar theme-sdtl color-default dashboard');

$.get(BASEURL + "template/parents/parents.html", function(html)
var template = _.template(html);
var vars = username: window.localStorage.getItem('username') ;
html = template(vars);
self.$el.html(html);
);
,

);

var ParentTabsView = Backbone.View.extend(
el: '#parents-tabs',
props: ,

initialize: function(params)
// console.log(params);
if(params && params.sharedParentModel)
this.sharedParentModel = params.sharedParentModel

//console.log(this.sharedParentModel);
,
renderChat: function(parent)
var _this = this;
$.get(BASEURL + "template/parents/right_section/chat.html", function(html)
$(parent).html(html);
);
,
renderTasks: function(parent, activity_id)
this.sharedParentModel.activity_id = activity_id;
var _this = this;
$.get(BASEURL + "template/parents/right_section/tasks_layout.html", function(html)
var template = _.template(html);
$(parent).html(template());
).done(function()
new TasksView(sharedParentModel: _this.sharedParentModel).load_data_and_render();
);
,
renderInvitePeople: function(parent)
this.clearIt(parent);
$(parent).append(new InvitePeopleView(sharedParentModel: this.sharedParentModel).render().el);
,
renderShowInvitedPeople: function(parent)
this.clearIt(parent);
$(parent).append(new ShowInvitedPeopleView(sharedParentModel: this.sharedParentModel).render().el);
,
renderTeam: function(parent)
var _this = this;
// console.log(this.sharedParentModel);

this.clearIt(parent);
$(parent).append(new TeamListParentView(sharedParentModel: this.sharedParentModel).render().el);
,
renderTasksInfoChat: function(parent)
this.clearIt(parent);

var outerTemplate = crel('div', class: 'row');
var promiseOne = new Promise(function(resolve, reject)
$.get(BASEURL + "template/parents/right_section/task_info.html")
.done(function(html) resolve(html); )
.fail(function(err) reject(err));
);
var promiseTwo = new Promise(function(resolve, reject)
$.get(BASEURL + "template/parents/right_section/chat.html")
.done(function(html) resolve(html); )
.fail(function(err) reject(err); );
);

Promise.all([promiseOne, promiseTwo]).then(function(values)
var view = _.map(values, function(dom) $(outerTemplate).append(dom); );
$(parent).append(outerTemplate);
);
,
clearThem: function(parents)
var _this = this;
_.each(parents, function(parent)
$(parent).empty();
)
,
clearIt: function(parent)
$(parent).empty();
,
destroy_view: function()
// COMPLETELY UNBIND THE VIEW
this.undelegateEvents();
this.$el.removeData().unbind();
// Remove view from DOM
this.remove();
Backbone.View.prototype.remove.call(this);
,
set_params: function(params)
if(params && params.sharedParentModel)
this.sharedParentModel = params.sharedParentModel

,
);


What is wrong here.



Please help.
Thanks in advance.










share|improve this question



















  • 1





    Nice that's you're using a such a stack. However, we really don't need all that detail for the question being asked, nor is it appropriate to "spam" all those tags onto your question which is seemingly solely about a "front end design" concept. Despite someone's wayward vote here, this is NOT a good question. The best way to ask "What is wrong here". Is to give people enough code to reproduce the problem.. So we don't need to see all those backend things unless you actually include backend code that is relevant to those services. Hope that's clear

    – Neil Lunn
    Nov 15 '18 at 6:31











  • Yes sure, let me edit the question and include the backend code.

    – Sumit Munot
    Nov 15 '18 at 6:38






  • 1





    I think you're missing the point. We don't want the backend unless it's absolutely relevant to the question being asked. From what I can gather, it's NOT. The relevant code missing rather is "front end code". Also really obtuse and obscure questions which receive votes immediately on posting get noticed, and not in a good way. You might consider that as well.

    – Neil Lunn
    Nov 15 '18 at 6:43












  • Yes, I considered that I will put all the relevant code here with which I am facing the issue. Just adding that for both the side. So that it would be more clear.

    – Sumit Munot
    Nov 15 '18 at 6:48






  • 1





    typo in your route: paent-detail... You need also a route to cater for any query strings, where's the code for that?

    – Stuart
    Nov 16 '18 at 19:00













1












1








1








I have a very weird problem happening in my application. I am using backbone JS framework as well as loading the screens one depending on another. To explain my problem below is the example of URL formation, the screens are loading and URL is getting formed one by one. But when I directly create the same URL & hit into the browser the screens are not getting loaded. I needed this as we want to link one screen to another



For example:
First, the parent is loading depending on parent id, children are loading, depending on children grandchildren are loading.



So below is URL formation.



https://example.com/#/parent-detail/xxx?child1=xxx&child2=xxx&child3=xxxxxxx&child4=xxxxxxxxxxxxx


In the above URL each child id depending on one another.



When I want to link the last child using this URL, then this is not going through that particular page.



But when I go with to the page by clicking one by one to each child then it's loading the respected child page.



Please help me out how should I link the last grandchild using the URL.



I am using below technical stack:



Backbone JS & Javascript - For Frontend
Node JS - for backend
Mysql - database
MongoDB - database
Redis server - caching
HTML5 & CSS3 - design


EDIT



Here is how I am forming the URL on my frontend pages dahboard.html:



<a href="#/parent-detail_2/<%= child[0].parent_id %>?s=<%= child[0].child1 %>&child2=<%= child[0].child2 %>&child3=<%= child[0]._id %>"><span></span> <b><%= child[i].child[0].name %></b></a>


This URL is getting formed with above code that I am using in the dashboard.



Here are my application routes from routes.js:



 routes:

"dashboard" : "dashboard",
"dashboard/parent/:id" : "dashboard_parent",
"signup" : "signup",
"forgotpassword" : "forgotpassword",
"change-password/:token" : "resetpassword",
"login" : "login",
"logout" : "logout",
"parents/" : "parents",
"parent-detail/:id" : "parent_detail",
"parent-detail_1/:id" : "parent_detail_1",
"parent-detail_2/:id" : "parent_detail_2",
"verify_user/:token" : "verifyEmail"



Here is the carter code:



window.ParentView = Backbone.View.extend(
el: "#content2",
initialize: function()
this.render();
,
render: function()
var self = this;
// $('body').attr('class', 'fixed-topbar fixed-sidebar theme-sdtl color-default dashboard');

$.get(BASEURL + "template/parents/parents.html", function(html)
var template = _.template(html);
var vars = username: window.localStorage.getItem('username') ;
html = template(vars);
self.$el.html(html);
);
,

);

var ParentTabsView = Backbone.View.extend(
el: '#parents-tabs',
props: ,

initialize: function(params)
// console.log(params);
if(params && params.sharedParentModel)
this.sharedParentModel = params.sharedParentModel

//console.log(this.sharedParentModel);
,
renderChat: function(parent)
var _this = this;
$.get(BASEURL + "template/parents/right_section/chat.html", function(html)
$(parent).html(html);
);
,
renderTasks: function(parent, activity_id)
this.sharedParentModel.activity_id = activity_id;
var _this = this;
$.get(BASEURL + "template/parents/right_section/tasks_layout.html", function(html)
var template = _.template(html);
$(parent).html(template());
).done(function()
new TasksView(sharedParentModel: _this.sharedParentModel).load_data_and_render();
);
,
renderInvitePeople: function(parent)
this.clearIt(parent);
$(parent).append(new InvitePeopleView(sharedParentModel: this.sharedParentModel).render().el);
,
renderShowInvitedPeople: function(parent)
this.clearIt(parent);
$(parent).append(new ShowInvitedPeopleView(sharedParentModel: this.sharedParentModel).render().el);
,
renderTeam: function(parent)
var _this = this;
// console.log(this.sharedParentModel);

this.clearIt(parent);
$(parent).append(new TeamListParentView(sharedParentModel: this.sharedParentModel).render().el);
,
renderTasksInfoChat: function(parent)
this.clearIt(parent);

var outerTemplate = crel('div', class: 'row');
var promiseOne = new Promise(function(resolve, reject)
$.get(BASEURL + "template/parents/right_section/task_info.html")
.done(function(html) resolve(html); )
.fail(function(err) reject(err));
);
var promiseTwo = new Promise(function(resolve, reject)
$.get(BASEURL + "template/parents/right_section/chat.html")
.done(function(html) resolve(html); )
.fail(function(err) reject(err); );
);

Promise.all([promiseOne, promiseTwo]).then(function(values)
var view = _.map(values, function(dom) $(outerTemplate).append(dom); );
$(parent).append(outerTemplate);
);
,
clearThem: function(parents)
var _this = this;
_.each(parents, function(parent)
$(parent).empty();
)
,
clearIt: function(parent)
$(parent).empty();
,
destroy_view: function()
// COMPLETELY UNBIND THE VIEW
this.undelegateEvents();
this.$el.removeData().unbind();
// Remove view from DOM
this.remove();
Backbone.View.prototype.remove.call(this);
,
set_params: function(params)
if(params && params.sharedParentModel)
this.sharedParentModel = params.sharedParentModel

,
);


What is wrong here.



Please help.
Thanks in advance.










share|improve this question
















I have a very weird problem happening in my application. I am using backbone JS framework as well as loading the screens one depending on another. To explain my problem below is the example of URL formation, the screens are loading and URL is getting formed one by one. But when I directly create the same URL & hit into the browser the screens are not getting loaded. I needed this as we want to link one screen to another



For example:
First, the parent is loading depending on parent id, children are loading, depending on children grandchildren are loading.



So below is URL formation.



https://example.com/#/parent-detail/xxx?child1=xxx&child2=xxx&child3=xxxxxxx&child4=xxxxxxxxxxxxx


In the above URL each child id depending on one another.



When I want to link the last child using this URL, then this is not going through that particular page.



But when I go with to the page by clicking one by one to each child then it's loading the respected child page.



Please help me out how should I link the last grandchild using the URL.



I am using below technical stack:



Backbone JS & Javascript - For Frontend
Node JS - for backend
Mysql - database
MongoDB - database
Redis server - caching
HTML5 & CSS3 - design


EDIT



Here is how I am forming the URL on my frontend pages dahboard.html:



<a href="#/parent-detail_2/<%= child[0].parent_id %>?s=<%= child[0].child1 %>&child2=<%= child[0].child2 %>&child3=<%= child[0]._id %>"><span></span> <b><%= child[i].child[0].name %></b></a>


This URL is getting formed with above code that I am using in the dashboard.



Here are my application routes from routes.js:



 routes:

"dashboard" : "dashboard",
"dashboard/parent/:id" : "dashboard_parent",
"signup" : "signup",
"forgotpassword" : "forgotpassword",
"change-password/:token" : "resetpassword",
"login" : "login",
"logout" : "logout",
"parents/" : "parents",
"parent-detail/:id" : "parent_detail",
"parent-detail_1/:id" : "parent_detail_1",
"parent-detail_2/:id" : "parent_detail_2",
"verify_user/:token" : "verifyEmail"



Here is the carter code:



window.ParentView = Backbone.View.extend(
el: "#content2",
initialize: function()
this.render();
,
render: function()
var self = this;
// $('body').attr('class', 'fixed-topbar fixed-sidebar theme-sdtl color-default dashboard');

$.get(BASEURL + "template/parents/parents.html", function(html)
var template = _.template(html);
var vars = username: window.localStorage.getItem('username') ;
html = template(vars);
self.$el.html(html);
);
,

);

var ParentTabsView = Backbone.View.extend(
el: '#parents-tabs',
props: ,

initialize: function(params)
// console.log(params);
if(params && params.sharedParentModel)
this.sharedParentModel = params.sharedParentModel

//console.log(this.sharedParentModel);
,
renderChat: function(parent)
var _this = this;
$.get(BASEURL + "template/parents/right_section/chat.html", function(html)
$(parent).html(html);
);
,
renderTasks: function(parent, activity_id)
this.sharedParentModel.activity_id = activity_id;
var _this = this;
$.get(BASEURL + "template/parents/right_section/tasks_layout.html", function(html)
var template = _.template(html);
$(parent).html(template());
).done(function()
new TasksView(sharedParentModel: _this.sharedParentModel).load_data_and_render();
);
,
renderInvitePeople: function(parent)
this.clearIt(parent);
$(parent).append(new InvitePeopleView(sharedParentModel: this.sharedParentModel).render().el);
,
renderShowInvitedPeople: function(parent)
this.clearIt(parent);
$(parent).append(new ShowInvitedPeopleView(sharedParentModel: this.sharedParentModel).render().el);
,
renderTeam: function(parent)
var _this = this;
// console.log(this.sharedParentModel);

this.clearIt(parent);
$(parent).append(new TeamListParentView(sharedParentModel: this.sharedParentModel).render().el);
,
renderTasksInfoChat: function(parent)
this.clearIt(parent);

var outerTemplate = crel('div', class: 'row');
var promiseOne = new Promise(function(resolve, reject)
$.get(BASEURL + "template/parents/right_section/task_info.html")
.done(function(html) resolve(html); )
.fail(function(err) reject(err));
);
var promiseTwo = new Promise(function(resolve, reject)
$.get(BASEURL + "template/parents/right_section/chat.html")
.done(function(html) resolve(html); )
.fail(function(err) reject(err); );
);

Promise.all([promiseOne, promiseTwo]).then(function(values)
var view = _.map(values, function(dom) $(outerTemplate).append(dom); );
$(parent).append(outerTemplate);
);
,
clearThem: function(parents)
var _this = this;
_.each(parents, function(parent)
$(parent).empty();
)
,
clearIt: function(parent)
$(parent).empty();
,
destroy_view: function()
// COMPLETELY UNBIND THE VIEW
this.undelegateEvents();
this.$el.removeData().unbind();
// Remove view from DOM
this.remove();
Backbone.View.prototype.remove.call(this);
,
set_params: function(params)
if(params && params.sharedParentModel)
this.sharedParentModel = params.sharedParentModel

,
);


What is wrong here.



Please help.
Thanks in advance.







javascript backbone.js






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 '18 at 12:16







Sumit Munot

















asked Nov 15 '18 at 6:12









Sumit MunotSumit Munot

2,9402044




2,9402044







  • 1





    Nice that's you're using a such a stack. However, we really don't need all that detail for the question being asked, nor is it appropriate to "spam" all those tags onto your question which is seemingly solely about a "front end design" concept. Despite someone's wayward vote here, this is NOT a good question. The best way to ask "What is wrong here". Is to give people enough code to reproduce the problem.. So we don't need to see all those backend things unless you actually include backend code that is relevant to those services. Hope that's clear

    – Neil Lunn
    Nov 15 '18 at 6:31











  • Yes sure, let me edit the question and include the backend code.

    – Sumit Munot
    Nov 15 '18 at 6:38






  • 1





    I think you're missing the point. We don't want the backend unless it's absolutely relevant to the question being asked. From what I can gather, it's NOT. The relevant code missing rather is "front end code". Also really obtuse and obscure questions which receive votes immediately on posting get noticed, and not in a good way. You might consider that as well.

    – Neil Lunn
    Nov 15 '18 at 6:43












  • Yes, I considered that I will put all the relevant code here with which I am facing the issue. Just adding that for both the side. So that it would be more clear.

    – Sumit Munot
    Nov 15 '18 at 6:48






  • 1





    typo in your route: paent-detail... You need also a route to cater for any query strings, where's the code for that?

    – Stuart
    Nov 16 '18 at 19:00












  • 1





    Nice that's you're using a such a stack. However, we really don't need all that detail for the question being asked, nor is it appropriate to "spam" all those tags onto your question which is seemingly solely about a "front end design" concept. Despite someone's wayward vote here, this is NOT a good question. The best way to ask "What is wrong here". Is to give people enough code to reproduce the problem.. So we don't need to see all those backend things unless you actually include backend code that is relevant to those services. Hope that's clear

    – Neil Lunn
    Nov 15 '18 at 6:31











  • Yes sure, let me edit the question and include the backend code.

    – Sumit Munot
    Nov 15 '18 at 6:38






  • 1





    I think you're missing the point. We don't want the backend unless it's absolutely relevant to the question being asked. From what I can gather, it's NOT. The relevant code missing rather is "front end code". Also really obtuse and obscure questions which receive votes immediately on posting get noticed, and not in a good way. You might consider that as well.

    – Neil Lunn
    Nov 15 '18 at 6:43












  • Yes, I considered that I will put all the relevant code here with which I am facing the issue. Just adding that for both the side. So that it would be more clear.

    – Sumit Munot
    Nov 15 '18 at 6:48






  • 1





    typo in your route: paent-detail... You need also a route to cater for any query strings, where's the code for that?

    – Stuart
    Nov 16 '18 at 19:00







1




1





Nice that's you're using a such a stack. However, we really don't need all that detail for the question being asked, nor is it appropriate to "spam" all those tags onto your question which is seemingly solely about a "front end design" concept. Despite someone's wayward vote here, this is NOT a good question. The best way to ask "What is wrong here". Is to give people enough code to reproduce the problem.. So we don't need to see all those backend things unless you actually include backend code that is relevant to those services. Hope that's clear

– Neil Lunn
Nov 15 '18 at 6:31





Nice that's you're using a such a stack. However, we really don't need all that detail for the question being asked, nor is it appropriate to "spam" all those tags onto your question which is seemingly solely about a "front end design" concept. Despite someone's wayward vote here, this is NOT a good question. The best way to ask "What is wrong here". Is to give people enough code to reproduce the problem.. So we don't need to see all those backend things unless you actually include backend code that is relevant to those services. Hope that's clear

– Neil Lunn
Nov 15 '18 at 6:31













Yes sure, let me edit the question and include the backend code.

– Sumit Munot
Nov 15 '18 at 6:38





Yes sure, let me edit the question and include the backend code.

– Sumit Munot
Nov 15 '18 at 6:38




1




1





I think you're missing the point. We don't want the backend unless it's absolutely relevant to the question being asked. From what I can gather, it's NOT. The relevant code missing rather is "front end code". Also really obtuse and obscure questions which receive votes immediately on posting get noticed, and not in a good way. You might consider that as well.

– Neil Lunn
Nov 15 '18 at 6:43






I think you're missing the point. We don't want the backend unless it's absolutely relevant to the question being asked. From what I can gather, it's NOT. The relevant code missing rather is "front end code". Also really obtuse and obscure questions which receive votes immediately on posting get noticed, and not in a good way. You might consider that as well.

– Neil Lunn
Nov 15 '18 at 6:43














Yes, I considered that I will put all the relevant code here with which I am facing the issue. Just adding that for both the side. So that it would be more clear.

– Sumit Munot
Nov 15 '18 at 6:48





Yes, I considered that I will put all the relevant code here with which I am facing the issue. Just adding that for both the side. So that it would be more clear.

– Sumit Munot
Nov 15 '18 at 6:48




1




1





typo in your route: paent-detail... You need also a route to cater for any query strings, where's the code for that?

– Stuart
Nov 16 '18 at 19:00





typo in your route: paent-detail... You need also a route to cater for any query strings, where's the code for that?

– Stuart
Nov 16 '18 at 19:00












1 Answer
1






active

oldest

votes


















0














So basically we have found a workaround for our problem. We have loaded the last child in the parent views that was not loading directly. So for that loaded each child by setting the click trigger with some interval using below code.



renderChild:function(e)
var child_id = $(e.target).closest('.renderChild').attr('child-id');
var renderChildTimer = setInterval(function()
if (document.getElementById(task_id))
$('#'+child_id).trigger('click');
clearInterval(renderChildTimer);

, 800);



Here in above code we have triggered each child id from url with click function.






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313442%2flinking-click-issue-with-the-backbone-js-frame-work%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    So basically we have found a workaround for our problem. We have loaded the last child in the parent views that was not loading directly. So for that loaded each child by setting the click trigger with some interval using below code.



    renderChild:function(e)
    var child_id = $(e.target).closest('.renderChild').attr('child-id');
    var renderChildTimer = setInterval(function()
    if (document.getElementById(task_id))
    $('#'+child_id).trigger('click');
    clearInterval(renderChildTimer);

    , 800);



    Here in above code we have triggered each child id from url with click function.






    share|improve this answer



























      0














      So basically we have found a workaround for our problem. We have loaded the last child in the parent views that was not loading directly. So for that loaded each child by setting the click trigger with some interval using below code.



      renderChild:function(e)
      var child_id = $(e.target).closest('.renderChild').attr('child-id');
      var renderChildTimer = setInterval(function()
      if (document.getElementById(task_id))
      $('#'+child_id).trigger('click');
      clearInterval(renderChildTimer);

      , 800);



      Here in above code we have triggered each child id from url with click function.






      share|improve this answer

























        0












        0








        0







        So basically we have found a workaround for our problem. We have loaded the last child in the parent views that was not loading directly. So for that loaded each child by setting the click trigger with some interval using below code.



        renderChild:function(e)
        var child_id = $(e.target).closest('.renderChild').attr('child-id');
        var renderChildTimer = setInterval(function()
        if (document.getElementById(task_id))
        $('#'+child_id).trigger('click');
        clearInterval(renderChildTimer);

        , 800);



        Here in above code we have triggered each child id from url with click function.






        share|improve this answer













        So basically we have found a workaround for our problem. We have loaded the last child in the parent views that was not loading directly. So for that loaded each child by setting the click trigger with some interval using below code.



        renderChild:function(e)
        var child_id = $(e.target).closest('.renderChild').attr('child-id');
        var renderChildTimer = setInterval(function()
        if (document.getElementById(task_id))
        $('#'+child_id).trigger('click');
        clearInterval(renderChildTimer);

        , 800);



        Here in above code we have triggered each child id from url with click function.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 23 '18 at 7:12









        Sumit MunotSumit Munot

        2,9402044




        2,9402044





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313442%2flinking-click-issue-with-the-backbone-js-frame-work%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3

            Museum of Modern and Contemporary Art of Trento and Rovereto