473,328 Members | 1,385 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,328 software developers and data experts.

Auto-Fill Forms By Clicking On Link To Them?

23
I have a web page that has links to another web page containing a form. Is there any way to pass information to the form fields by clicking on the original link?


For example:

In the original web page, there is a link:
<a href="someurl.html">to_another_page_link</a>

Upon arriving at that page is it possible to have the fields (originally blank) already filled in with the information from the previous page?

(the stand alone form) <input type="text" name="vulntrackval" value="">

(after clicking on link from original page) <input type="text" name="vulntrackval" value="to_another_form_page_link">

Thanks!
Feb 5 '08 #1
4 3947
drhowarddrfine
7,435 Expert 4TB
Your server side program would need to fill those in before sending it back to the browser. It cannot be done using html alone.
Feb 5 '08 #2
alnoir
23
Alright then. That's one convenience they're going to have to do without. Thanks.
Feb 5 '08 #3
Alright then. That's one convenience they're going to have to do without. Thanks.
Not necessarily. Using Javascript its possible to retreive Get query variables using
Expand|Select|Wrap|Line Numbers
  1. function getQueryVariable(variable) {
  2.   var query = window.location.search.substring(1);
  3.   var vars = query.split("&");
  4.   for (var i=0;i<vars.length;i++) {
  5.     var pair = vars[i].split("=");
  6.     if (pair[0] == variable) {
  7.       return pair[1];
  8.     }
  9.   }
  10. }
  11.  
So for example if you had 2 textboxes on your page (page1.htm), as follows
[HTML]<input id="text1" />
<input id="text2" />[/HTML]

Then you could make your link page1.htm?text1=foo&text2=bar

Then all you need to do is call getQueryVariable('text1') and then for text2 and use javascript to populate your form.

By the way, i cant take credit for the javascript function, i found it at this site

Hope that helps
Feb 6 '08 #4
drhowarddrfine
7,435 Expert 4TB
No. You get the query data but then you click the link which gets sent to the server and that's the end of that. The server side software must still populate the next page.
Feb 6 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Manlio Perillo | last post by:
Hi. This post follows "does python have useless destructors". I'm not an expert, so I hope what I will write is meaningfull and clear. Actually in Python there is no possibility to write code...
1
by: Lew | last post by:
Hi all, I'm trying to create a page that has a user-selectable page auto-refresh option (IE 5.5). Essentially, it's a page that contains a checkbox, when the user checks the checkbox, I'd like...
5
by: Robert Downes | last post by:
I'm using the following in a page that I'm testing in Mozilla: p.actionLinkBlock {border: 1px #000000 dashed; padding: 0.2cm; width: auto} But the dashed border is extending to the right-edge...
20
by: Vijay Kumar R. Zanvar | last post by:
Hello, Unlike register, auto keyword can not be used to declare formal parameter(s). Is there any specific reason for this? Kind regards, Vijay Kumar R. Zanvar
6
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
5
by: Samuel | last post by:
Hi, I am running into a problem of mixing UICulture = auto and allowing users to select culture using a dropdown list. I am detecting a querystring, "setlang", and when found, setting the...
5
by: maya | last post by:
at work they decided to center divs thus: body {text-align:center} #content {width: 612px; text-align:left; margin: 0 auto 0 auto; } this works fine in IE & FF, EXCEPT in FF it doesn't work if...
22
by: nospam_news | last post by:
I currently get asked about my usage of "auto". What is it for? The keyword is clearly superflous here. In contrast to the huge majority of C/C++ developers I write definitions very explicitly...
2
by: Piotr K | last post by:
Hi, I've encountered a strange problem with Firefox which I don't have any idea how to resolve. To the point: I've <divelement with a style "height: auto" and I want to retrieve this value...
21
by: JOYCE | last post by:
Look the subject,that's my problem! I hope someone can help me, thanks
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.