Hi Friends,
As the subject states,i am relatively new with php thou not with other languages.I have a php code,that has a button,which when clicked makes up a email from some templates and database and sends the email automatically to the user.But what i need is to review the email before it sends it to the user.Like some kind of pop-up with the whole email message in it.I am not postin the code because it's too big,I just need a start...some tutorials or examples or code.....plz help me.
Thanking you in advance
NewBie-needs some help with pop-ups
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Since you don't state a specific question I'll talk a bit about how it's typically constructed.
You use Javascript to create a pop-up through the window.open() method. The page you request should be passed whatever details are needed to fill in the appropriate parts of the email for composition. One the resultant page, you display the source that'd normally be sent to the mail() function along with a button to actually send it and cancel the email (typically both will close the pop-up and update the opening page)
You use Javascript to create a pop-up through the window.open() method. The page you request should be passed whatever details are needed to fill in the appropriate parts of the email for composition. One the resultant page, you display the source that'd normally be sent to the mail() function along with a button to actually send it and cancel the email (typically both will close the pop-up and update the opening page)
Thanks feyd,
Thts wat exactly i am tryin to do.I went thru some j.s tutorials and i think window.open() will server my purpose.Just needed to ask you one thing here,the window.open takes a url as a parameter,but i've a method which makes my email.Is there a way by which i can call my method instead of the url and its shows the contents that the method returs..plz help
Thts wat exactly i am tryin to do.I went thru some j.s tutorials and i think window.open() will server my purpose.Just needed to ask you one thing here,the window.open takes a url as a parameter,but i've a method which makes my email.Is there a way by which i can call my method instead of the url and its shows the contents that the method returs..plz help
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
depending on how your pages are built, you can simply make a new script that uses the method as a display, or you can adjust the calling page's code such that sending a specific url variable causes it to display a simplified interface and such.
Overall, I'd suggest against using a pop-up (personally). Instead I'd just display the email in-page through the means I just described (mostly)
Overall, I'd suggest against using a pop-up (personally). Instead I'd just display the email in-page through the means I just described (mostly)