php-general Digest 23 Jul 2010 18:29:09 -0000 Issue 6861
Topics (messages 307109 through 307119):
Re: opening link in new window
307109 by: Shreyas Agasthya
307110 by: Peter Lind
Retaining scroll position after asynchronous refresh
307111 by: Larry Martell
307113 by: Hans Ã
hlin
307117 by: tedd
Re: php array in different OS
307112 by: Colin Guthrie
Tutte le soluzioni per recuperare un RAID
307114 by: RDNewsLetter
Re: Retaining scroll position after asynchronous refresh NOT PHP
307115 by: tedd
307116 by: Daniel P. Brown
307118 by: Nathan Nobbe
SOAP ERROR - Encoding
307119 by: Augusto Flavio
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 ---
I am not sure how PHP can help here. I am sure there must be a way out.
With JavaScript, it s certainly possible. You can try window.open() to make
this happen. It can accept a lot of parameters and a google search should
give you a lot of answers.
--Shreyas
On Fri, Jul 23, 2010 at 10:58 AM, David Mehler <[email protected]>wrote:
> Hello,
> I've got a page with an external link. I'd like to open it in a new
> window, but i'm using the xhtml 1.0 strict dtd so this isn't possible.
> I was wondering if php could pull this off? Failing that, and not
> really wanting to go there, would javascript work for this?
> Thanks.
> Dave.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Regards,
Shreyas Agasthya
--- End Message ---
--- Begin Message ---
On 23 July 2010 12:23, Shreyas Agasthya <[email protected]> wrote:
> I am not sure how PHP can help here. I am sure there must be a way out.
>
> With JavaScript, it s certainly possible. You can try window.open() to make
> this happen. It can accept a lot of parameters and a google search should
> give you a lot of answers.
>
> --Shreyas
PHP is serverside so no, it can't help here. When using xhtml strict,
your only option is to use JS for opening links in new windows.
Regards
Peter
--
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>
--- End Message ---
--- Begin Message ---
Hello all-
I have a php script that generates a web page with a bunch of
scrollable frames, and then asynchronously refreshes the page. If the
user has scrolled down in any of the frames, when the refresh occurs
it has scrolled back to the top of all the frames. Is there a way I
can retain the scroll position so after the refresh the frames are
shown at the same location as before the refresh? I have googled and
googled for this, but everything I find is ASP or C# or Java. My stuff
is straight php/html. How can I do this with that?
TIA!
-larry
--- End Message ---
--- Begin Message ---
I't was a long time ago when i programed in js but the first thin that pops
up in my mind is that there is a function where you can read and set the
values of the scrollbars.
I found this when I googled it:
http://www.eggheadcafe.com/community/aspnet/3/10002280/scroll-positions.aspx
<http://www.eggheadcafe.com/community/aspnet/3/10002280/scroll-positions.aspx>
http://www.daniweb.com/forums/thread60189.html
**********************************************
Hans Åhlin
Tel: +46761488019
icq: 275232967
http://www.kronan-net.com/
irc://irc.freenode.net:6667 - TheCoin
**********************************************
2010/7/23 Larry Martell <[email protected]>
> Hello all-
>
> I have a php script that generates a web page with a bunch of
> scrollable frames, and then asynchronously refreshes the page. If the
> user has scrolled down in any of the frames, when the refresh occurs
> it has scrolled back to the top of all the frames. Is there a way I
> can retain the scroll position so after the refresh the frames are
> shown at the same location as before the refresh? I have googled and
> googled for this, but everything I find is ASP or C# or Java. My stuff
> is straight php/html. How can I do this with that?
>
> TIA!
> -larry
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
At 6:31 AM -0600 7/23/10, Larry Martell wrote:
Hello all-
I have a php script that generates a web page with a bunch of
scrollable frames, and then asynchronously refreshes the page. If the
user has scrolled down in any of the frames, when the refresh occurs
it has scrolled back to the top of all the frames. Is there a way I
can retain the scroll position so after the refresh the frames are
shown at the same location as before the refresh? I have googled and
googled for this, but everything I find is ASP or C# or Java. My stuff
is straight php/html. How can I do this with that?
TIA!
-larry
I forgot, this *is* Friday (as Daniel reminded me) -- so everyone
here's the code I provided to Larry.
-larry:
This is a problem that can be solved via javascript. The process is
that you create a cookie containing the scroll position value before
the operation (whatever that may be) and then you restore the page
back to where it was after the operation.
The following is the javascript code I wrote several years ago -- it
works for me.
Cheers,
tedd
--- javascript ---
addLoadListener(init);
function init()
{
window.onscroll = function()
{
var scrollpos = getScrollingPosition();
document.title = 'left=' + scrollpos[0] + ' top=' + scrollpos[1];
//-- create a cookie named scrollPosition and put the vertical
scroll amount in the value
var cookieName = "scrollPosition";
var cookieValue = scrollpos[1];
var theCookie = cookieName + "=" + cookieValue;
document.cookie = theCookie;
};
return true;
}
function getScrollingPosition()
{
var position = [0, 0];
if (typeof window.pageYOffset != 'undefined')
{
position = [
window.pageXOffset,
window.pageYOffset
];
}
else if (typeof document.documentElement.scrollTop != 'undefined'
&& (document.documentElement.scrollTop > 0 ||
document.documentElement.scrollLeft > 0))
{
position = [
document.documentElement.scrollLeft,
document.documentElement.scrollTop
];
}
else if (typeof document.body.scrollTop != 'undefined')
{
position = [
document.body.scrollLeft,
document.body.scrollTop
];
}
return position;
}
function addLoadListener(fn)
{
if (typeof window.addEventListener != 'undefined')
{
window.addEventListener('load', fn, false);
}
else if (typeof document.addEventListener != 'undefined')
{
document.addEventListener('load', fn, false);
}
else if (typeof window.attachEvent != 'undefined')
{
window.attachEvent('onload', fn);
}
else
{
var oldfn = window.onload;
if (typeof window.onload != 'function')
{
window.onload = fn;
}
else
{
window.onload = function()
{
oldfn();
fn();
};
}
}
}
function getCookie(searchName)
{
var cookies = document.cookie.split(";");
for (var i = 0; i < cookies.length; i++)
{
var cookieCrumbs = cookies[i].split("=");
var cookieName = cookieCrumbs[0];
var cookieValue = cookieCrumbs[1];
if (cookieName == searchName)
{
return cookieValue;
}
}
return false;
}
function myscroll()
{
// on load the cookie scrollPosition's value is read and scrolled to
var scrollValue = getCookie("scrollPosition");
window.scrollTo(0, scrollValue);
}
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
'Twas brillig, and fyang at 22/07/10 03:34 did gyre and gimble:
Dear Bob McConnell,
Thank you for your reply.
I really post the same message eight times because of the first e-mail
authentication.please remove the extra e-mail in your free time.
There are two servers ,the first installation of 32-bit linux(RHEL),the
second installlation 64-bit linux(CENTOS).
PHP version on 32-bit linux(RHEL):5.2.7
PHP version on 64-bit linux(CENTOS):5.2.13
I found this problem,because the software transplantation.In the 64-bit
systems,the array seems to always have limited capacity. I'm not sure that is
php version problem or need other configurations.
I suspect it's just different configuration.
That said, I've generally found that 64bit versions of PHP need more
memory than their 32bit equivs, so perhaps all you need to do is
something like:
ini_set('memory_limit', '50M');
and you'll be fine.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
--- End Message ---
--- Begin Message ---
Per venire incontro alle diverse esigenze del mercato è stata realizzata la
promozione EcoRAID, che include ispezione gratuita. Infatti se i files
vengono recuperati pagherete solo 600,00€ per ogni disco che compone il RAID
(mirror e spare inclusi).
E' proprio così se non recuperiamo nulla non si paga nulla, anche per un RAID.
( Percentuale di recuperi positivi sui RAID è di oltre il 90 % )
Per ulteriori informazioni contattaci:
- 800.031.677 (Italia)
- 091.68.20.545 (Svizzera)
Il servizio EcoRAID ha una durata limitata nel tempo, a discrezione della
direzione di RD data Rescue Sagl che ne comunicherà il termine con una
nuova comunicazione.
__________________________________________________________________________________________________
Cogliamo l'occasione per comunicare i nuovi costi di ispezione per i servizi
classici:
* Standard 80,00€ per ogni HD che compone il RAID
* Priorità 120,00€ per ogni HD che compone il RAID
* Emergenza 240,00€ per ogni HD che compone il RAID
__________________________________________________________________________________________________
Cambia la tua sottoscrizione (
http://lnx.rddatarescue.it/joomla/index.php?option=com_acajoom&Itemid=999&act=change&subscriber=88083&cle=7c921edaf253c451737bf94d12a5b3bc&listid=45
)
Cancellati (
http://lnx.rddatarescue.it/joomla/index.php?option=com_acajoom&Itemid=999&act=unsubscribe&subscriber=88083&cle=7c921edaf253c451737bf94d12a5b3bc&listid=45
)
Powered by Joobi ( http://www.ijoobi.com )
--- End Message ---
--- Begin Message ---
At 6:31 AM -0600 7/23/10, Larry Martell wrote:
Hello all-
I have a php script that generates a web page with a bunch of
scrollable frames, and then asynchronously refreshes the page. If the
user has scrolled down in any of the frames, when the refresh occurs
it has scrolled back to the top of all the frames. Is there a way I
can retain the scroll position so after the refresh the frames are
shown at the same location as before the refresh? I have googled and
googled for this, but everything I find is ASP or C# or Java. My stuff
is straight php/html. How can I do this with that?
TIA!
-larry
-larry:
This not really a PHP problem, but rather a javascript problem. After
all, the problem surfaces client-side, right?
So, to not offend this list with a non-PHP solution, I am sending you
the code privately.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
On Fri, Jul 23, 2010 at 12:09, tedd <[email protected]> wrote:
>
> This not really a PHP problem, but rather a javascript problem. After all,
> the problem surfaces client-side, right?
>
> So, to not offend this list with a non-PHP solution, I am sending you the
> code privately.
Well, it *is* Friday....
P.S. - Tedd, when you get a chance, call my cell phone really quick, please.
--
</Daniel P. Brown>
UNADVERTISED DEDICATED SERVER SPECIALS
SAME-DAY SETUP
Just ask me what we're offering today!
[email protected] || [email protected]
http://www.parasane.net/ || http://www.pilotpig.net/
--- End Message ---
--- Begin Message ---
On Fri, Jul 23, 2010 at 10:09 AM, tedd <[email protected]> wrote:
> At 6:31 AM -0600 7/23/10, Larry Martell wrote:
>
>> Hello all-
>>
>> I have a php script that generates a web page with a bunch of
>> scrollable frames, and then asynchronously refreshes the page. If the
>> user has scrolled down in any of the frames, when the refresh occurs
>> it has scrolled back to the top of all the frames. Is there a way I
>> can retain the scroll position so after the refresh the frames are
>> shown at the same location as before the refresh? I have googled and
>> googled for this, but everything I find is ASP or C# or Java. My stuff
>> is straight php/html. How can I do this with that?
>>
>
how are you doing the refresh? a location header or http meta tag? both of
those are gross imo - try ajax and i bet your problem goes away.
-nathan
--- End Message ---
--- Begin Message ---
Hi guys,
I created a simple wsdl web service. Everything works fine, but when I
fill the fields with accents and send the soap request, the PHP
returns me an error:
Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR:
Encoding: string 'ol\xe1...' is not a valid utf-8 string in
PATH\cilent.php 16 Stack trace: #0 [internal function]:
SoapClient->__call('Send', Array) #1 PATH\cilent.php(16):
SoapClient->Send(Array) #2 {main} thrown in PATH\cilent.php on line 16
I tested this same request using the eclipse web service explorer(It's
a java client web service inside the eclipse IDE) and the response was
ok.
I found few topics about this issue on the google. One related
solution to this problem is use the utf8_encode() function. I tried
add this function before to send the soap request but didnt worked.
I think that this problem is in the PHP soap client because using the
eclipse web service explorer it works fine.
Here is my php soap client:
$client = new SoapClient('http://app/webservice.wsdl');
$return = $client->Send(array('token' => '123123', 'message' => array(
'text' => 'This is a string with special characters á é í ó ú', 'dest'
=> 'John', 'sender' => 'Augusto')));
As I said I tried to use the utf8_encode() here:
$return = $client->Send(array('token' => '123123', 'message' => array(
'text' => utf8_encode('This is a string with special characters á é í
ó ú'), 'dest' => 'John', 'sender' => 'Augusto')));
But the problem still.
I tried also add the propertie defencoding in the soap server:
$server->soap_defencoding = 'UTF-8';
But still not working.
What I'm missing?
Thanks
Augusto Morais
--- End Message ---