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

Popup dialog for PHP on Windows?

I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?

Thanks

-S
Jun 27 '08 #1
14 1700
On Fri, 06 Jun 2008 19:10:50 +0200, Sam H <sa******@gmail.comwrote:
I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app.
Only if they have PHP installed and they configured PHP files that way of
course...
Is there
some way in PHP to pop up a Windows messagebox?
Either php-gtk, or perhaps WinBinder.
--
Rik Wasmus
....spamrun finished
Jun 27 '08 #2
On Jun 6, 2:04 pm, "Rik Wasmus" <luiheidsgoe...@hotmail.comwrote:
On Fri, 06 Jun 2008 19:10:50 +0200, Sam H <samh1...@gmail.comwrote:
I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app.

Only if they have PHP installed and they configured PHP files that way of
course...
Is there
some way in PHP to pop up a Windows messagebox?

Either php-gtk, or perhaps WinBinder.
--
Rik Wasmus
...spamrun finished
Very cool, didn't know about WinBinder! Thanks!
Jun 27 '08 #3
On Fri, 06 Jun 2008 21:20:34 +0200, Sam H <sa******@gmail.comwrote:
On Jun 6, 2:04 pm, "Rik Wasmus" <luiheidsgoe...@hotmail.comwrote:
>On Fri, 06 Jun 2008 19:10:50 +0200, Sam H <samh1...@gmail.comwrote:
I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app.

Only if they have PHP installed and they configured PHP files that way
of
course...
Is there
some way in PHP to pop up a Windows messagebox?

Either php-gtk, or perhaps WinBinder.

Very cool, didn't know about WinBinder! Thanks!
Neither did I untill Timothy Madden mentioned it some 3 weeks ago, never
needed it, never used it :)
--
Rik Wasmus
....spamrun finished
Jun 27 '08 #4
Sam H wrote:
I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?

Thanks

-S
Not directly. You need the javascript 'alert' function probably.
Jun 27 '08 #5
On Fri, 06 Jun 2008 23:05:42 +0200, The Natural Philosopher <a@b.cwrote:
Sam H wrote:
>I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?
Thanks
-S
Not directly. You need the javascript 'alert' function probably.
How much trouble could it be integrating javascript in t CLI app....
Not impossible, just way overkill :P
--
Rik Wasmus
....spamrun finished
Jun 27 '08 #6
Rik Wasmus wrote:
On Fri, 06 Jun 2008 23:05:42 +0200, The Natural Philosopher <a@b.cwrote:
>Sam H wrote:
>>I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?
Thanks
-S
Not directly. You need the javascript 'alert' function probably.

How much trouble could it be integrating javascript in t CLI app....
Not impossible, just way overkill :P
And you'd have to have a browser to execute the javascript...

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jun 27 '08 #7
On Fri, 06 Jun 2008 23:31:04 +0200, Jerry Stuckle
<js*******@attglobal.netwrote:
Rik Wasmus wrote:
>On Fri, 06 Jun 2008 23:05:42 +0200, The Natural Philosopher <a@b.c>
wrote:
>>Sam H wrote:
I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?
Thanks
-S
Not directly. You need the javascript 'alert' function probably.
How much trouble could it be integrating javascript in t CLI app....
Not impossible, just way overkill :P

And you'd have to have a browser to execute the javascript...
Nope. Does make it easier of course. Without it, probably the most easy
route is to use Java & use rhino to make use of ecmascript. However,
without the context of a browser, of course there is no window.alert
method :). And when one is deploying Java in a CLI PHP app, one might
doubt the sanity of using PHP, possibly switching over to Java all
together (not a fan of Java though), or other languages with a more mature
& easy way to create GUI's.
--
Rik Wasmus
....spamrun finished
Jun 27 '08 #8
Rik Wasmus wrote:
On Fri, 06 Jun 2008 23:31:04 +0200, Jerry Stuckle
<js*******@attglobal.netwrote:
>Rik Wasmus wrote:
>>On Fri, 06 Jun 2008 23:05:42 +0200, The Natural Philosopher <a@b.c>
wrote:

Sam H wrote:
I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?
Thanks
-S
Not directly. You need the javascript 'alert' function probably.
How much trouble could it be integrating javascript in t CLI app....
Not impossible, just way overkill :P

And you'd have to have a browser to execute the javascript...

Nope. Does make it easier of course. Without it, probably the most easy
route is to use Java & use rhino to make use of ecmascript. However,
without the context of a browser, of course there is no window.alert
method :). And when one is deploying Java in a CLI PHP app, one might
doubt the sanity of using PHP, possibly switching over to Java all
together (not a fan of Java though), or other languages with a more
mature & easy way to create GUI's.
But Rik, you know Java <Javascript! :-)

I do agree with you that mixing Java and PHP is an unnecessarily
complication. Much better to do it in just Java.

