php-windows Digest 5 May 2007 05:49:02 -0000 Issue 3217

Topics (messages 27805 through 27825):

automatic-click flash?
        27805 by: Gustav Wiberg
        27806 by: Stut
        27817 by: Bill Bolte
        27818 by: Gustav Wiberg

Re: Reload/refresh web page
        27807 by: Jody Williams
        27808 by: Alf Stockton
        27809 by: Jody Williams
        27810 by: Kevin Smith
        27811 by: Alf Stockton
        27812 by: Alf Stockton
        27813 by: Bill Bolte
        27814 by: Alf Stockton
        27815 by: Bill Bolte
        27816 by: Kevin Smith
        27819 by: Alf Stockton
        27820 by: Bill Bolte
        27821 by: Alf Stockton
        27822 by: Aleksandar Vojnovic
        27823 by: Bill Bolte
        27824 by: Bill Bolte

ListBox
        27825 by: sam rumaizan

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hi there!
 
I searched the Internet about "Click to activate this control"... Why it is 
viewd in IE...

"Q. Why do I see "Click to activate this control."?
Microsoft® changed the way ActiveX controls behave so Dynamic HTML (DHTML) 
events related to user interaction, such as onblur and onclick, are 
automatically blocked. To activate an interactive control, either click it or 
use the TAB key to set focus on it and then press the SPACEBAR or the ENTER 
key. Interactive controls loaded from external script files immediately respond 
to user interaction and do not need to be activated.
 
Basically, you now need to click the control to "approve" it before the Flash 
and navigation buttons will work."

and after this reading,... I've been thinking. 


Is it possible to make an automatic click in Javascript to an embedded 
flash-object?

 
 
/Gustav
 

--- End Message ---
--- Begin Message ---
Gustav Wiberg wrote:
Hi there!
I searched the Internet about "Click to activate this control"... Why it is viewd in IE...

"Q. Why do I see "Click to activate this control."?
Microsoft® changed the way ActiveX controls behave so Dynamic HTML (DHTML) 
events related to user interaction, such as onblur and onclick, are 
automatically blocked. To activate an interactive control, either click it or 
use the TAB key to set focus on it and then press the SPACEBAR or the ENTER 
key. Interactive controls loaded from external script files immediately respond 
to user interaction and do not need to be activated.
Basically, you now need to click the control to "approve" it before the Flash and navigation buttons will work."

and after this reading,... I've been thinking.

Is it possible to make an automatic click in Javascript to an embedded 
flash-object?

Keep searching, there are several solutions to this problem out there. And it's worth noting that it's not for security reasons, it's because they would be breaching a patent if it was automatically enabled.

-Stut

--- End Message ---
--- Begin Message ---
Here's what we do...

In the head of the html/php file(s):

<!--[if IE]>
<script type="text/javascript" src="flash_fix.js"
defer="defer"></script>
<![endif]-->

And in that JavaScript file goes:

var objects = document.getElementsByTagName("object");

for (var i=0; i<objects.length; i++)
    objects[i].outerHTML = objects[i].outerHTML;


There are other ways out there, some will validate better, if you need
(x)html validation. But those JavaScript methods result in an extremely
large JavaScript file/Section to be loaded. This is nice and short.

Bill

