0

Design a web page with textbox called name and button with label “enter”. When you click the button, another page should open

How to do that

14th Jan 2020, 9:01 AM
Bunny Choudhary
Bunny Choudhary - avatar
5 Answers
+ 1
Possible, but this another page, what did it should open?
14th Jan 2020, 9:27 AM
{P~A} Programmation Addict
{P~A} Programmation Addict - avatar
+ 1
Inside the form, you could use the method GET to recieve the value of the textbox in the link(for example, "https://www.example.com/display.html?textbox_value=something"). Once you do that, you'll need to parse the string and remove the first part of the link that is useless. To get the link, you can use window.location.search(but it needs to be parsed). Check out this Stack Overflow link for more information: https://stackoverflow.com/questions/14693758/passing-form-data-to-another-html-page This would be easier with PHP, of course.
14th Jan 2020, 11:21 AM
Jianmin Chen
Jianmin Chen - avatar
0
What we write in text box it will be appear in another page with welcome
14th Jan 2020, 9:38 AM
Bunny Choudhary
Bunny Choudhary - avatar
0
First, of course, place the two form items on the web page. Once you do that, you can alter the onclick attribute of the button to run some function(for example, openLink()). This function should open the link in a new tab. One way to do this is using window.open: window.open("https://www.example.com", "_blank"); //first parameter is the link, second parameter is optional as it opens the link in a new tab Try it yourself first.
14th Jan 2020, 11:05 AM
Jianmin Chen
Jianmin Chen - avatar
0
I did that already it's open new tab but I need the same text i write on first page textbox appears on second page
14th Jan 2020, 11:13 AM
Bunny Choudhary
Bunny Choudhary - avatar