Message Popup in PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Felix Rabinovich

    Message Popup in PHP

    is there a function in PHP to get a message popup on the web page? Couldn't
    find any (or missed it) in the docs; so I am now putting "echo <script>
    alert(whatever) </script>" whic feels really strange... there go to be a
    better solution...

    Thx
    Felix


  • Ian.H

    #2
    Re: Message Popup in PHP

    On Sat, 10 Jan 2004 00:10:39 +0000, Felix Rabinovich wrote:
    [color=blue]
    > is there a function in PHP to get a message popup on the web page?
    > Couldn't find any (or missed it) in the docs; so I am now putting "echo
    > <script> alert(whatever) </script>" whic feels really strange... there go
    > to be a better solution...
    >
    > Thx
    > Felix[/color]


    No.. PHP is server side what you're after is client side.. so JS (or
    some other client scripting) like you have is your only method =)



    Regards,

    Ian

    --
    Ian.H [Design & Development]
    digiServ Network - Web solutions
    www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
    Programming, Web design, development & hosting.

    Comment

    • Chung Leong

      #3
      Re: Message Popup in PHP

      There is no better solution. PHP is a server-side language after all. Things
      that appears on the client side must rely on a client-side language.

      Uzytkownik "Felix Rabinovich" <felix@rabinovi ch.org> napisal w wiadomosci
      news:3qHLb.934$ 1e.173@newsread 2.news.pas.eart hlink.net...[color=blue]
      > is there a function in PHP to get a message popup on the web page?[/color]
      Couldn't[color=blue]
      > find any (or missed it) in the docs; so I am now putting "echo <script>
      > alert(whatever) </script>" whic feels really strange... there go to be a
      > better solution...
      >
      > Thx
      > Felix
      >
      >[/color]


      Comment

      • Robert Downes

        #4
        Re: Message Popup in PHP

        Felix Rabinovich wrote:[color=blue]
        > is there a function in PHP to get a message popup on the web page? Couldn't
        > find any (or missed it) in the docs; so I am now putting "echo <script>
        > alert(whatever) </script>" whic feels really strange... there go to be a
        > better solution...[/color]

        The better solution is not to use pop-ups. Good web browsers do not
        allow JavaScript to open windows indirectly (i.e. without the user
        specifically clicking a JS link), so a lot of users will never see your
        lovingly crafted pop-up messages.

        Unless you're talking about warning dialogues, in which case, yeah -
        you'll have to just echo JS to the page.
        --
        Bob
        London, UK
        echo Mail fefsensmrrjyahe eoceoq\! | tr "jefroq\!" "@obe.uk"

        Comment

        Working...