473,397 Members | 1,960 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,397 software developers and data experts.

How to send options from a form?

LazyPrinzez
I'm fairly new to javascript and along with it, I'm using PHP for server-side scripting. It's really hard to put the problem into words, but here's the scenario:

In clicking a link, I want a confirmation box to pop-up. I know js's confirm() function does this, but I'm not sure about that really, because I want the confirmation box to display 3 buttons: a 'cancel' button, a 'yes' button and a 'no' button, where buttons 'yes' and 'no' should lead to two different links which will be provided via PHP (because the links are dynamic).

Before anything else, I'd just like to ask first if this is possible.
Secondly: can I do this in Javascript?
Third: If it's possible, and if I can do it in JS, then what function should I use?
Please also post any other opinions and notes regarding the matter. I'd love to learn more about it.
Jan 18 '12 #1

✓ answered by Dormilich

Before anything else, I'd just like to ask first if this is possible.
Secondly: can I do this in Javascript?
Third: If it's possible, and if I can do it in JS, then what function should I use?
1) yes
2) yes
3) there is no native JS function for that.

what you have to do is create a HTML form that acts like the modal window you desire. creating that is greatly improved by using jQuery and jQuery UI (or similar frameworks) which make this process relatively easy. cf. jQuery UI dialog.

2 1427
Dormilich
8,658 Expert Mod 8TB
Before anything else, I'd just like to ask first if this is possible.
Secondly: can I do this in Javascript?
Third: If it's possible, and if I can do it in JS, then what function should I use?
1) yes
2) yes
3) there is no native JS function for that.

what you have to do is create a HTML form that acts like the modal window you desire. creating that is greatly improved by using jQuery and jQuery UI (or similar frameworks) which make this process relatively easy. cf. jQuery UI dialog.
Jan 18 '12 #2
Thank you so much for this...and thank you for the precise answers... =)
Mar 8 '12 #3

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

Similar topics

1
by: ij | last post by:
Hi, I'm trying to submit an image object, along with some other text fields to another web server from within an ASP page but am stuck on getting the image to be submitted with the form. In a...
1
by: Bruce W.1 | last post by:
I'm new to ASP (but not ASP.NET) and I'm trying to setup a simple ASP web form to send an email to me. So I try this code: http://www.library.unr.edu/subjects/guides/mailplay.asp I upload the...
4
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the...
2
by: Eric Peterson | last post by:
I need to pop up the send email form from Outlook. I also need to populate the to field, but obviously the user will type the message and hit 'SEND'. How can I do this? I've been through...
3
by: m* | last post by:
Hi all... I would like to have an options form with my application that the user can set different settings. I have the form, now to save the information, is it best to save to a text file? Or...
0
by: nauticalmac | last post by:
I'm using CDO to send mail to the site owner from ASP pages with forms. Recently one of my forms is occasionally sending email with what seems to be an insertion which is replacing the plain text...
5
by: Dax | last post by:
Hi, how can Identify a domain user that send a form made with ASP. I have see that exist a variable called currentuser, but what does it mean? Thanks in advance, Dax
13
by: GoldenEagle | last post by:
hello, i want to know how to send a form data to a mail that form ,the user enters its data and when pressing submit it sends that data to a mail thanx.
7
TheMadMidget
by: TheMadMidget | last post by:
I am trying to send a form through PHP. I want it to act the same as a regular form with a post method. I have used cURL before to just send the information, but I am trying to make it follow it. I...
18
ak1dnar
by: ak1dnar | last post by:
Hi, I have created a web application that enables to Delete Items in a product table using check boxes. I Need to Display each and every product in <TR> and with the product there is a corresponding...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.