Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Spyware and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Important Announcement: We have two terrific contests running on the site that I wanted all our members and guests to know about.

The first contest is the HP Magic Giveaway, which is underway as of November 28th. More information can be found at this topic, which will be updated very soon with further information.

The second contests, is for the chance to win two Seagate FreeAgent external hard drives. More information about this contest can be found here.

These are both amazing contests and I suggest everyone submit an entry for them.

- BleepingComputer Management
 
Reply to this topicStart new topic
> Carrying a value from one form to another
jax
post Sep 3 2004, 11:29 AM
Post #1


New Member
*

Group: Members
Posts: 11
Joined: 3-September 04
Member No.: 2,417



I'm hoping someone might be able to help me to find a way to carry a value entered in one html form to another page.

The idea is to form a progressive series of questions. Some may include identifying information so as to distinguish one respondent from another

Somewhere the user is asked to respond "Yes" or "No" to a certain question. When they submit that answer they go to another page which asks them a series of additional questions which will be different if they answered yes or no in the first place.

I want all the values from the questions answered up to the yes or not to be included in the new report I receive on the form input in the second form without the user having to enter those values again.

The idea for the need for this came when I was visiting a site dealing with cars. A form asked me to input the kind of car I drove from a drop down list, after I submitted that information I was taken to another page which asked me right off to input exactly the same information which I had just provided. What a way to tick off a user!

Is there a way to avoid this, especially if one is staying on the same site?

Jack
Go to the top of the page
 
+Quote Post
ColdinCbus
post Sep 3 2004, 02:57 PM
Post #2


Forum Regular
***

Group: HJT Team
Posts: 312
Joined: 30-June 04
Member No.: 1,120



The easiest way would probably be to use PHP and carry over the information through the URL to the next page unless you want to do a database or cookies.


--------------------
Go to the top of the page
 
+Quote Post
jax
post Sep 3 2004, 03:20 PM
Post #3


New Member
*

Group: Members
Posts: 11
Joined: 3-September 04
Member No.: 2,417



I don't know PHP, just HTML and a bit of Java. For the moment I can't use PHP on my server anyway.

Is there some way to do this Client Side? Your mention of cookies suggests it might be possible but I have no idea of how to implement it. If you have an idea could you give me a simple example of the code I'd use on the originating page and the second page where the value is to be picked up?

Thankx

Jack
Go to the top of the page
 
+Quote Post
ColdinCbus
post Sep 3 2004, 03:26 PM
Post #4


Forum Regular
***

Group: HJT Team
Posts: 312
Joined: 30-June 04
Member No.: 1,120



Humm, let me think about that. I guess you could build the page display client side using java but it would take some programing.

Are you able to use cgi ?

This post has been edited by ColdinCbus: Sep 3 2004, 03:31 PM


--------------------
Go to the top of the page
 
+Quote Post
JEservices
post Sep 3 2004, 05:17 PM
Post #5


helping hand
******

Group: Members
Posts: 1,700
Joined: 14-April 04
From: Texas
Member No.: 150



I have an idea on how to figure it out. I dont really know programming, but maybe this is a direction for you. Go to a site that works the way you want it to, right-click, and select view source. This will give you the HTML raw coding on it, in Notepad (by default). Scan though it to see how it is done.

A link for 20 questions is here. It is not exactly what you are looking for, but when you view source it, it does bring back an interesting result.


--------------------
We are all curious like a cat. We wonder, we ask, we learn.
Please post back when a suggestion works, so that others may learn.
Go to the top of the page
 
+Quote Post
JEservices
post Sep 3 2004, 06:38 PM
Post #6


helping hand
******

Group: Members
Posts: 1,700
Joined: 14-April 04
From: Texas
Member No.: 150



After re-reading your post, I think I misunderstood your question.

Are you looking for a way in HTML that someone can pick from a drop-down list, make a choice, and then make another choice from another list, that would only apply to the choice that was already made? Ok-it is a little hard to explain in words. How about a visual?

(choice 1) Ford Chevy or Geo
(choice 2) Door handles

Customer one picked Ford, and ONLY Ford door handles appear for a 2nd choice.
Customer two picked Chevy, and ONLY Chevy door handles appear for a 2nd choice.
Customer three picked Geo, and ONLY Geo door handles appear for the 2nd choice.

Is that what you are looking to do?


--------------------
We are all curious like a cat. We wonder, we ask, we learn.
Please post back when a suggestion works, so that others may learn.
Go to the top of the page
 
+Quote Post
jax
post Sep 4 2004, 12:05 PM
Post #7


New Member
*

Group: Members
Posts: 11
Joined: 3-September 04
Member No.: 2,417



Re Coldin's question. No, I can't use CGI for now

Jason, the 20 question site does pose some interesting things but I don't think it will help here.

