
Benjamin
Staff

Jul 23, 2003, 4:24 PM
Post #13 of 13
(12160 views)
Shortcut
|
Hey Brian, Sure. You'll need a little javascript to read the incoming query string value and insert it into the input box. The following isn't exactly the best bit of code ever written, but it should work okay. I tested it here, and it works fine. First: open up your _signup.html template, and add this in between your <head> and </head tags: <script> function getQueryValue(varName) { var queryString = window.location.search.substring(1); var valuePairs = queryString.split("&"); for (i=0; i<valuePairs.length; i++) { var pair = valuePairs.split("="); if (pair[0] == varName) { return pair[1]; } } } </script> Next, change the login name table row to this: <tr> <td><font size=2 face="ms sans serif">Login Name</font></td> <script> if (getQueryValue('login_id')) { document.write("<td><input type=text name='login_id' value='" + getQueryValue('login_id') + "' size=30></td>"); } else { document.write("<td><input type=text name='login_id' value='$login_id_he$' size=30></td>"); } </script> </tr> And that should do it. Note: there will be problems if the login name contains a single quote. Ben interactivetools.com
(This post was edited by Benjamin on Jul 23, 2003, 4:25 PM)
|