Unlike you, I like Java. Sure, it's slower than many other languages,
but it has its place. And when working on a large system with pieces
(i.e. databases and other resources) scattered over multiple systems,
Java can have its advantages.

And no, Paul, this time I didn't mix "it's" and "its" :-)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jun 27 '08 #9
On Fri, 06 Jun 2008 23:53:23 +0200, Jerry Stuckle
<js*******@attglobal.netwrote:
Rik Wasmus wrote:
>On Fri, 06 Jun 2008 23:31:04 +0200, Jerry Stuckle
<js*******@attglobal.netwrote:
>>Rik Wasmus wrote:
On Fri, 06 Jun 2008 23:05:42 +0200, The Natural Philosopher <a@b.c>
wrote:

Sam H wrote:
>I'm writing scripts on Windows that are in PHP. Basically people
>will
>be double clicking the .php file which will run the CLI app. Is
>there
>some way in PHP to pop up a Windows messagebox?
> Thanks
> -S
Not directly. You need the javascript 'alert' function probably.
How much trouble could it be integrating javascript in t CLI app....
Not impossible, just way overkill :P

And you'd have to have a browser to execute the javascript...
Nope. Does make it easier of course. Without it, probably the most
easy route is to use Java & use rhino to make use of ecmascript.
However, without the context of a browser, of course there is no
window.alert method :). And when one is deploying Java in a CLI PHP
app, one might doubt the sanity of using PHP, possibly switching over
to Java all together (not a fan of Java though), or other languages
with a more mature & easy way to create GUI's.

But Rik, you know Java <Javascript! :-)
Yes, but Rhino IN Java runs javascript (ecmascript).
http://developer.mozilla.org/en/docs..._documentation
I do agree with you that mixing Java and PHP is an unnecessarily
complication. Much better to do it in just Java.

Unlike you, I like Java. Sure, it's slower than many other languages,
but it has its place. And when working on a large system with pieces
(i.e. databases and other resources) scattered over multiple systems,
Java can have its advantages.
Hmm, there might be some cases it is easier / more maintainable to use
Java. However, for most uses, being hungry for resources (memory footprint
being the major one of them most of the time), and indeed the fact that
it's indeed slow leads me to other choices almost always.
And no, Paul, this time I didn't mix "it's" and "its" :-)
Ha, luckily, not being a native speaker, I seem to have been spared most
grammatical punishments :P
--
Rik Wasmus
....spamrun finished
Jun 27 '08 #10
Rik Wasmus wrote:
On Fri, 06 Jun 2008 23:53:23 +0200, Jerry Stuckle
<js*******@attglobal.netwrote:
>Rik Wasmus wrote:
>>On Fri, 06 Jun 2008 23:31:04 +0200, Jerry Stuckle
<js*******@attglobal.netwrote:

Rik Wasmus wrote:
On Fri, 06 Jun 2008 23:05:42 +0200, The Natural Philosopher <a@b.c>
wrote:
>
>Sam H wrote:
>>I'm writing scripts on Windows that are in PHP. Basically people
>>will
>>be double clicking the .php file which will run the CLI app. Is
>>there
>>some way in PHP to pop up a Windows messagebox?
>> Thanks
>> -S
>Not directly. You need the javascript 'alert' function probably.
How much trouble could it be integrating javascript in t CLI app....
Not impossible, just way overkill :P

And you'd have to have a browser to execute the javascript...
Nope. Does make it easier of course. Without it, probably the most
easy route is to use Java & use rhino to make use of ecmascript.
However, without the context of a browser, of course there is no
window.alert method :). And when one is deploying Java in a CLI PHP
app, one might doubt the sanity of using PHP, possibly switching over
to Java all together (not a fan of Java though), or other languages
with a more mature & easy way to create GUI's.

But Rik, you know Java <Javascript! :-)

Yes, but Rhino IN Java runs javascript (ecmascript).
http://developer.mozilla.org/en/docs..._documentation
Hmmm, interesting. I wasn't familiar with Rhino - but then if I'm doing
Java CLI stuff, I'm typically using the Java GUI, also.
>I do agree with you that mixing Java and PHP is an unnecessarily
complication. Much better to do it in just Java.

Unlike you, I like Java. Sure, it's slower than many other languages,
but it has its place. And when working on a large system with pieces
(i.e. databases and other resources) scattered over multiple systems,
Java can have its advantages.

Hmm, there might be some cases it is easier / more maintainable to use
Java. However, for most uses, being hungry for resources (memory
footprint being the major one of them most of the time), and indeed the
fact that it's indeed slow leads me to other choices almost always.
True, but the biggest advantage of Java is to offload some of the
processing onto other servers. For instance, sometimes it's just not
possible to do everything you want in just SQL - you need to do more,
such as processing data after you've fetched the rows (other than just
formatting for the display). This is pretty easy to offload onto
another server in Java with RMI. Not so easy with PHP. It's also often
easier to split pieces of a large project up and hand them to different
programmers in Java.

