Re: [PHP] Pop-up message

2005-03-09 Thread Jochem Maas
Lester Caine wrote:
At the risk of being shouted at because *I* know it's not a PHP problem!
I have a page that is being refreshed every 30 seconds or so, and 
displays a list of 'tickets' waiting to be dealt with on a list from a 
database query. No problems there, but a couple of sites now want me to 
add a pop-up warning when a ticket is added that has a staff ID matching 
the logged in user.

I can drive a sounder in the target browser, but need kicking in the 
right direction for a method of adding a pop-up window. Ideally it needs 
to be browser agnostic, which is where the problem comes given the 
pop-up blockers and other 'toys' that are being added to the browser end 
of things.

So can anybody point me in the right direction for a CURRENT method of 
achieving this, many of the bits I've found so far are somewhat 
antiquated, and fail in one way or another :(
I don't know about 'CURRENT' but you have atleast 3 options:
1. if its an intranet app then just tell them they have to add the intranet 
server
to a trusted zone (and that the browser should allow popups
2. dump your popup info in an absolutely positioned div and make the layer
visible on top of the rest of the page (with a js link that hides the layer 
again)
3. use a js alert(), which you might consider ugly... BUT its modal, its not 
blockable
(other than if js is turned off completely!) -- a user is therefore forced to 
read the
alert and click OK in order to continue.
if you want to do something that is triggered by page onload() then you can use 
this
function to add the handler to the document.onload event without breaking any 
other
js code (functions) which have already been 'attached' to the onload event:
function joinFunctions()
{
var newfunc = '';
for (var c = 0;c  arguments.length;c++) {
if ( arguments[c] ) {
var func=arguments[c].toString();
newfunc+=func.substr(func.indexOf({)-1);
}
}
return new Function(newfunc);
}
example:
window.onload = joinFunctions(
window.onload,
function() { alert('Hey User you have been assigned some new 
tickets!'); }
);


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Pop-up message

2005-03-09 Thread pmpa
I believe one could also embed a small flash object and call the window open
from flash.
I'm just not sure if IE popup blocker will also block that window.

Pedro.

-Mensagem original-
De: Jochem Maas [mailto:[EMAIL PROTECTED] 

I don't know about 'CURRENT' but you have atleast 3 options:
1. if its an intranet app then just tell them they have to add the intranet
server
to a trusted zone (and that the browser should allow popups
2. dump your popup info in an absolutely positioned div and make the layer
visible on top of the rest of the page (with a js link that hides the layer
again)
3. use a js alert(), which you might consider ugly... BUT its modal, its not
blockable
(other than if js is turned off completely!) -- a user is therefore forced
to read the
alert and click OK in order to continue.
( ... ) 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pop-up message

2005-03-07 Thread f00l
not knowing much about php myself but you could ask phpBB  about their 
private msgs. i cant recall whther it is a mod that pops the window up on 
receiving a msg or whether the user is online (probably configurable). But 
as far as direction, that is where i would be heading :)
Greg

Richard Lynch [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Lester Caine wrote:
 At the risk of being shouted at because *I* know it's not a PHP problem!

 Actually, it's a client problem :-)

 I have a page that is being refreshed every 30 seconds or so, and
 displays a list of 'tickets' waiting to be dealt with on a list from a
 database query. No problems there, but a couple of sites now want me to
 add a pop-up warning when a ticket is added that has a staff ID matching
 the logged in user.

 Your first task is to convince the client what an incredibly stupid idea
 this is.

 And that it won't work with all the popup blockers.

 And if it did work, it would just annoy the [bleep] out of their users.

 I know I'm preaching to the choir, here, but I have to go on record with
 this statement.

 I can drive a sounder in the target browser, but need kicking in the

 A sounder?  You mean like make my browser make noise?  ICK!!!

 right direction for a method of adding a pop-up window. Ideally it needs
 to be browser agnostic, which is where the problem comes given the
 pop-up blockers and other 'toys' that are being added to the browser end
 of things.

 You're not going to defeat the popup blockers in the long run.

 You are better off using clean simple code in an onLoad in your body tag
 to open the new window.  Something like:
 body onLoad=window.open(URL);
 where the URL loads in that user's recently added items.

 Either the users will accept the popup and whitelist it in their popup
 blocker, or they won't.

 And if a lot of them don't accept it, as they shouldn't, that tells you
 right there what a dumb idea this was. :-)

 But running around to find code to defeat the popup blockers will be a
 total waste of time -- and you'll end up with something so hacked and so
 un-maintainable that you'll have to fix it every six months, even if the
 popup blockers don't find workarounds to block your workarounds that popup
 the windows that they don't want popped up.

 So can anybody point me in the right direction for a CURRENT method of
 achieving this, many of the bits I've found so far are somewhat
 antiquated, and fail in one way or another :(

 Perhaps it would be better to segregate the tickets into those associated
 with the User logged in, and those that are not.

 Or to at least sort them that way, regardless of their other sorting 
 options.

 For that matter, don't even *BOTHER* to show me items that aren't mine,
 unless I specifically ask for them.

 Build a system that detects tickets that sit un-assigned for too long, and
 randomly assigns them, or, better yet, assigns them based on factors such
 as:
 Ticket features (IE, interface tickets to interface team members)
 Productivity (IE, don't assign as many tickets to your slow team members
 as your fast ones)
 User Status (IE, if I'm on vacation, don't assign me anything)
 .
 .
 .

 That way, no tickets is left sitting there too long but nobody has to
 deal with tickets that aren't assigned to them.

 Just an idea.

 In general, though, I only mean:

 Come back at the client with more than just That's a dumb idea (which it
 is)

 Come back with a Here's a MUCH better way to do this proposal.

 That's a dumb idea just gets you more headaches.

 A solution for a better solution makes you look real smart. :-)

 Yes, this may turn out to be a waste of your time, because the client is
 REALLY dead set on these popups, and you'll end up being miserable about
 them not taking your proposal as well...  Time to start looking for a new
 client. :-v

 -- 
 Like Music?
 http://l-i-e.com/artists.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pop-up message

2005-03-01 Thread Lester Caine
Richard Lynch wrote:
Lester Caine wrote:
At the risk of being shouted at because *I* know it's not a PHP problem!
Actually, it's a client problem :-)
Yep - but with so many different ways of doing it, which client method 
would be best ;)

I have a page that is being refreshed every 30 seconds or so, and
displays a list of 'tickets' waiting to be dealt with on a list from a
database query. No problems there, but a couple of sites now want me to
add a pop-up warning when a ticket is added that has a staff ID matching
the logged in user.
Your first task is to convince the client what an incredibly stupid idea
this is.
Actually it's not - which is part of the problem - these are all private 
networks and this is to replace 'reception' trying to phone the member 
of staff - who may already be on the phone - to tell them an appointment 
has arrived. So I just ant to 'queue' something on the their machine.

And that it won't work with all the popup blockers.
Have a handle on that, and the customer knows the problem, they are even 
willing to consider a switch to Firefox if that will help. Tabbed 
browsing with queue's on different tabs makes a lot of sense :)

And if it did work, it would just annoy the [bleep] out of their users.
I know I'm preaching to the choir, here, but I have to go on record with
this statement.
I know all the arguments, but hopefully you can see the problem - how do 
we tell the 'target' that there is someone waiting - and the clock is 
running on performance figures :(

I can drive a sounder in the target browser, but need kicking in the
A sounder?  You mean like make my browser make noise?  ICK!!!
Yep - and if they are on the phone they may not here it either.
right direction for a method of adding a pop-up window. Ideally it needs
to be browser agnostic, which is where the problem comes given the
pop-up blockers and other 'toys' that are being added to the browser end
of things.
You're not going to defeat the popup blockers in the long run.
As I said - we have control over machine configurations - to a certain 
extent, and if a user decides they want to be clever it's their 
performance figures that will be affected ;)

You are better off using clean simple code in an onLoad in your body tag
to open the new window.  Something like:
body onLoad=window.open(URL);
where the URL loads in that user's recently added items.
Either the users will accept the popup and whitelist it in their popup
blocker, or they won't.
That is probably where I am at, but I was looking to see if anybody had 
any other ideas for passing messages. Probably should have explained 
better what I was trying to do, but I often see 'Did you try so and so' 
which provides another avenue to look at.

And if a lot of them don't accept it, as they shouldn't, that tells you
right there what a dumb idea this was. :-)
But running around to find code to defeat the popup blockers will be a
total waste of time -- and you'll end up with something so hacked and so
un-maintainable that you'll have to fix it every six months, even if the
popup blockers don't find workarounds to block your workarounds that popup
the windows that they don't want popped up.
Already covered that, but there *IS* a need for a controlled way of 
passing messages from the server to the client ...

So can anybody point me in the right direction for a CURRENT method of
achieving this, many of the bits I've found so far are somewhat
antiquated, and fail in one way or another :(
Perhaps it would be better to segregate the tickets into those associated
with the User logged in, and those that are not.
Or to at least sort them that way, regardless of their other sorting options.
For that matter, don't even *BOTHER* to show me items that aren't mine,
unless I specifically ask for them.
Other people in a department need to be able to see who is waiting on a 
queue, only some callers are appointments, so a browser is left logged 
in with that queue selected so people can monitor things. As soon as an 
appointment is logged, the page changes to a staff ID specific page, and 
as long as it is visible in the background, it can be seen, but 'other 
systems' insist on being displayed full screen, which is what is being 
the pain. If (actually probably WHEN) we can get the applications that 
don't want to share to play nicely ...

Build a system that detects tickets that sit un-assigned for too long, and
randomly assigns them, or, better yet, assigns them based on factors such
as:
Ticket features (IE, interface tickets to interface team members)
Productivity (IE, don't assign as many tickets to your slow team members
as your fast ones)
User Status (IE, if I'm on vacation, don't assign me anything)
Already covered - we know the person is in the office - and that they 
are waiting for a caller - They COULD be advised by a telephone call 
(and in some offices I can actually dial the number via PHP), and in 
some offices the telephone system has a voice mail, but the 30-60 

Re: Re: [PHP] Pop-up message

2005-03-01 Thread hitek
Is there some reason you can't simply use a javascript alert on the page 
refresh?

if(isset($queue)){
   echo 
   script type=\text/javascript\
   !--
   alert(\$queue\);
   --
   /script;
}

 
 From: Lester Caine [EMAIL PROTECTED]
 Date: 2005/03/01 Tue AM 03:18:58 EST
 To: php-general@lists.php.net
 Subject: Re: [PHP] Pop-up message
 
 Richard Lynch wrote:
 
  Lester Caine wrote:
  
 At the risk of being shouted at because *I* know it's not a PHP problem!
  Actually, it's a client problem :-)
 Yep - but with so many different ways of doing it, which client method 
 would be best ;)
 
 I have a page that is being refreshed every 30 seconds or so, and
 displays a list of 'tickets' waiting to be dealt with on a list from a
 database query. No problems there, but a couple of sites now want me to
 add a pop-up warning when a ticket is added that has a staff ID matching
 the logged in user.
  
  Your first task is to convince the client what an incredibly stupid idea
  this is.
 Actually it's not - which is part of the problem - these are all private 
 networks and this is to replace 'reception' trying to phone the member 
 of staff - who may already be on the phone - to tell them an appointment 
 has arrived. So I just ant to 'queue' something on the their machine.
 
  And that it won't work with all the popup blockers.
 Have a handle on that, and the customer knows the problem, they are even 
 willing to consider a switch to Firefox if that will help. Tabbed 
 browsing with queue's on different tabs makes a lot of sense :)
 
  And if it did work, it would just annoy the [bleep] out of their users.
  
  I know I'm preaching to the choir, here, but I have to go on record with
  this statement.
 I know all the arguments, but hopefully you can see the problem - how do 
 we tell the 'target' that there is someone waiting - and the clock is 
 running on performance figures :(
 
 I can drive a sounder in the target browser, but need kicking in the
  
  A sounder?  You mean like make my browser make noise?  ICK!!!
 Yep - and if they are on the phone they may not here it either.
 
 right direction for a method of adding a pop-up window. Ideally it needs
 to be browser agnostic, which is where the problem comes given the
 pop-up blockers and other 'toys' that are being added to the browser end
 of things.
  
  You're not going to defeat the popup blockers in the long run.
 As I said - we have control over machine configurations - to a certain 
 extent, and if a user decides they want to be clever it's their 
 performance figures that will be affected ;)
 
  You are better off using clean simple code in an onLoad in your body tag
  to open the new window.  Something like:
  body onLoad=window.open(URL);
  where the URL loads in that user's recently added items.
  
  Either the users will accept the popup and whitelist it in their popup
  blocker, or they won't.
 That is probably where I am at, but I was looking to see if anybody had 
 any other ideas for passing messages. Probably should have explained 
 better what I was trying to do, but I often see 'Did you try so and so' 
 which provides another avenue to look at.
 
  And if a lot of them don't accept it, as they shouldn't, that tells you
  right there what a dumb idea this was. :-)
  
  But running around to find code to defeat the popup blockers will be a
  total waste of time -- and you'll end up with something so hacked and so
  un-maintainable that you'll have to fix it every six months, even if the
  popup blockers don't find workarounds to block your workarounds that popup
  the windows that they don't want popped up.
 Already covered that, but there *IS* a need for a controlled way of 
 passing messages from the server to the client ...
 
 So can anybody point me in the right direction for a CURRENT method of
 achieving this, many of the bits I've found so far are somewhat
 antiquated, and fail in one way or another :(
  
  Perhaps it would be better to segregate the tickets into those associated
  with the User logged in, and those that are not.
  
  Or to at least sort them that way, regardless of their other sorting 
  options.
  
  For that matter, don't even *BOTHER* to show me items that aren't mine,
  unless I specifically ask for them.
 Other people in a department need to be able to see who is waiting on a 
 queue, only some callers are appointments, so a browser is left logged 
 in with that queue selected so people can monitor things. As soon as an 
 appointment is logged, the page changes to a staff ID specific page, and 
 as long as it is visible in the background, it can be seen, but 'other 
 systems' insist on being displayed full screen, which is what is being 
 the pain. If (actually probably WHEN) we can get the applications that 
 don't want to share to play nicely ...
 
  Build a system that detects tickets that sit un-assigned for too long, and
  randomly assigns them, or, better yet, assigns them based on factors such
  as:
  Ticket

[PHP] Pop-up message

2005-02-28 Thread Lester Caine
At the risk of being shouted at because *I* know it's not a PHP problem!
I have a page that is being refreshed every 30 seconds or so, and 
displays a list of 'tickets' waiting to be dealt with on a list from a 
database query. No problems there, but a couple of sites now want me to 
add a pop-up warning when a ticket is added that has a staff ID matching 
the logged in user.

I can drive a sounder in the target browser, but need kicking in the 
right direction for a method of adding a pop-up window. Ideally it needs 
to be browser agnostic, which is where the problem comes given the 
pop-up blockers and other 'toys' that are being added to the browser end 
of things.

So can anybody point me in the right direction for a CURRENT method of 
achieving this, many of the bits I've found so far are somewhat 
antiquated, and fail in one way or another :(

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Pop-up message

2005-02-28 Thread Richard Lynch
Lester Caine wrote:
 At the risk of being shouted at because *I* know it's not a PHP problem!

Actually, it's a client problem :-)

 I have a page that is being refreshed every 30 seconds or so, and
 displays a list of 'tickets' waiting to be dealt with on a list from a
 database query. No problems there, but a couple of sites now want me to
 add a pop-up warning when a ticket is added that has a staff ID matching
 the logged in user.

Your first task is to convince the client what an incredibly stupid idea
this is.

And that it won't work with all the popup blockers.

And if it did work, it would just annoy the [bleep] out of their users.

I know I'm preaching to the choir, here, but I have to go on record with
this statement.

 I can drive a sounder in the target browser, but need kicking in the

A sounder?  You mean like make my browser make noise?  ICK!!!

 right direction for a method of adding a pop-up window. Ideally it needs
 to be browser agnostic, which is where the problem comes given the
 pop-up blockers and other 'toys' that are being added to the browser end
 of things.

You're not going to defeat the popup blockers in the long run.

You are better off using clean simple code in an onLoad in your body tag
to open the new window.  Something like:
body onLoad=window.open(URL);
where the URL loads in that user's recently added items.

Either the users will accept the popup and whitelist it in their popup
blocker, or they won't.

And if a lot of them don't accept it, as they shouldn't, that tells you
right there what a dumb idea this was. :-)

But running around to find code to defeat the popup blockers will be a
total waste of time -- and you'll end up with something so hacked and so
un-maintainable that you'll have to fix it every six months, even if the
popup blockers don't find workarounds to block your workarounds that popup
the windows that they don't want popped up.

 So can anybody point me in the right direction for a CURRENT method of
 achieving this, many of the bits I've found so far are somewhat
 antiquated, and fail in one way or another :(

Perhaps it would be better to segregate the tickets into those associated
with the User logged in, and those that are not.

Or to at least sort them that way, regardless of their other sorting options.

For that matter, don't even *BOTHER* to show me items that aren't mine,
unless I specifically ask for them.

Build a system that detects tickets that sit un-assigned for too long, and
randomly assigns them, or, better yet, assigns them based on factors such
as:
Ticket features (IE, interface tickets to interface team members)
Productivity (IE, don't assign as many tickets to your slow team members
as your fast ones)
User Status (IE, if I'm on vacation, don't assign me anything)
.
.
.

That way, no tickets is left sitting there too long but nobody has to
deal with tickets that aren't assigned to them.

Just an idea.

In general, though, I only mean:

Come back at the client with more than just That's a dumb idea (which it
is)

Come back with a Here's a MUCH better way to do this proposal.

That's a dumb idea just gets you more headaches.

A solution for a better solution makes you look real smart. :-)

Yes, this may turn out to be a waste of your time, because the client is
REALLY dead set on these popups, and you'll end up being miserable about
them not taking your proposal as well...  Time to start looking for a new
client. :-v

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php