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

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
Jul 17 '05 #1
3 26008
On Sat, 10 Jan 2004 00:10:39 +0000, Felix Rabinovich wrote:
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

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.net | forum.digiserv.net
Programming, Web design, development & hosting.

Jul 17 '05 #2
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" <fe***@rabinovich.org> napisal w wiadomosci
news:3q**************@newsread2.news.pas.earthlink .net...
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

Jul 17 '05 #3
Felix Rabinovich wrote:
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...


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 fefsensmrrjyaheeoceoq\! | tr "jefroq\!" "@obe.uk"
Jul 17 '05 #4

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

Similar topics

1
by: Ben Wan | last post by:
I got 2 error from the following code below... 1. I couldn't load up the picture since the picture is at (C:\company\image\largePic.jpg) 2. I got a page error in my 'index.html' when calling...
3
by: effendi | last post by:
I know this sounds like javascript menu and perhaps it is, but I have taken a look at menu codes and found it too difficult to revamp quickly. What I would like to do is a place a text is my...
1
by: Blue® | last post by:
The page below creates a popup message on the screen. It printed the popup box 30 pixels from the left: document.getElementById("dwindow").style.left="30px" How do I modify it so that the...
7
by: szabelin | last post by:
Hi I want to pop up a little window (sort of a message box), so I call MessageBoxA function during postback, and I get "error on page" icon. What's the way to popup a new window? Thanks! ...
6
by: tshad | last post by:
I am trying to set up a Javascript popup box that has a way of sending back a message to asp.net on how to process some data. At the moment I am just doing: ...
1
by: richardkreidl | last post by:
How to disable the security popup message from Outlook2003? I get the following message when a rule trys to fire off an executable script: A program is try to access data from Outlook that may...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
5
by: debbiedchang | last post by:
Hi, I have a custom user login authentication page. There are times when the login authentication succeeds, but before I redirect to the home page, I want to display a popup with a warning message...
4
by: jobs | last post by:
the javascript: function ShowTooltip(L1in) { document.getElementById("L1").innerText=L1in; y = event.clientY + document.documentElement.scrollTop; var Popup= document.getElementById("Popup")...
12
by: bnashenas1984 | last post by:
I have a page which opens a little popup to show recieved messages but when ever the page tries to open the popup the user should click on the yellow message on top of internet explorer and click on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.