Hi all,
This is my first post ... so please forgive me if I'm asking this all wrong.
I am a work term student who just got introduced to coding with PHP. I am presently working on developing a basic electronic filing project.
On some of my webpages I have a "quit button" which when clicked on by the user should bring up a dialog box confirming that the user wants to quit that page. I know how to do this using Javascripts however my supervisor says to find a way to not use javascript because it is not supported by all browsers and some users disable it.
My question: Is it possible to create a dialog/alert box with just php codes? Or is it possible to still go ahead and use the Javascript while taking care of the above mentioned problems.
Thanks for your anticipated help.
how can i create a dialog box in php with javascipt disabled
Moderator: General Moderators
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
You can combine PHP and Javascript if you want, but using Javascript would be better. One thing with the Javascrip is that you can make the button print ONLY if the user has Javascript enabled by doing this:
Code: Select all
<script type="text/javascript">
document.write('<input type="button" value="Close Window" onclick="the javascript code's function();">')
</script>