+ 9

[SOLVED]How to link webpages on sololearn

I want my webpage to be linked with another webpage I created on sololearn.. First webpage is a 'login portal 'and another is ' my department ' . I want them to be linked such that when user submits form 'my department 'page should open.. https://code.sololearn.com/Wux3gE3KVSf3/?ref=app https://code.sololearn.com/WAJOc56Q87SA/?ref=app

16th Mar 2019, 1:21 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
14 Respostas
+ 6
It's possible to do spa here, but its hackable, since the whole html exposed on the client browser.
16th Mar 2019, 2:46 PM
Calviղ
Calviղ - avatar
+ 9
Yup I will also second to the answers by Calviղ and Seniru Pasan [BUSY - EXAM]. I hope your doubt is cleared, Omkar Jadav. I tried to look for few workarounds myself, and found a quick hack by simulating click on fake anchor tag 😅. https://code.sololearn.com/WjnP4Wb3ol3b/?ref=app Also note that, what you are trying to implement requires processing a routing request from server side after successful authentication from login page's form action. On sololearn we are only limited to do client stuffs( html, css and js), that too without things like cookies, file api access.
16th Mar 2019, 5:09 PM
Morpheus
Morpheus - avatar
+ 8
Omkar Jadhav, follow Morpheus way, he shows you how does the web routing actually works. If you really want to use spa (single page application) way, I have combined your 2 pages of codes together, to form a spa. Check it out. https://code.sololearn.com/WFBala0AvJes/?ref=app I have done all the coding, except user login auth part, which is easy to be implemented by you. Bear in mind, as i mentioned before, this login method is unsecured, anyone can exploit your codes get the access page without login, it's still useful if you plan to run this code from a single monitored computer to let anyone come to login and view the page
17th Mar 2019, 4:11 AM
Calviղ
Calviղ - avatar
+ 7
You can't create multiple pages websites in here. If you need the functionalities like multiple pages, you should consider updating content of the page dynamically using Javascript as one page Web applications are becoming popular these days.
16th Mar 2019, 1:34 PM
Шащи Ранжан
Шащи Ранжан - avatar
+ 7
Morpheus Thanks... You are very helpful 😊.
16th Mar 2019, 5:42 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 6
Shashi Ranjan Calviղ Seniru Pasan [BUSY - EXAM] thank you everyone for answering my question....
16th Mar 2019, 4:27 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 5
Shashi Ranjan I want to do it in HTML by using action attribute of form element ...
16th Mar 2019, 1:36 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 5
I understand. But sadly that's not possible here on SL.
16th Mar 2019, 1:40 PM
Шащи Ранжан
Шащи Ранжан - avatar
+ 4
Calviղ please can you explain a little more I'm very interested to understand it
16th Mar 2019, 2:50 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 4
The code of html page is fully exposed on any browser, someone could easily edit your html, to view the password protected page.
16th Mar 2019, 3:24 PM
Calviղ
Calviղ - avatar
+ 3
There is no way to do it with the sololearn file system. But you can try out these tricks. 1. Placing all the pages in 1 page (all other than default are hidden). Then when you want to go to another then you have to do is making the element visible. 2. The second method is to make the pages in an external place - like codepen and make them visible using iframes.
16th Mar 2019, 4:24 PM
Seniru
Seniru - avatar
+ 3
You can, but thats too messy. Just fill up the HTML document with multiple <body> tags. Use their CSS display:none; Then use JS which changes the display to flex when user clicks on some buttons.👍 Too messy but will definitely work👍
17th Mar 2019, 5:35 AM
Sarthak Gupta
Sarthak Gupta - avatar
+ 1
Nice
23rd Apr 2020, 1:02 PM
Akintunde Taofeek
Akintunde Taofeek - avatar
0
Я тут новичок и я немного не понимаю английский
18th Mar 2019, 6:35 AM
Sardorbek Nematov