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
5 Respuestas
+ 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
+ 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>
+ 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")...
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
0
Thanks guys