Re: [PHP] AJAX PHP
Hmm.. Works for me. Firefox 1.0.6 on gentoo. On 7/23/05, Brian V Bonini [EMAIL PROTECTED] wrote: On Thu, 2005-07-21 at 08:23, Marco Tabini wrote: We had a webcast on PHP and Ajax a while back--the recordings are still available for free at http://blogs.phparch.com/mt/index.php?p=49. Nice, totally crashes Firefox in Linux. -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825 at http://counter.li.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting paragraphs in to strings
Use the PHP str_replace function before writing it to the DB. Replace all \n characters with an empty string . http://us2.php.net/manual/en/function.str-replace.php On 6/13/05, Paul Nowosielski [EMAIL PROTECTED] wrote: Hi, I'm having a perplexing problem. I'm gather data through a textarea html from field and dumping it to MySQL. I want to display the data as a long string with no carriage returns or line breaks in a dhtml div window. The problem I'm have is that the form data is remembering the carriage returns. I tried using trim() and rtrim() with no luck. The data is still formatted exactly like it was inputed. Any ideas why this is happening and how I can format the text properly?? TIA! -- Paul Nowosielski Webmaster CelebrityAccess.com 303.440.0666 ext:219 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting paragraphs in to strings
Good point. Only problem is, if someone hit enter a-million times, you would end up with a-million spaces where the \n characters were. To take care of that repetition, maybe something like: while (strpos($textarea_text, \n\n)) { . } would be one way you could do it. On 6/13/05, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote: Use the PHP str_replace function before writing it to the DB. Replace all \n characters with an empty string . http://us2.php.net/manual/en/function.str-replace.php I think it might be better to replace all \n characters with spaces , otherwise you will end up with sentences that have no space break between them. Ie: original text This is the first sentence. This is the second sentence. /original text ...would become: replaced text This is the first sentence.This is the second sentence. /replaced text Regards, Murray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting paragraphs in to strings
Right.. But the browser also should be ignoring the carriage returns as well, which makes me think the div is set to white-space: pre; or something. He said the text is being formatted in a div exactly how it is entered into the system. By default, a div does not render any carriage returns. On 6/13/05, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote: Good point. Only problem is, if someone hit enter a-million times, you would end up with a-million spaces where the \n characters were. To take care of that repetition, maybe something like: while (strpos($textarea_text, \n\n)) { . } would be one way you could do it. Ordinarily most browsers render multiple consecutive spaces as a single space. This doesn't mean that it's not a good idea to remove them, just that not doing so shouldn't effect the way the text is displayed in the div tag, as the original poster mentioned was his intention. Regards, Murray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT ??: Form posting without leaving form
Check out the xmlhttp object in Javascript: http://jibbering.com/2002/4/httprequest.html On 6/13/05, Kall, Bruce A. [EMAIL PROTECTED] wrote: This is perhaps a javascript question Is there a way to post a form to a url without having a user submit from the form? I have a php web page that is a detailed form with a lot of fields. If the user does some work on this form and let's it sit, their session can time out (I had this happen to the user after it sat for 2 hours). Is there some way to have a timer in the page and have partial form results sent back to the server, but still leave the form on the screen as-is? In other words, I want to have the client periodically post the form data back to the server, but leave the same web page displayed. Thanks, Bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XSLT processor and xsl:param - expected behavior?
Question.. I'm using PHP 5.0.4 with the built-in libxslt-based xsl extension. I'm passing XSL parameters to the XSL processor like so: $xslt_proc-setParameter('', 'param_test', some test value); My question is, is it *required* to declare this parameter in the XSL stylesheet with: xsl:param name=param_test / What I have noticed is, the transformation is successful and works the same whether I declare the parameter using xsl:param or not. The following: xsl:value-of select=$param_test/ works fine without the xsl:param declaration, the xsl processor does not give an error, and the parameter is available for use in the stylesheet. Shouldn't the xsl:param declaration be required and cause a transformation error if it's missing? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php