Task needed: 1. User Authentication page 2. After authentication depending on the user name the user is directed to the svg-edit page but the background image and the svg is the value from the database. 3. Auto saving and saving on close.
For this I have using ExpressJS and svg-edit 2.6.
My Approach: 1. I will create a page auth.html in /views of Expresss 2. Post the page and in the route handler authenticate it and then redirect to the svg-edit.html the whole folder with all its related .js files are put into /views so it will redirect it.
The porblem is that when server redirects i want to send the image location, username to the svg-edit.html page so that it changes the background w.r.t the value gained.
What is the best way to do such an operation.
Since I am new at ExpressJs so before writing the code. I need suggestion for the structure.
asked Nov 27 '13 at 17:58
There are really lots of ways to do it ... I would load svg-edit async in a app window ... but this is just one of many solutions. – rafaelcastrocouto Nov 27 '13 at 19:05
I want to use the MVC structure.. or the easiest way can you advice a way which is easy and on which i can easily change the background image of svg-editor on the basis of users from server – Zeeshan Nov 28 '13 at 17:57
as I said you can use an async ajax (api.jquery.com/category/ajax) or you can use websockets, they are faster but have less browser support(). You can also use good and old html forms. –
ok thanks I will use ajax to fetch the data from server and mention the routes on express. I was confused with MVC structure that how it fits in the MVC structure. – Zeeshan Nov 28 '13 at 18:45
Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Browse other questions tagged or ask your own question.