473,511 Members | 15,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

alert function

Would somebody tell me how I use the onmouseover=alert('string') in a
PHP script without using of JavaScript?

With regards,
Nader
Mar 6 '07 #1
8 15038
On 2007-03-06 12-43-34, Nader Emami wrote:
Would somebody tell me how I use the onmouseover=alert('string') in a
PHP script without using of JavaScript?

With regards,
Nader
Not at all.

You could of course get the function handle of MessageBobA from <whatever
windows DLL>, if you load the win32_api PHP extension... But even in this
case you'd need a Windows server and you'd get a popup on the server, not
the client.

PHP itself, however, doesn't know popups. (Heck, it even doesn't know
frames or pages!)
Mar 6 '07 #2
Nader Emami wrote:
Would somebody tell me how I use the onmouseover=alert('string') in a
PHP script without using of JavaScript?

With regards,
Nader
You can't. PHP is server-side and has no idea what the user is doing on
the client end.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Mar 6 '07 #3
Simon Stienen wrote:
On 2007-03-06 12-43-34, Nader Emami wrote:
>Would somebody tell me how I use the onmouseover=alert('string') in a
PHP script without using of JavaScript?

With regards,
Nader

Not at all.

You could of course get the function handle of MessageBobA from <whatever
windows DLL>, if you load the win32_api PHP extension... But even in this
case you'd need a Windows server and you'd get a popup on the server, not
the client.

PHP itself, however, doesn't know popups. (Heck, it even doesn't know
frames or pages!)
I am working on a Linux machine. How can I use the JavaScript in this case?

Nader
Mar 6 '07 #4
On Mar 6, 10:12 pm, Nader Emami <e...@knmi.nlwrote:
Simon Stienen wrote:
On 2007-03-06 12-43-34, Nader Emami wrote:
Would somebody tell me how I use the onmouseover=alert('string') in a
PHP script without using of JavaScript?
With regards,
Nader
Not at all.
You could of course get the function handle of MessageBobA from <whatever
windows DLL>, if you load the win32_api PHP extension... But even in this
case you'd need a Windows server and you'd get a popup on the server, not
the client.
PHP itself, however, doesn't know popups. (Heck, it even doesn't know
frames or pages!)

I am working on a Linux machine. How can I use the JavaScript in this case?

Nader
JavaScript should still work on a Linux machine, given that your
browser supports it.

Mar 6 '07 #5
Nader Emami wrote:
Simon Stienen wrote:
>On 2007-03-06 12-43-34, Nader Emami wrote:
>>Would somebody tell me how I use the onmouseover=alert('string') in a
PHP script without using of JavaScript?

With regards,
Nader

Not at all.

You could of course get the function handle of MessageBobA from <whatever
windows DLL>, if you load the win32_api PHP extension... But even in this
case you'd need a Windows server and you'd get a popup on the server, not
the client.

PHP itself, however, doesn't know popups. (Heck, it even doesn't know
frames or pages!)

I am working on a Linux machine. How can I use the JavaScript in this
case?
Hi Nader,

As others said, you cannot use alert() and onMouseOver() on the server.
They are both JavaScript.
Javascript lives in the browser, not on the server. (Well, you CAN use
JavaScript as a serverside language, but that is seldom seen.)

So what you need is defining what you want in your HTML and simply let PHP
produce that.
Here is an example:

test.php
----------------------
<?php
// this is PHP, do whatever you want here
?>
<html>
<head>
<title>Javascripttest</title>
<script type="text/javascript">
function annoyVisitor(){
alert('Hi');
}
</script>
</head>
<body>
1+1=<?php echo (1+1); ?>
<br>
<span id="bla" onMouseOver="annoyVisitor();">Come over me</a>
</body>
</html>
----------------------

You see that PHP just produces the JavaScript needed.

Remember that PHP ONLY SENDS the html to the browser.
The receiving browser couldn't care less if the data received is from a
static HTML-page with Javascript in it, or comes from PHP.

If you want to know what the browser sees, just 'view source' in your
browser.

Regards,
Erwin Moller
>
Nader
Mar 6 '07 #6
I guess the more important (and commonly asked) questrion here, is
"What exactly are you trying to accomplish with this?"

Mar 6 '07 #7
new
In article <75***************************@news2.tudelft.nl> ,
em***@knmi.nl says...
>
Ah - holland. Interesting.
Mar 6 '07 #8
Rik
<ne*@age.nzwrote:
In article <75***************************@news2.tudelft.nl> ,
em***@knmi.nl says...
>>

Ah - holland. Interesting.
How so?

--
Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel
Mar 6 '07 #9

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

Similar topics

11
1835
by: F. Da Costa | last post by:
Hi, This is a strange issue I'v been staring at for half a day now. It concerns catching keys via the onkeydown handler. In IE5+ it works fine but in Moz 1.6 (& Firebird 0.7+) it behaves most...
15
3197
by: optimistx | last post by:
How to write a function f(x) or f('x') so that it produces the same output as a call to alert-function: var x='abc'; alert('x='+x); In testing one needs to write similar alert() calls...
1
2347
by: Sharon | last post by:
Hi! I have this function to add some parameters to my XSL and then retransform my XML with it, resulting in a neatly filtered table. It works great, but as soon as I take out the alert, it doesn't...
4
3987
by: hugo2 | last post by:
Most of these characters are not on the standard keyboard. Here's a successful contrivance, with comments & cautions, a little page that works in IE6. <HTML><HEAD><SCRIPT TYPE="text/javascript">...
11
4560
by: Alistair Saldanha | last post by:
I'm looking for the event that is fired by Internet Explorer to an "alert": <SCRIPT> Alert("You already have a session open") </SCRIPT> The event would be webBrowser.Document.???? Much...
6
3127
by: bonehead | last post by:
Greetings, I'm working on an e-mail form (btw many thanks to Philip Ronan for the very cool email address format tester function, best I've seen so far). I've been trying, with limited...
3
1663
by: sarah.ali1 | last post by:
I had an alert statement in my code for debugging purposes. However if I try to remove the line of code with the alert statement in it ( alert('message') ), I get an error in my code! Any ideas?
3
9619
by: umdsasha | last post by:
So, basically, I need to detect whether an alert window was thrown. I can't find where it's thrown from but I need to disable a button only if there were no alert windows thrown. Any ideas? ...
4
4009
by: joe | last post by:
Hi, I defined: <div id="abc"> </div> in my .html file, after an Ajax query my weberserver sends: <script language="JavaScript"> alert('Hello World!"); </script>
24
8179
by: Jeremy J Starcher | last post by:
While reading c.l.j, I've noticed that some people prefer and indeed even recommend the use of "window.alert()" over "alert()". I can't find any technical reason to make this distinction, and...
0
7427
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...
1
7085
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
7512
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
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.