HTML Form load Data |
HTML Form load Data |
Dayna |
Nov 10 2014, 04:01 PM
Post
#1
|
Group: Members Posts: 2 Joined: 10-November 14 Member No.: 21,793 |
I am making a Form and I was wondering if it was possible to make a Form Cell load data from a hyperlink from another site.
Like if I have Pearson 1456 and I have it as a URL Link I want the form to load "Pearson 1456" on a a form field named Description on the next page. Is this possible with html? Basically the same as an email link and adding a subject line to the link for when you click on it, it loads what you specify as the subject. Thanks, Dayna |
Christian J |
Nov 10 2014, 05:23 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Basically the same as an email link and adding a subject line to the link for when you click on it, it loads what you specify as the subject. That's called a URL's querystring, and is the part of an URL that follows an "?" character. Forms that use the GET method creates this automatically of the form fields' NAME/VALUE pairs. For example, this form: CODE <form method="get"> <input type="text" name="x" value="1"> <input type="text" name="y" value="2"> <input type="submit" value="Send"> </form> should result in the following querystring CODE x=1&y=2 (unless the user changes the text field values before submitting). You can also create an ordinary link with a querystring in it: CODE <a href="index.html?x=1&y=2">querystring example</a> (the "&" character must be written as an HTML entity in links, compare http://htmlhelp.com/tools/validator/problems.html.en#amp ). QUOTE Is this possible with html? You need a scripting language to access the querystring and write HTML. Client side javascript can be used, but a server side script like PHP is more reliable. Note that a user can create his own potentially malicious URL (or trick someone else to load it). For example, a URL might be used to inject HTML into the web page that rewrites it completely, so the script must be able to handle any kind of user input without undesired consequences. |
Dayna |
Nov 10 2014, 05:40 PM
Post
#3
|
Group: Members Posts: 2 Joined: 10-November 14 Member No.: 21,793 |
Thank you! That is a big help.
|
Lo-Fi Version | Time is now: 23rd April 2024 - 09:15 AM |