emperor
May 22 2005, 08:18 AM
| | I'd like to know if there's a way to "autofill" form fields. On a web page (that I call A), i have a form with two text fields called F1 and F2. I want that clicking on a link on another page (B, for example) the page A will open and the field F1 will contain, for example, "choice 1". While clicking on another link in the same page ( the field F1 will contain "choice 2". I hope that you have understand my explanation. |
Reply
Tyssen
May 22 2005, 08:50 AM
You can use $_SERVER['HTTP_REFERER'] to detect what page the user is on before arriving at the form then use an if else statement to print out a different value for each case e.g. CODE <input type="text" value=" <? php if ($something = $_SERVER['HTTP_REFERER']) { print "first message"; else print "second message"; } ?> ">
Reply
theRealSheep
May 25 2005, 03:09 PM
I'm sure ther would be a better way of doing this, but I have an answer for you using JavaScript. Your suggested ' Page B' would contain the following <script> tag, where "a.html" is the path to your suggested 'Page A'. CODE <script language="JavaScript1.2" type="text/javascript"> <!-- function NextPage(choice) { document.FormB.inputValue.value = choice; openWin = window.open("a.html", "Page_A", ""); } //--> </script> then, your 'links' on Page B would be buttons in a form, where the text you want entered on the next page is in the onClick event. eg. Input for Choice 1. HTML <form name="FormB"> <input type="hidden" name="inputValue" value=""> <p><input type="button" name="choice_1" value="This is 'Choice 1'" onClick="NextPage('Input for Choice 1')"> <p><input type="button" name="choice_2" value="This is 'Choice 2'" onClick="NextPage('Input for Choice 2')"> </form> Now over on ' Page A', place the following script, where F1 is the name of the input field (which is in the form named FormA, as shown below). CODE <script language="JavaScript1.2" type="text/javascript"> <!-- function fillField() { document.FormA.F1.value = window.opener.document.FormB.inputValue.value; } //--> </script>
... and then you will need to add an OnLoad event to the <body> tag of Page A to transfer the value HTML <body onLoad="fillField()"> <form name="FormA"> <p><input type="text" name="F1"> <p><input type="text" name="F2"> </form> </body>
I hope this helps and solves the idea that you are trying to explain.
Reply
Similar Topics
Keywords : autofill, form, field
- Vb 2008 Linking To Another Form..
(0)
Application Form [approved]
(2) PRESENT CREDITS : HOSTING CREDITS : 37.65 Forum Username : Dhruv Display Username: Dhruv Email
Address:dhruvin_patel@hotmail.co.uk My request is for: HOSTING PACKAGE 1 Your Registered Domain
Name or Desired Trap17 Subdomain Name: tutorial-linker.trap17.com Introduce Yourself: Your hobbies,
interests, talents, etc. Let the forum know you better. • My name is Dhruvin. Hobbies: Girls, gaming
and computers. I have no talents I'm just a all rounder can do everything if i like biggrin.gif
.Live in United Kingdom. And am a student. Desired Hosting Account Username: 8....
Mysql
Several files in one field. (2) Hi guys. I want t know if it is posible to have so many entries for one object in a field in MySQL.
I know my question may not be clear because I lack in terminology but pliz try and help. What I want
to do is for axample have a database of my clients with the following fields for every client:
fname, lname, more than one photos, contrubutions(comments, jokes, testimonials posted) etc. I want
to have the things like the photos in the same field but they have to be unique so that my php code
can deal with them individually llike they are coming from different fields.....
Gahhh This Isn't Going Well Please Help!
It's a forgot password form in php! (12) CODE <? // database connection details stored here include "database.php"; ?>
<!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head>
<title>Thanks!</title> </head> <body bgcolor="#ffffff"
text="#000000"> <? $email=mysql_real_escape_string($email);
$status = "OK"; $msg=""; //error_reporting(E_ERROR | E_PARSE |
E_CORE_ERROR); if (!stristr($email,"@") OR !stristr(....
Help With Form Actions.
(1) CODE <h1>Login</h1> <form action="" method="post">
<table align="left" border="0" cellspacing="0"
cellpadding="3">
<tr><td>Username:</td><td><input type="text"
name="user" maxlength="30"></td></tr>
<tr><td>Password:</td><td><input type="password"
name="pass" maxlength="30"></td></tr> <tr><td
colspan="2" ....
Registration Form?!
Password Issue??? (6) How can I build the registration form with some additional function which is illustrated by attached
file. When a user tries to type a password, that bar thing says neither it's strong nor weak, or
medium. Just take a look at attachment....
Html Form!
Using MySQL?! (4) Hey, I need your help again! I need some good working tutorial how I can update my SQL through
HTML form. I did use some tutorials online found with the help of google; but they do not work
properly; I mean there are still small mistakes. I need to have a good tutorial to follow. It
should be based on security and more things. It has to be done in proper way.......
How To Make Form Nested In Internet Explorer ?
Nested form in IE (2) I want to make a form nested in another form, it's run on Opera and FireFox but it's occur
error in IE How can I make form f2 submit by using javscript ??? (I want to solve this
problem because my website using Ajax upload....
Form Not Returning Correct Email Address
(5) I have just noticed another side effect of the recent server migration. On my web site I have a
comment form. After filling in the form the user gets a confirmation email and I get an email to
tell me someone filled in the form, and showing me the data that were filled in. First of all, I
got all emails twice, but I think I managed to fix that in the PHP code. What is worse, though, the
user still gets his/her confirmation and thank you email, but, instead of my email address, the
From: field now gives an aaddress on the server my account is on, ie. the gamma server. D....
The Value Specified For The Package Username Field Is Not Valid.
(2) QUOTE The value specified for the Package username field is not valid. What am i doing wrong?
what does this field have to include? I'm trying to set it as karlosantana Forgive me for being
dumn! thanks in advance karlos....
A Truly Smart Australia
Earth Hour is just a politcal field day that in reality does nothing. (2) Hi all, On Saturday, March 29, 2008 at 8pm (local time wherever you are) a lot of cities and
businesses around the world will turn ALL lights off for 1 hour. Aka all appliances will be turned
off, and the CBD's will be plunged into darkness (I think street lights will be kept on though).
* Aalborg * Aarhus * Adelaide * Atlanta * Bangkok * Brisbane *
Canberra * Chicago * Christchurch * Copenhagen * Dublin * Manila *
Melbourne * Montreal * Odense * Ottawa * Perth * Phoenix * ....
Xhtml Input Field Problem
(1) Hi, i use XHTML Strict and CSS, making one site. Here's some CSS code : CODE .LoginFromField
{ margin : 9px 3px 0 3px; width : 120px; height : 18px; float : left; color :
#666; background-image : url(./FormFieldDefaultBg.gif); background-repeat : repeat;
font-family : Verdana, Helvetica, sans-serif; font-size : 12px; border : 1px solid #aaa;
} XHTML code: CODE <?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "h....
Brand New Motherboard Form Factor Coming Out?
a new form factor standard could be upon us (2) So it looks like the ATX form factor is going to to be replaced. The new form factor is called the
BTX. BTX stands for Balanced Technology Extended. Newegg doesn't even carry them yet. The board
is completly square, which simplifies intallation to the case. The BTX has all slotted connections
(PCI, RAM, PCIe, etc.) aligned parallel to each other increasing airflow. Because eveything is
inline, the BTX form factor has the ability for multiple PC componants to share a single fan (cross
flow fans). All I know is I want it. On a side note, the 45nm Manufactoring Tech....
Updating Php File Through A Web Form
(5) Hello, i'm not sure if this can be done with php or not but what i need is a way to make an php
file that have an html form on it and it will take the info you put in to that form and write it to
an existing php file, for example: if i have the file news.php and the file news_update.php. if you
went to news_update.php you would get an form with a text area for you to write a new addition for
the news.php file and when you hit submit it will add what you typed in the form to the file
news.php. If this is going to be a big code or a hard one to make but some one think....
I Liked This Form Builder
It also uses Ajax (4) www.wufoo.com The form builder is unbelievably easy to use. I made a form in like 20 seconds. The
functionality is good ( though pros could probably make a better form that would suit them, this one
is good for newbies. ) All you have to do is drag and drop some modules and your form is ready.
Now for the cons : You are only allowed to make 3 forms and the limitation of 100 entries per form.
So technically this is not completely free, but it is good if you need a cool looking
form in a jiffy. Its ....
Controlling Differents Keypresses In A Single Form
(0) if there are more than 1 button in a form, how can i control each button by different key presses. i
tried accesskey, but in that we need to press alt+some key for the desired output. i want to control
the buttons with a single key press. how can i do that plz do help me. im working wid j2ee. i want
to create a web application....
Php Ftp Upload Form
Adding User Directory to PHP Upload Form - Help (0) Alright I am trying to have a PHP FTP Upload Form that allows the user to create the directory
folder for where they want to upload there files to. example: Main Directory: vainsoft.com There
directory: vainsoft.com/modeling or vainsoft.com/photography But I dont want them to be able to
upload things into the main directory, only sub-directories, is that possible with this coding that
I have: //uses $_FILES global array //see manual for older PHP version info //This
function will be used to get the extension from the filename function get_extension($fi....
Add A Javascript Feedback Form On Your Web Page
This is how to do it (6) So i was looking for a feedback form in javascript and i couldn't find one so ive made one for
you guys here we go! So this feedback form will ask for name, emails address and their comments
First of all add this code in between the and tags CODE <script
name="JavaScript"> <!-- function SendEmail() { var toaddy =
'name@domain.com'; var subject = 'JS Form Submission'; var mailer =
'mailto:' + toaddy + '?subject=' + subject + '&body=' +
'Name%20is\....
Best Way To Protect Html Form Fields
Looking for suggestions on how to protect form fields during user inpu (3) My working example is here http://sonesay.trap17.com/application.php The form submits to itself
and stores what ever the user inputs into session variables. Thats all fine and I have validation
checks for it, I wanted to add more and I remember comming across a site where they would lock from
fields to prevent any changes if the information was already supplied and validated. I'm looking
to build something similar but cant seem to figure out how to get that same effect at this time.
Heres my program logic so far application.php includes('application_content.....
Html Application Form
(6) does anyone know how to make a form/application that when you submit the form with the submit but it
sends it in a email to you email address if anyone on here knows please please let me know thanks, i
want this so i can have members apply for a team on my football site and there information will come
back to me and i can accept or reject them for that job....
Free Hosting Request Form [denied]
(1) PRESENT CREDITS : Forum Username : Black_d0s Display Username: madlinux Email Address:
register.madlinux@gmail.com My request is for: HOSTING PACKAGE 1 Your Registered Domain Name or
Desired Trap17 Subdomain Name: crew.trap17.com Introduce Yourself: Your hobbies, interests,
talents, etc. Let the forum know you better. • Hi, my name is Jesse. The website i want to start is
a community website like myspace or something of that sort . my intrests are running websites, i
also make my own programs i am good with c++,html,linux,unix,freebsd pretty much anything.my hobbi....
Free Hosting Request Form [denied]
(1) PRESENT CREDITS : Forum Username : Black_d0s Display Username: madlinux Email Address:
register.madlinux@gmail.com My request is for: HOSTING PACKAGE 1 Your Registered Domain Name or
Desired Trap17 Subdomain Name: crew.trap17.com Introduce Yourself: Your hobbies, interests,
talents, etc. Let the forum know you better. • Hi, my name is Jesse. The website i want to
start is a community website like myspace or something of that sort . my intrests are running
websites, i also make my own programs i am good with c++,html,linux,unix,freebsd pretty much
anything.m....
Problem With Java Script Popup Form
Doesnt work in Safari (1) This code wont work in Safari, but works fine in Firefox 2. Can someone help. The error pops up
however. It just doesn't do anything unless you dont pick one and then it says Pick a Windows
tweak, but if you DO pick one it doesnt even try to load anything. Everything you see below is
everything inside my PHP Include. If you would like to view my actual site it's
http://boozkerstweaks.trap17.com There might be PHP errors and stuff right now, but i am working on
those, but this i can not get. CODE <td valign="top" class="right">
....
PlayPump An Invention That Serves Humanitarian
by Trevor Field - Johannesburg, South Africa (6) I'm holding a fundraise this weekend for some device called the PlayPump. At first I had no idea
what this device did. This fundraise was just a part of my company's project and since it
involved humanitarian efforts, I simply thought, "hey I'm a nice guy I can do this..." Trevor
Field is an entrepreneur. He had an idea to invent something simple that can be effortless and be
useful at the same time (his previous company was an advertisement company). Now, enter inventing
company merging with Mr. Field's brilliant mind. And you have a device that does, i....
Have Diferences Of Performance Form Ps2 Full Console To Mini-ps2?
(7) Hi. Please if anybody test a mini-ps2. Have diferences of performance form PS2 full console to
mini-ps2? thanks.....
How To Make A Search Form And Php Code?
Can you help please? (10) I am looking to put a whole Bible on my site, don't worry about copyrights, I already have all
that. It will be put into my site book by book. My problem? I need a form that will only search
the /Bible part of my database. I need an html form, and then a php code that can be put into just
ONE file but that will display a search page afterward. If you could help me out here, I would
greatly appreciate it since I will need this in order for it to work. The goal is simple, have an
html form, that will lead to a search of my entire inneed.mxweb.co.uk/bible database....
Loop Through Form
How do you do it? (8) In ASP you'd do this: CODE For Each Field in Request.Form So how do you do it in PHP? I
want to loop through a form, check to see if it has a value and if so, append to a string to send as
the body of my email.....
Form To Php Mail. Attachment
(14) i know there are a few topics talk about attachment problem, but i want to know if anyone could show
me a basic code for attaching files like pictures with the message. I made a html form, and
redirect the information to my mail.php file to process the information and send it to my email. I
want to know what do i have to do to attach files like pictures. I tried to search on google, and
the codes are so complicated (i'm an amateur at this). Would it be possilbe if you could show me
the code and explain to me what it does and how i could customize it to fit my needs?....
*** Click Here To Get Your Free Hosting ***
Trap17 Free Web Hosting Request Form - FILL OUT THIS FORM (1) Welcome to Trap17 Free Web Hosting. Before you start, read the Trap17 Readme . NOTE:
Trap17 is not like other forums where you can still survive without reading stickies. If you
don't read the Trap17 sticky you will NOT UNDERSTAND how to get hosting. Please take a few
minutes to do that now. Some more info: A NOTE TO NEW MEMBERS (those who haven't yet
participated in our forums) Before you post an application, You must participate in our forum and
collect "Hosting Credits". You earn "Hosting Credits" when you make a post. You should make good
genui....
Free Windowsxp Sp2 Cd From Microsoft
just fill the request form and recive it (12) microsoft offer 100% free windows xp sp2. just go to this link
http://www.microsoft.com/windowsxp/downloa...us/default.mspx and fill your address they will send
you the cd to you. I just recive the cd yesterday. /biggrin.gif' border='0'
style='vertical-align:middle' alt='biggrin.gif' /> I see new feature like directx 9c , WMP9 ,
firewall , and the one I like is popup blocker! /wink.gif' border='0'
style='vertical-align:middle' alt='wink.gif' /> PS. waiting for the cd about 1-2 week if you
write an exact address.....
Looking for autofill, form, field
|
|
Searching Video's for autofill, form, field
|
advertisement
|
|