I have 2 files, there are Index.aspx and AdminHome.aspx. and also have javascript file (test.js) for logic behind.

Index and adminHome is actually same but the different is only the redirect action.

If I run program from Index.aspx then i'll be redirect to CheckSeat.aspx

If I run program from AdminHome.aspx then I'll be redirect to AdminCheckSeat.aspx. I want to use same Javascript because each file has same logic. only the redirect file is the different.

this is my redirect code on .js

var url = "CheckSeat.aspx?noSeat=" + encodeURIComponent(lObjSeat[0].Name) + "&endtime=" + encodeURIComponent(time);                 

so Is it possible to do ? if ya, How do you do ?

Related posts

Recent Viewed