Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-08-2009, 07:49 AM Form Question
Junior Talker

Posts: 1
Name: Jadie Brown
Trades: 0
I would like users of my website to be able to request more information on a specific product. Each product as a unique code and a "more info" button/link next to it. I am not too sure how to go about it. As I understand it there are three steps here:

1. The user sees a product and wants more information. The user then clicks the "more info" button/link.

2. A popup opens with text (Please enter your details and we will get back to you), three form fields (name, telephone number, email) and an "okay" and a "cancel" button.

3. Upon clicking "okay" (obviously "cancel" will just close the window) the form is emailed to me with all the information as well as the product code as the subject.

The first step involves the link <a href="infoform.php?pc=A001> where pc is the product code. If this is correct this means that the next file to be accessed by the server will be infoform.php. Should that be the file that opens in the popup? Or should I rather link to infoform.html (which will open in the popup) and then when the user presses "okay", only then will the php script - infoform.php - run (sending the mail with the info and the product code).
If this is right then how do I communicate the value of pc through the process? Won't it get lost during infoform.html?
jadiebrown is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-08-2009, 09:21 AM Re: Form Question
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
I think the best method for doing this will be JavaScript (not PHP).

Essentially though:
http://javascript.internet.com/gener...up-window.html < To generate the javascript popup...though most browsers block popups.

http://www.codeave.com/JavaScript/code.asp?u_log=7014 < How to close a window with javascript.

As I pointed out above, popups are mostly blocked, if you can look into a more ajax based solution.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE

Last edited by rogem002; 04-08-2009 at 09:23 AM..
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 04-08-2009, 09:32 AM Re: Form Question
Novice Talker

Posts: 7
Trades: 0
If you want a very smooth approach to do this without having to reload the page and making you pages more efficient then I would recommend using PHP and AJAX. This will also give it more of a sleek look.
ryandanielt is offline
Reply With Quote
View Public Profile
 
Old 04-09-2009, 09:39 AM Re: Form Question
Average Talker

Posts: 28
Name: TJ Phippen
Trades: 0
Quote:
Originally Posted by ryandanielt View Post
If you want a very smooth approach to do this without having to reload the page and making you pages more efficient then I would recommend using PHP and AJAX. This will also give it more of a sleek look.
Agreed. I'd suggest "more info" to populate the form with ajax.
__________________
| | TJ PHIPPEN | |
Please login or register to view this content. Registration is FREE

| Definition Redefining Speed, Quality & Satisfaction!
| Call Me: (435) 225-6121 | Email Me:
Please login or register to view this content. Registration is FREE
siforek is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Form Question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25181 seconds with 12 queries