What I had in mind is using one form which will pick up some values that were provided by the previous page visited and incorporate those values without any input from the user.

For example I have two pages which review product A and product B. I ask the user on that page " Have you personally used this product?" and the user answers
  • Yes or
  • No
and presses "submit"

Now he arrives at another page which will be different depending on whether the answer was YES or NO, on which I ask a series of further questions. However, the form which I receive from this second page will contain, in addition to whatever values are entered by the user, 1) the Name of Product A or B, and 2) the Yes or No which was enered in the first form.

Its important that the Name of Product A or B be picked up and filled in from the referring page so that this second form can be used by an unlimited number of referring pages rather than having to have a separate form for each one.

I hope this makes sense to you.

Jack
Go to the top of the page
 
+Quote Post
JEservices
post Sep 4 2004, 03:32 PM
Post #8


helping hand
******

Group: Members
Posts: 1,700
Joined: 14-April 04
From: Texas
Member No.: 150



OK. I think your response allowed me to see what you are wanting to do.

In reference to my example, when someone choses Ford, they are brought to a page that already has Ford on the page. When someone choses Chevy, it has Chevy as the default. When someone choses Geo, Geo is posted in a box.

If that result is what you are looking to do, then there are many different ways that you can do it. The most popular and efficient way would be to have individual forms, with each choice, as a seperate website. When a customer makes a choice (Ford, Chevy, or Geo), then it is really just finalizing the link that points to the one that was already written.

The coding for this, is easier with a program designed to handle HTML coding. I would recommend that you take a look at Dreamweaver MX. It does have a 30-day free, full-function trial. Even though the full version is well over $300, the knowledge gained from the trial would be invaluable. One thing about this program though, it can be quite overwhelming on how complex it is.

Once you become more experienced with using this, you could go two different ways to continue using this type of tool. You could Google for free web authoring tools, or apply a little known trick on how to 'extend' the time on time-trial based programs. I could help you out on the latter.


--------------------
We are all curious like a cat. We wonder, we ask, we learn.
Please post back when a suggestion works, so that others may learn.
Go to the top of the page
 
+Quote Post
jax
post Sep 6 2004, 07:43 AM
Post #9


New Member
*

Group: Members
Posts: 11
Joined: 3-September 04
Member No.: 2,417



Thankx Jason,

Actually I was hoping to have one page, one web page collect all the information regardless of weather the user entered Ford, Chevy oor Geo. but the form report I received would hae a space in it which contained the value "Ford", "Geo, or "Cheyy", depending on which page the user had come from.

I want to avoid having the user needing to fill in that value, because the question was asked on the earlier page and I can just imagine a user ranting "What's going on here, I just answered that question. Why do I have to answer again? If these nerds are so dense that I have to answer every question twice, I'm going to take my business elsewhere ...." mad.gif Which is exactly what >> I << did when it happened to me.



Besides, I feel it is more efficient use of computer resources to have just one form instead of 250 that are the same. When we just have Ford, Chevy oand Geo it's not so bad but you can extrapolate the use of resources when we have a situation where there might be hundreds or thousands of referring pages.

Jack
Go to the top of the page
 
+Quote Post
Grinler
post Sep 6 2004, 08:18 PM
Post #10


Bleep Bleep!
******

Group: Admin
Posts: 29,461
Joined: 24-January 04
From: USA
Member No.: 3



Really the only way to have information pass through between pages is to usea CGI script of some sort. It is rare for a hosting company to not offer any CGI scripts at all. Are you sure you are not able to?


--------------------
Lawrence
Go to the top of the page
 
+Quote Post
jax
post Sep 7 2004, 08:27 AM
Post #11


New Member
*

Group: Members
Posts: 11
Joined: 3-September 04
Member No.: 2,417



Yes, I'm certain that for the moment CGI scripts are not an option where I've got the pages where I'm wanting to carry values forward.

I know it's a limitation so I was looking for some kind of workaround.

Can a person write and read cookies using JavaScript? This might be a solution, but I'm not that up on JS to know how to code it.

Jack
Go to the top of the page
 
+Quote Post
Grinler
post Sep 7 2004, 12:25 PM
Post #12


Bleep Bleep!
******

Group: Admin
Posts: 29,461
Joined: 24-January 04
From: USA
Member No.: 3



Yes you can use cookies with javascript, but remember if the user has javascript disabled, your app will be broken.

Read this article:

http://www.devshed.com/c/a/JavaScript/Usin...ith-JavaScript/


--------------------
Lawrence
Go to the top of the page
 
+Quote Post
jax
post Sep 7 2004, 07:23 PM
Post #13


New Member
*

Group: Members
Posts: 11
Joined: 3-September 04
Member No.: 2,417



Thanks,

I think this may get me going to where I want to.

Jack
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 4th December 2008 - 12:52 PM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.