keoki123 Posted February 16, 2006 Share Posted February 16, 2006 i'm kind of new to the whole javascript thing....but how do i pass values to the next page when i click submit... Link to comment Share on other sites More sharing options...
smiles Posted February 16, 2006 Share Posted February 16, 2006 i'm kind of new to the whole javascript thing....but how do i pass values to the next page when i click submit... <{POST_SNAPBACK}> you can see this in all the examples of w3 you can do what you want by simple Html , javascript or more complex with Asp Link to comment Share on other sites More sharing options...
keoki123 Posted February 16, 2006 Author Share Posted February 16, 2006 phew i finally got it going however<script language="JavaScript"> function getParams() { var idx = document.URL.indexOf('?'); var params = new Array(); if (idx != -1) { var pairs = document.URL.substring(idx+1, document.URL.length).split('&'); for (var i=0; i<pairs.length; i++) { nameVal = pairs.split('='); params[nameVal[0]] = nameVal[1]; } } return params; } params = getParams();</script><table width="100%" height="160" border="0"> <tr> <td height="156" align = "center"> <script LANGUAGE="JavaScript"> name = unescape(params["name"]); position = unescape(params["position"]); mobile = unescape(params["mobile"]); document.write("Name = " + name + "<br>"); document.write("Position = " + position + "<br>"); document.write("Mobile = " + mobile + "<br>"); </script> </td> </tr></table>this code is suppose to show the values from the previous form... it works fine with firefox but in IE it says its undefined.......... Link to comment Share on other sites More sharing options...
scott100 Posted February 16, 2006 Share Posted February 16, 2006 i'm kind of new to the whole javascript thing....but how do i pass values to the next page when i click submit... <{POST_SNAPBACK}> 2 values are ok, any more and the javascript gets rather tricky, have a look at this site: http://www.htmlgoodies.com/beyond/javascri...cle.php/3471111If you have access to php, it's so much easier, that's what i would recommend Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now