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

I need to press a specific button which open a pop up form automatically

havealot
Hello guys , as said in the title , I'm working on a website as a developer using PHP , what I have now is a pop up review form , which appears when the user press a button, the problem is I'm validating it using PHP and when you press on the submit the validation occurs server side as you know and when it loads the page again you have you will find the form is gone , and you have to press that button again to see the result of the validation
like: "please enter a valid email..", is there any way I could press that button automatically if isset($_POST) or something ?

I can provide you with a link of the website if it is allowed , just tell me if you need it.

I need help :\
thanks in advance
Aug 11 '15 #1
2 1373
Dormilich
8,658 Expert Mod 8TB
when you press on the submit the validation occurs server side as you know and when it loads the page again you have you will find the form is gone
when you’re doing the validation and you build up the response, you need to make sure the form is there (in the HTML), visible (via CSS), validated (showing any error messages). therefore PHP needs to fill in the received input data back into the form.

you also might have a look like frameworks (Symfony, Laravel, Zend) do their form handling.
Aug 12 '15 #2
you can use the jquery trigger for the same.
when the page reload with the error, you can check run that code as below :

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. if(isset($_SESSION['error'])
  3. {
  4. ?><script type="text/javascript">$( "#button_to_show_popup" ).trigger( "click" );</script><?php
  5. }
  6.  
  7. ?>
  8.  
Sep 2 '15 #3

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

Similar topics

4
by: Mr. T | last post by:
Hi, I need some help here. I have a On Exit procedure on that opens a form. Whenever anyone clicks anything outside of it the form opens. No problem here. But I need it not to open if the...
4
by: sara | last post by:
I am learning with a simple application/form. I am ok - enter customer name, list box of customers, select a customer, see the items for that customer. The items form has customer ID and Name...
0
by: Rainer Halanek | last post by:
Hi, I want to write an asp.net application, that fills out automatically some fields on a webpage (public one, not asp.net), press there a submit button and do some more stuff (like filling out...
4
by: piscogirl | last post by:
Hi all, Here's my case: I have a form: Event Form and a subform: AttendanceSubForm The user selects a name (from a Person Table) on the subform to register for the event. If the name is...
0
by: djoko | last post by:
Hi all, can you help me.... I have 2 form, exp. FORM A and FORM B i have a button on the FORM A, i hope when i press that button i can get FORM B and then i can insert data to table from FORM B....
3
by: David Lozzi | last post by:
Howdy, I'm using asp.net 2.0 and am trying to get one text box on the page, after the user presses enter, to "click" a specific button. I copied the javascript I used for a .net 1.1 web app I...
3
by: kev | last post by:
Hi folks, I have a form for registration (frmRegistration) whereby i have two buttons. One is Save which saves record using the OnClick property. I used wizard to create the save button. The...
1
by: schlow09 | last post by:
Hey everyone, hoping someone could lend me a hand here... I'm trying to create a button in a form that will automatically send an email with a report. However this report can vary depending on the...
3
by: Tony Pokkinen | last post by:
I have a form (Customers Line) with parameter value to find customers. How to make Access to open automatically customer detail form (Customers Sgl) if ONLY 1 record found?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.