But as I said - I've found it more useful for large scale projects with
multiple servers - projects where you might have 10-100 programmers
working on it. Not the stuff most of us do here.
>And no, Paul, this time I didn't mix "it's" and "its" :-)

Ha, luckily, not being a native speaker, I seem to have been spared most
grammatical punishments :P
No, it's not because you're not a native speaker, Rik. It's because
your English is better than that of most Americans :-).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jun 27 '08 #11
Greetings, Sam H.
In reply to Your message dated Friday, June 6, 2008, 21:10:50,
I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?
If under "windows messagebox" you mean opensavedialogue, look at the
php_win32std PHP module (it can be in PECL package, check it yourself)

I've used that once for a tool that must pick a filename from user. It was
fast and dirty.

<?php

dl('php_win32std');
$res = win_browse_file(true, null, null, null, array('Text files (*.txt)' ='*.txt'));

print_r($res);

?>
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Jun 27 '08 #12
Rik Wasmus wrote:
On Fri, 06 Jun 2008 23:05:42 +0200, The Natural Philosopher <a@b.cwrote:
>Sam H wrote:
>>I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?
Thanks
-S
Not directly. You need the javascript 'alert' function probably.

How much trouble could it be integrating javascript in t CLI app....
Not impossible, just way overkill :P
Muy bad: I assumed he was using a broswer..
Jun 27 '08 #13
On Sat, 7 Jun 2008 07:38:41 +0400, AnrDaemon <an*******@freemail.ru>
wrote in <12***********************@freemail.ru>:
>Greetings, Sam H.
In reply to Your message dated Friday, June 6, 2008, 21:10:50,
>I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?

If under "windows messagebox" you mean opensavedialogue, look at the
php_win32std PHP module (it can be in PECL package, check it yourself)
"MessageBox" in windows refers to a particular type of dialog provided
by the OS. It's the sort that you see with a bit of text and then an
assortment of buttons (e.g. "OK" or "OK" and "Cancel"). It's not the
same thing that you were thinking, but I'd be surprised if it's not in
the same module.
--
Charles Calvert | Software Design/Development
Celtic Wolf, Inc. | Project Management
http://www.celticwolf.com/ | Technical Writing
(703) 580-0210 | Research
Jun 27 '08 #14
Greetings, Charles Calvert.
In reply to Your message dated Friday, June 27, 2008, 00:20:44,
>>I'm writing scripts on Windows that are in PHP. Basically people will
be double clicking the .php file which will run the CLI app. Is there
some way in PHP to pop up a Windows messagebox?

If under "windows messagebox" you mean opensavedialogue, look at the
php_win32std PHP module (it can be in PECL package, check it yourself)
"MessageBox" in windows refers to a particular type of dialog provided
by the OS. It's the sort that you see with a bit of text and then an
assortment of buttons (e.g. "OK" or "OK" and "Cancel"). It's not the
same thing that you were thinking, but I'd be surprised if it's not in
the same module.
I know what "messagebox" means in windows, for sure.
But people sometimes tends to name things as they want, not as they named by
developers.
(And about your second part - same here (c), but I can't find module
documentation right now, I have restricted access to internet ATM)
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Jun 29 '08 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: twinfire | last post by:
I have an mfc dialog application that sets a dll as a global keyboard hook. The dll looks for the correct key press, grabs the mouse coords and then sends a message back to the dialog app. I am...
4
by: Newbie | last post by:
Hello all~ I have got some questions about popup window, hope that someone can help me.. m(_ _)m~thx~ when a popup window appear, can I force users to focus on the popup window "ONLY" that...
2
by: Kevin Lam | last post by:
Hi all, I am writing an application which requires using a popup windows to edit the detail of a record. The popup windows is created by it's parent which shows the detail of the record,...
3
by: Phil | last post by:
Does anyone know if a modeless dialog box can be made to stay open when the parent window is closed? Maybe something to do with disabling the parent/owner? I basically need to have a popup...
0
by: ramendra | last post by:
Hello, I have a asp.net page which has a button and on selection of which i open a small size popup dialog. the dialog has few input parameters and a default button. when i click on the default...
2
by: steggun | last post by:
How To: Popup Confirmation Dialog & Redirect in LinkButton_OnClick Hello All, I have a ASP.NET 2.0 (C#) web form with a LinkButton control. In the server-side code for the LinkButton_OnClick...
3
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
3
by: ApexData | last post by:
I am using code from the following links to establish a Browse File and Browse Folder dialog. http://www.mvps.org/access/api/api0001.htm http://www.mvps.org/access/api/api0002.htm This code...
3
by: Mike Hofer | last post by:
Okay, here's the situation: we want to be able to display ASPX pages in an UpdatePanel. The reasons for this are performance related. The site in development uses *lots* of modal popups from some...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.