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
Recent Queries:--
xml mailto subject autofill from field - 659.68 hr back. (1)
Similar Topics
Keywords : autofill, form, field
- Submitting A Form In Flex (follow Up Of Sm's Tut)
(2)
Design A Contact Form In Flex Part 3
(2) Design A Contact Form In Flex Part 3 Hopefully you have able to get a grasp on my first tutorials
on how to design a flex form and then be able to stylize it with CSS. So now on to set up your form
to validate and of course being able to reset your form as well., and before we get to the actual
coding I break down the tags that will be used in this tutorial and what their roles are. Of course,
since my newbieness really starts here I try my best to explain these tags. The first tag I will
cover for setting up the validation is the tag, and since I don't underst....
Design A Contact Form In Flex Part 2
(0) Design A Contact Form In Flex Part 2 I hope that you learn a little bit of the Flex format with my
first tutorial because that was the easy stuff until you get to the actual programming such as
ActionScript and any other languages. Of course, I think this is by far the easiest part of
designing forms or applications and that is using CSS. I will like to point out that CSS in Flex is
a enigma and I will tell you why, because CSS in flex acts like regular CSS in html however it is
very limited in what you can use and yet CSS in Flex is very complex because of how you ca....
About Posting Form
(2) Hi i had just register for free account and just think that why it is so important to post form for
free hosting....
Text Size In "fill-in" Form Blanks
How do you change the size of the text in the fill in form entry boxes (2) Thanks for all the help on my previous question about adding an address to a "Submit" button.
I've also been able to add a "print page" button through the help from group members. I now have
another question. I've created a form using the Input commands that ask for name, address,
state, etc. My computer is set to use 12 point text on a 800 x 600 screen resolution. When I hit the
print screen button, everything is printed out fine, but I would like the information that people
will be entering into the various boxes to be of a larger or bolder style. The whole re....
Design A Contact Form In Flex Part 1
(0) Design a Flex Form Part 1 Well this is my first tutorial on Adobe Flex 3 which is a great program
if you’re interested in designing applications for the web 2.0 era. Adobe flex is the way to
go as it combines several different programming languages in order to make the most out of this
program. This includes HTML, CSS, XML, PHP/MySQL, XML, ActionScript, Ruby on Rails and ASP and this
is all possible by the use of MXML or Magic eXtensible Markup Language because it is a user
interface markup language. My three part tutorials for this form include designing the f....
Perl For Automated Web Form Search
(1) Hi all, I'd like to write a script to automate a search in order to collect data from an online
database. The database is an archive of newspaper articles. The search is for certain words/text. It
is searchable via a form only. The rub is that only a small portion (a month) at a time is
searchable. I need to search every day for 50 years or so. Manually, this would take a considerable
amount of time. I'm thinking of using perl or ruby or something similar. I am an absolute
beginner with scripting and haven't done much formal learning in the subject since a ....
Vb 2008 Linking To Another Form..
(0) if i want to link another form will i use this code or there is easier one? code : form2.show or
hide : form2.hide is there another code to be used...? thanks....
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....
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 ....
Php Ftp Upload Form
Adding User Directory to PHP Upload Form - Help (1) 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....
What Is A Computer Form Factor
(1) As I began my hardware class in school I knew I was going to be learning some new stuff about a
computer that I never really thought about besides the fact I use one. Hopefully what I talk about
in this topic will help people get a better understanding of computer hardware, especially when
might want to build one by scratch. The form factor is used to determine what power supply,
computer cases and motherboards you can use when building a fully customized computer instead of
getting one pre-built; such as Dell, Apple, Sony, and Alienware. There are 6 form factors (in....
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?
(8) 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 (13) 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
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for autofill, form, field
*MORE FROM TRAP17.COM*
|
advertisement
|
|