+ 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
14 Réponses
+ 6
It's possible to do spa here, but its hackable, since the whole html exposed on the client browser.
+ 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.
+ 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
+ 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.
+ 7
Morpheus Thanks... You are very helpful 😊.
+ 6
+ 5
Shashi Ranjan I want to do it in HTML by using action attribute of form element ...
+ 5
I understand. But sadly that's not possible here on SL.
+ 4
Calviղ please can you explain a little more I'm very interested to understand it
+ 4
The code of html page is fully exposed on any browser, someone could easily edit your html, to view the password protected page.
+ 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.
+ 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👍
+ 1
Nice
0
Я тут новичок и я немного не понимаю английский