Passing value from one html to another html using post method [duplicate]

i want to pass two values(parameters) from one html to another html without displaying the values in url(i.e same like post method). How to get the value in 2nd html using javascript or ajax or jquery .

example :



<form id="Form1" action="http://xyz/plus/server.html" method="post">
<table width="40%">
    <tr><td>Country:</td><td><input type="text" name="country" id="country" />  </td></tr>
    <tr><td>Language:</td><td><input type="text" name="lang" id="lang" /></td></tr>
    <tr><td align="center"><input type="submit" /></td></tr>



<script>?? </script> 

how to get data in server.html file using javascript or ajax or jquery . plz help me.... Thanks in advance



if you would not like to pass values from URL, you can propabally use the javascript cookies to pass the values. or youy will be required to use ajax post method to pass requried values to next html here is the code for ajax post method call

type: "POST",
url: url,
data: data,
success: success,
dataType: dataType

Your question is not very much clear. but what i understood from your question is that you want something like below using jQuery

Write this in page1.html


To read the parameter in page2.html follow this


If you aren't using any scripting language than all you can do is use a container . Load new html's in a container say - iframe and save the data globally.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.