CONFIRM DELETE BOX IN PHP PAGE in ONE LINE

This was really quite hard for me to get this working but today finally I made it. If you are having problem in creating a confirm delete box directly from php page without any extended java script here is the script for you. For this basically you need to merge the php and HTML and then it works perfectly fine. My Experience says that you php only for logic and more of HTML for display
Here is my code

<a href="javascript:if (confirm('SURE YOU WANNA DELETE?')){window.location.href='index.php?option=com_enggaccount&task=removepostcodefromregion&engg_id=&postcode_id=' } else { void('') }; ">Delete

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s