0

New page solution

Hello guys ,like I have created a submit form,just want to know the code that I can use to create a new Pape after pressing submitting, because everything I created after my submit code it shows in this same page,and I would love it to open up a new page an let me created some code on that page

15th Apr 2020, 5:47 PM
Koketso Jane Motshabi
Koketso Jane Motshabi - avatar
5 Answers
+ 1
I assume that you're asking about doing this on sololearn because of your tag(It seems to be a code bit) You can't do it on sololearn like how it happens in real websites. There are two methods for doing this: 1- Use javascript to change document code and rewrite it 2- Link submit button to another code on sololearn I don't know if you can use PHP for this. But it I guess it will be something like first solution
15th Apr 2020, 8:07 PM
ΛM!N
ΛM!N - avatar
+ 1
For example with action with your link, looks like: <form name="myForm" action="http://www.yourpage.com" method="post"> Name: <input type="text" name="fname"> <input type="submit" value="Submit"> </form>
15th Apr 2020, 8:08 PM
JaScript
JaScript - avatar
+ 1
As suggested by ΛM!N, inside sololearn, the two only ways to achieve a new page load are: + use of a php single file project (it handle both the template for the form page, and the template for the submitted data (by this way, you could also handle more than two pages) + simulate it with js and dynamical DOM update to hide and showonly sub-parts of the page, according to the "page" you want to show ("load")...
15th Apr 2020, 11:57 PM
visph
visph - avatar
0
Honestly I don't know if I explained this properly,it's like I have seen alot of other people's coding did it,and tried checking on them which method they used but nothing makes sense,like let me say I am done with the first page,like maybe answering something, I would love another page to open up, instead it is blank
15th Apr 2020, 10:19 PM
Koketso Jane Motshabi
Koketso Jane Motshabi - avatar
0
Thanks guys
16th Apr 2020, 10:19 AM
Koketso Jane Motshabi
Koketso Jane Motshabi - avatar