-----Original Message-----
From: Gustav Wiberg [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 4:06 AM
To: 'php windows' ([EMAIL PROTECTED])
Subject: [PHP-WIN] automatic-click flash?

Hi there!
 
I searched the Internet about "Click to activate this control"... Why it
is viewd in IE...

"Q. Why do I see "Click to activate this control."?
Microsoft(r) changed the way ActiveX controls behave so Dynamic HTML
(DHTML) events related to user interaction, such as onblur and onclick,
are automatically blocked. To activate an interactive control, either
click it or use the TAB key to set focus on it and then press the
SPACEBAR or the ENTER key. Interactive controls loaded from external
script files immediately respond to user interaction and do not need to
be activated.
 
Basically, you now need to click the control to "approve" it before the
Flash and navigation buttons will work."

and after this reading,... I've been thinking. 


Is it possible to make an automatic click in Javascript to an embedded
flash-object?

 
 
/Gustav
 

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

--- End Message ---
--- Begin Message ---
Hi there!

Thanx you all for your solutions!

/Gustav
 

-----Original Message-----
From: Bill Bolte [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 4:08 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] automatic-click flash?

Here's what we do...

In the head of the html/php file(s):

<!--[if IE]>
<script type="text/javascript" src="flash_fix.js"
defer="defer"></script>
<![endif]-->

And in that JavaScript file goes:

var objects = document.getElementsByTagName("object");

for (var i=0; i<objects.length; i++)
    objects[i].outerHTML = objects[i].outerHTML;


There are other ways out there, some will validate better, if you need
(x)html validation. But those JavaScript methods result in an extremely
large JavaScript file/Section to be loaded. This is nice and short.

Bill

-----Original Message-----
From: Gustav Wiberg [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 4:06 AM
To: 'php windows' ([EMAIL PROTECTED])
Subject: [PHP-WIN] automatic-click flash?

Hi there!
 
I searched the Internet about "Click to activate this control"... Why it
is viewd in IE...

"Q. Why do I see "Click to activate this control."?
Microsoft(r) changed the way ActiveX controls behave so Dynamic HTML
(DHTML) events related to user interaction, such as onblur and onclick,
are automatically blocked. To activate an interactive control, either
click it or use the TAB key to set focus on it and then press the
SPACEBAR or the ENTER key. Interactive controls loaded from external
script files immediately respond to user interaction and do not need to
be activated.
 
Basically, you now need to click the control to "approve" it before the
Flash and navigation buttons will work."

and after this reading,... I've been thinking. 


Is it possible to make an automatic click in Javascript to an embedded
flash-object?

 
 
/Gustav
 

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

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

--- End Message ---
--- Begin Message ---
what about using:
<meta http-equiv="refresh" content="600">

On 5/4/07, Alf Stockton <[EMAIL PROTECTED]> wrote:
I need to add some coding to a web page that forces a reload from the
server every time the page loads, no matter where the user came from.

I already have the following meta tags but that does not do what is
required.
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="Mon, 22 Jul 2000 11:12:01 GMT"

I also cannot use the full URL, as has been recommendedon the web, as
these pages could be at various of my users branches and they could well
have their own URLs.
ie No standard URL available.

My first thought was to add refresh within a onload but this would be
daft as one would end up in a permanent loop.

Please make suggestions.

--
Regards,
Alf Stockton            www.stockton.co.za

Cold hands, no gloves.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

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



--- End Message ---
--- Begin Message ---
Jody Williams wrote:
what about using:
<meta http-equiv="refresh" content="600">

That would refresh after 600 seconds. Not quite what I want. I want to refresh on reload but as I said in my original email:-
My first thought was to add refresh within a onload but this would be
daft as one would end up in a permanent loop.
but thank you for trying.

--
Regards,
Alf Stockton            www.stockton.co.za

Never commit yourself!  Let someone else commit you.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

--- End Message ---
--- Begin Message ---
I have seen references to using the "refresh" without the content.
could this be incorporated into an onload event?

On 5/4/07, Alf Stockton <[EMAIL PROTECTED]> wrote:
Jody Williams wrote:
> what about using:
> <meta http-equiv="refresh" content="600">
>
That would refresh after 600 seconds. Not quite what I want. I want to
refresh on reload but as I said in my original email:-
>> My first thought was to add refresh within a onload but this would be
>> daft as one would end up in a permanent loop.
but thank you for trying.

--
Regards,
Alf Stockton            www.stockton.co.za

Never commit yourself!  Let someone else commit you.
My email disclaimer is available at www.stockton.co.za/disclaimer.html


--- End Message ---
--- Begin Message ---
//  The argument to the location.reload function determines
//  if the browser should retrieve the document from the
//  web-server.  In this example all we need to do is cause
//  the JavaScript block in the document body to be
//  re-evaluated.  If we needed to pull the document from
//  the web-server again (such as where the document contents
//  change dynamically) we would pass the argument as 'true'.
//
<body onload="window.location.reload( false);">

Jody Williams wrote:
I have seen references to using the "refresh" without the content.
could this be incorporated into an onload event?

On 5/4/07, Alf Stockton <[EMAIL PROTECTED]> wrote:
Jody Williams wrote:
> what about using:
> <meta http-equiv="refresh" content="600">
>
That would refresh after 600 seconds. Not quite what I want. I want to
refresh on reload but as I said in my original email:-
>> My first thought was to add refresh within a onload but this would be
>> daft as one would end up in a permanent loop.
but thank you for trying.

--
Regards,
Alf Stockton            www.stockton.co.za

Never commit yourself!  Let someone else commit you.
My email disclaimer is available at www.stockton.co.za/disclaimer.html



--- End Message ---
--- Begin Message ---
Jody Williams wrote:
I have seen references to using the "refresh" without the content.
could this be incorporated into an onload event?

www.html-reference.com says that <meta http-equiv="refresh" :-
Indicates the document displays for a specified amount of time before switching to a new URL. The full absolute URL must be specified.

Therefore that is not on.>


--
Regards,
Alf Stockton            www.stockton.co.za

Always the dullness of the fool is the whetstone of the wits.
                -- William Shakespeare, "As You Like It"
My email disclaimer is available at www.stockton.co.za/disclaimer.html

--- End Message ---
--- Begin Message ---
Kevin Smith wrote:
//  The argument to the location.reload function determines
//  if the browser should retrieve the document from the
//  web-server.  In this example all we need to do is cause
//  the JavaScript block in the document body to be
//  re-evaluated.  If we needed to pull the document from
//  the web-server again (such as where the document contents
//  change dynamically) we would pass the argument as 'true'.
// <body onload="window.location.reload( false);">

Try that with true setting and you end up in the loop I spoke of in my original email and yes the page I want reloaded is dynamic and every time it displays I want it to be retrieved from the server, but how?

--
Regards,
Alf Stockton            www.stockton.co.za

Always the dullness of the fool is the whetstone of the wits.
                -- William Shakespeare, "As You Like It"
My email disclaimer is available at www.stockton.co.za/disclaimer.html

--- End Message ---
--- Begin Message ---
Can we ask why you need a reload every time? Maybe there's a better
approach?

But, if you need to reload the first time someone hit's a page, add a
querystring value to the url and track it. If the value isn't there (
if(!isset($_GET['reload'])){// do a reload} ), then do a header:
location call. Otherwise, it's the second time to the page, so let it
load...


-----Original Message-----
From: Alf Stockton [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 3:51 AM
To: php windows
Subject: [PHP-WIN] Reload/refresh web page

I need to add some coding to a web page that forces a reload from the 
server every time the page loads, no matter where the user came from.

I already have the following meta tags but that does not do what is 
required.
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="Mon, 22 Jul 2000 11:12:01 GMT"

I also cannot use the full URL, as has been recommendedon the web, as 
these pages could be at various of my users branches and they could well

have their own URLs.
ie No standard URL available.

My first thought was to add refresh within a onload but this would be 
daft as one would end up in a permanent loop.

Please make suggestions.

-- 
Regards,
Alf Stockton            www.stockton.co.za

Cold hands, no gloves.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

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

--- End Message ---
--- Begin Message ---
Bill Bolte wrote:
Can we ask why you need a reload every time? Maybe there's a better
approach?

The page I want reloaded is dynamic and every time it displays I want it to be retrieved from the server, but how? If you can make another suggestion I would be happy to hear it.

--
Regards,
Alf Stockton            www.stockton.co.za

Perfect day for scrubbing the floor and other exciting things.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

--- End Message ---
--- Begin Message ---
Why isn't it being retrieved the first time the page is called?

-----Original Message-----
From: Alf Stockton [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 9:03 AM
To: php windows
Subject: Re: [PHP-WIN] Reload/refresh web page

Bill Bolte wrote:
> Can we ask why you need a reload every time? Maybe there's a better
> approach?
> 
The page I want reloaded is dynamic and every time it displays I want it

to be retrieved from the server, but how? If you can make another 
suggestion I would be happy to hear it.

-- 
Regards,
Alf Stockton            www.stockton.co.za

Perfect day for scrubbing the floor and other exciting things.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

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

--- End Message ---
--- Begin Message --- I'll go with Bill's suggestion. Just track whether the page has already been loaded.

Bill Bolte wrote:
Can we ask why you need a reload every time? Maybe there's a better
approach?

But, if you need to reload the first time someone hit's a page, add a
querystring value to the url and track it. If the value isn't there (
if(!isset($_GET['reload'])){// do a reload} ), then do a header:
location call. Otherwise, it's the second time to the page, so let it
load...


-----Original Message-----
From: Alf Stockton [mailto:[EMAIL PROTECTED] Sent: Friday, May 04, 2007 3:51 AM
To: php windows
Subject: [PHP-WIN] Reload/refresh web page

I need to add some coding to a web page that forces a reload from the server every time the page loads, no matter where the user came from.

I already have the following meta tags but that does not do what is required.
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="Mon, 22 Jul 2000 11:12:01 GMT"

I also cannot use the full URL, as has been recommendedon the web, as these pages could be at various of my users branches and they could well

have their own URLs.
ie No standard URL available.

My first thought was to add refresh within a onload but this would be daft as one would end up in a permanent loop.

Please make suggestions.


--- End Message ---
--- Begin Message ---
Bill Bolte wrote:
Why isn't it being retrieved the first time the page is called?

It is but the page I need to reload is a dynamic page that may be used as a menu to call another php that would be used to update a database contents of which were displayed on the original page and on return to the dynamic page I want this new data to be included.

--
Regards,
Alf Stockton            www.stockton.co.za

Perfect day for scrubbing the floor and other exciting things.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

--- End Message ---
--- Begin Message ---
Aaah, so it's a caching issue then. Is that particular content using
PHP's caching mechanism or is it simply the browser's cache settings
mucking things up?

AJAX techniques run into the browser cache issue all the time (not that
your doing anything with AJAX here). One way to get around this is by
putting a random value in the querystring when calling a script by and
HTTP JavaScript call. Maybe by borrowing this concept and put a random
value in the querystring (that servers no purpose) will fool the browser
and load the new content.



-----Original Message-----
From: Alf Stockton [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 10:02 AM
To: php windows
Subject: Re: [PHP-WIN] Reload/refresh web page

Bill Bolte wrote:
> Why isn't it being retrieved the first time the page is called?
> 
It is but the page I need to reload is a dynamic page that may be used 
as a menu to call another php that would be used to update a database 
contents of which were displayed on the original page and on return to 
the dynamic page I want this new data to be included.

-- 
Regards,
Alf Stockton            www.stockton.co.za

Perfect day for scrubbing the floor and other exciting things.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

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

--- End Message ---
--- Begin Message ---
Bill Bolte wrote:
Aaah, so it's a caching issue then. Is that particular content using
PHP's caching mechanism or is it simply the browser's cache settings
mucking things up?

You are correct, it is the broser, and I have no control over which browser they are using or how that browser is configured.
>
AJAX techniques run into the browser cache issue all the time (not that
your doing anything with AJAX here). One way to get around this is by
putting a random value in the querystring when calling a script by and
HTTP JavaScript call. Maybe by borrowing this concept and put a random
value in the querystring (that servers no purpose) will fool the browser
and load the new content.

Please tell me more. An example would be good, if you could.


--
Regards,
Alf Stockton            www.stockton.co.za

You may be gone tomorrow, but that doesn't mean that you weren't here today.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

--- End Message ---
--- Begin Message --- If you are allready using ajax, then don't request the page with get paramater but using POST. The script you are calling must have headers set to expire immidiatly ala
<?php
header('Cache-Control: max-age=0, must-revalidate');
?>


Bill Bolte wrote:
Aaah, so it's a caching issue then. Is that particular content using
PHP's caching mechanism or is it simply the browser's cache settings
mucking things up?

AJAX techniques run into the browser cache issue all the time (not that
your doing anything with AJAX here). One way to get around this is by
putting a random value in the querystring when calling a script by and
HTTP JavaScript call. Maybe by borrowing this concept and put a random
value in the querystring (that servers no purpose) will fool the browser
and load the new content.



-----Original Message-----
From: Alf Stockton [mailto:[EMAIL PROTECTED] Sent: Friday, May 04, 2007 10:02 AM
To: php windows
Subject: Re: [PHP-WIN] Reload/refresh web page

Bill Bolte wrote:
Why isn't it being retrieved the first time the page is called?

It is but the page I need to reload is a dynamic page that may be used as a menu to call another php that would be used to update a database contents of which were displayed on the original page and on return to the dynamic page I want this new data to be included.


--- End Message ---
--- Begin Message ---
Do a search with AJAX CACHE ISSUE. There are tons of links and it seems
to be directed mostly at Internet Explorer.

At it simplest, when your user is getting sent back to the page to view,
make sure the URL has an extra value in the querystring (if you're
passing stuff back already) such as:
http://www.somesite.com/originalpage.php?random=nco8agoafnvpqfq4iu 

You can generate an random value pretty easily - don't have any code
right in front of me at the moment.



-----Original Message-----
From: Alf Stockton [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 10:21 AM
Cc: php windows
Subject: Re: [PHP-WIN] Reload/refresh web page

Bill Bolte wrote:
> Aaah, so it's a caching issue then. Is that particular content using
> PHP's caching mechanism or is it simply the browser's cache settings
> mucking things up?
> 
You are correct, it is the broser, and I have no control over which 
browser they are using or how that browser is configured.
 >
> AJAX techniques run into the browser cache issue all the time (not
that
> your doing anything with AJAX here). One way to get around this is by
> putting a random value in the querystring when calling a script by and
> HTTP JavaScript call. Maybe by borrowing this concept and put a random
> value in the querystring (that servers no purpose) will fool the
browser
> and load the new content.
> 
Please tell me more. An example would be good, if you could.


-- 
Regards,
Alf Stockton            www.stockton.co.za

You may be gone tomorrow, but that doesn't mean that you weren't here
today.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

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

--- End Message ---
--- Begin Message ---
 

________________________________

From: Juan Ignacio Borda [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 04, 2007 10:28 AM
To: Bill Bolte
Subject: Re: [PHP-WIN] Reload/refresh web page


ahhah i'm a cache administrator as well as php developer there is no
easy solution to avoid caching either in client or in proxys (because we
can twist rules to caching you up) but there are some headers you can
add to php pages that prevent pages to being cached

header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Expires: Mon, 19 Mar 1999 08:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");



        Aaah, so it's a caching issue then. Is that particular content
using
        PHP's caching mechanism or is it simply the browser's cache
settings
        mucking things up?
        
        AJAX techniques run into the browser cache issue all the time
(not that
        your doing anything with AJAX here). One way to get around this
is by
        putting a random value in the querystring when calling a script
by and
        HTTP JavaScript call. Maybe by borrowing this concept and put a
random
        value in the querystring (that servers no purpose) will fool the
browser
        and load the new content.
        
        
        
        -----Original Message-----
        From: Alf Stockton [mailto:[EMAIL PROTECTED] 
        Sent: Friday, May 04, 2007 10:02 AM
        To: php windows
        Subject: Re: [PHP-WIN] Reload/refresh web page
        
        Bill Bolte wrote:
          

                Why isn't it being retrieved the first time the page is
called?
                
                    

        It is but the page I need to reload is a dynamic page that may
be used 
        as a menu to call another php that would be used to update a
database 
        contents of which were displayed on the original page and on
return to 
        the dynamic page I want this new data to be included.
        
          


--- End Message ---
--- Begin Message ---
The code is fine. But I have one problem, when the ListBox display the data it 
gives me extra empty lines. How can I get rid of these lines?
   
  
   
  < -------- ListBox Code 
----------------------------------------------------------------------------------->
  echo"<table   border='1' cellspacing='1' cellpadding='3' bordercolor= 
'CDCB98'>";
  echo'<form name="myform" method="post" action="sfd.php">';
  $result = mysql_query('select * from lo_data');
  echo"<tr  bgcolor='CDCB98'>";
   echo "<td>" ;
  echo"<select NAME='Cat' onchange='resubmit()'>";
  echo"<option value='NULL'>Select Search Item</option>";
  $i=0;
  while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
     foreach ($line as $col) {
         $field=mysql_field_name($result,$i);
         $array[$field] = $col;
         echo"<OPTION value='$field'";
          echo ">$field</OPTION>";
         $i++;
     }
  }
  echo "</SELECT>";
   echo "</td>";
  echo "</form>";



 

 
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.

--- End Message ---

Reply via email to