php-general Digest 2 Jan 2009 21:14:02 -0000 Issue 5879

Topics (messages 285368 through 285374):

Re: IE Problem Detecting Post Variables
        285368 by: L. Herbert
        285369 by: zerof
        285370 by: ceo.l-i-e.com
        285371 by: Micah Gersten

Re: Sending files via POST
        285372 by: Anders Norrbring
        285373 by: Daniel Brown

Re: Anyone else have trouble with Apple Mail threading this list?
        285374 by: phphelp -- kbk

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 stand corrected.

On Jan 1, 2009, at 9:46 AM, Nisse Engström wrote:

On Thu, 1 Jan 2009 03:17:01 -0500, "L. Herbert" wrote:

On Dec 31, 2008, at 11:07 PM, Lupus Michaelis wrote:

MSIE pushes input_name.x and input_name.y to the server, when the
input is an image.

Thanks! I see the issue clearly now. Oh well, time to modify my code
to compensate for IE's non-standard behavior...

Actually, that *is* standard behaviour.

<http://www.w3.org/TR/html401/interact/forms.html#h-17.4.1>


/Nisse

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



--- End Message ---
--- Begin Message ---
L. Herbert escreveu:
Bastien,

Thanks for your response. The curious thing is that the value is passed when using FF, but not passed when using IE.

Here is the relevant form html:

                <div id="switch-theme">
                    <form action="" method="post">

It may seem strange, but try using "POST" instead of "post".

(I had this same problem when my server was upgraded to Apache 2.2.10)

                        <label>Flip It!</label>
<input name="style" type="image" src="images/switch-button-grey.gif" title="Default Theme" id="style1" value="default" /> <input name="style" type="image" src="himages/switch-button-default.gif" title="Alternate Theme" id="style2" value="alternate" />
                    </form>
                </div>

.....................................

--
zerof
http://www.educar.pro.br/
Apache - PHP - MySQL - Boolean Logics - Project Management
----------------------------------------------------------
http://www.geoticks.com/
Geo Positioning Solutions
----------------------------------------------------------

--- End Message ---
--- Begin Message ---
My thesis is:



Your Javascript that intercepts the .submit and then does whatever it does, is 
"broken" in FF but not in MSIE.



Post your JS to a JS mailing list and ask there to be sure.



--- End Message ---
--- Begin Message ---
You might want to consider the button element which allows you to
display images, but doesn't send back coordinates.  Instead it sends a
preset value.
http://www.w3.org/TR/html401/interact/forms.html#h-17.5

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



L. Herbert wrote:
> I find the html/php option simpler and more "accessible".  I've got it
> working now.  I only needed to use unique input names and test for the
> posted variable according to w3c standards.
>
> Here is the relevant w3c definition:
>
> "When a pointing device is used to click on the image, the form is
> submitted and the click coordinates passed to the server. The x value
> is measured in pixels from the left of the image, and the y value in
> pixels from the top of the image. The submitted data includes
> name.x=x-value and name.y=y-value where "name" is the value of the
> name attribute, and x-value and y-value are the x and y coordinate
> values, respectively."
>
> PHP modifies the posted variable name to name_x, name_y to comply with
> PHP's variable naming convention requirements.
>
> Thanks to those all responded for pointing me in the right direction.
>
> On Jan 1, 2009, at 11:25 AM, Phpster wrote:
>
>> What about using the onclick to set a js variable to be sent to the
>> server? That should be more cross server compliant.
>>
>> Bastien
>>
>> Sent from my iPod
>>
>> On Dec 31, 2008, at 8:37 PM, "L. Herbert" <[email protected]>
>> wrote:
>>
>>> Bastien,
>>>
>>> Thanks for your response.  The curious thing is that the value is
>>> passed when using FF, but not passed when using IE.
>>>
>>> Here is the relevant form html:
>>>
>>>               <div id="switch-theme">
>>>                   <form action="" method="post">
>>>                       <label>Flip It!</label>
>>>                       <input name="style" type="image"
>>> src="images/switch-button-grey.gif" title="Default Theme"
>>> id="style1" value="default" />
>>>                       <input name="style" type="image"
>>> src="himages/switch-button-default.gif" title="Alternate Theme"
>>> id="style2" value="alternate" />
>>>                   </form>
>>>               </div>
>>>
>>> The action attribute is left blank so the form posts to the current
>>> page.  The theme switcher script is at the top of each page and
>>> intercepts the posted variables.
>>>
>>> Any thoughts?
>>>
>>>
>>> On Dec 31, 2008, at 11:02 AM, Phpster wrote:
>>>
>>>> Try checking to see if the value was passed with var_dump($_REQUEST)
>>>>
>>>> Also try (!empty($_REQUEST['style']))
>>>>
>>>>
>>>> Bastien
>>>>
>>>> Sent from my iPod
>>>>
>>>> On Dec 31, 2008, at 10:24 AM, "L. Herbert"
>>>> <[email protected]> wrote:
>>>>
>>>>> Hello all,
>>>>>
>>>>> Anyone have insight to share on the following issue:
>>>>>
>>>>> I have a simple theme switcher script that functions as expected
>>>>> in FF, Safari, etc. but does not work in IE 6 or 7.  It appears
>>>>> that the posted form variables are not detected in IE.   I am
>>>>> using the following check within the script:
>>>>>
>>>>> if(isset($_REQUEST['style'])) {
>>>>>
>>>>> $style = $_REQUEST['style'];
>>>>> }
>>>>>
>>>>> Thanks in advance for your assistance.
>>>>>
>>>>> -- 
>>>>> 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
>>>>
>>>
>
>

--- End Message ---
--- Begin Message ---
*bump*

> > > I'm a bit stuck.. I'm using the PEAR http_Request to send files and
> > data as
> > > HTTP POST, which is working fine if I in fact have the files on
> disk
> > on the
> > > server. Just using the method addFile..
> >
> >     Okay....
> >
> > > But what if the file data is only in a variable? It feels like
> > overkill to
> > > first save to disk, and then read it in with addFile... The HTTP
> POST
> > I'm
> > > looking at will need to add "files" both from disk and variables.
> >
> >     .... then it's not a file, it's data held in RAM (non-TSR).
> 
> 
> Absolutely true, but the receiving end is expecting the data as a file
> upload.
> 
> 
> >    Are you looking to stream the file content (such as the header or
> > initial $n bytes) from you local system to the server?  If so, sorry,
> > but you're in the wrong place.
> 
> I don't really understand what you're asking for above, but to try to
> explain... My server is to create a HTTP POST request to another
> system,
> with a couple of "form variables" and also 2-3 "files". Much like a
> manual
> html form will do, but with no human intervention.
> 
> 
> > > Ideas are welcome..
> >
> >     My idea is to ask the question: how is the "file data" getting
> > into the "variable"?
> 
> 
> Well, some of the "form values" are static, like user name etc. Then
> one
> file will be static (and stored on disk as a file) and added with
> method
> 'addData' to the POST request. Another "file" is generated dynamically
> from
> data stored in a SQL database and data provided by user input from
> visiting
> my site. Of course I can store this dynamically generated data to disk,
> add
> it with 'addData' and then delete it after the request is made, but it
> doesn't really feel like the right thing to do.
> 
> Anders.
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
On Fri, Jan 2, 2009 at 14:14, Anders Norrbring <[email protected]> wrote:
> *bump*

    Please don't "bump" threads, Anders.  This is not a traditional
web-based user forum.  You've provided no additional data, so there is
no need to bring this thread up again.  If you want to get more
attention to it, you will need to send a reply to the list with
updated information.  The last response in this thread was from Nathan
Rixham.  If you didn't receive that message, you can find it in the
archives, or I'll be glad to forward it to you.  If it didn't solve
your problem, you can say so and folks here will be happy to help you
further.

    Thanks!

-- 
</Daniel P. Brown>
[email protected] || [email protected]
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

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

On Dec 31, 2008, at 5:55 PM, Brian Dunning wrote:
... When I hit Reply or Reply All in Mail, it wants to
reply directly to the poster, and only CC's the list...

That is just the way the list works. (If you look at threads, you will see a fairly-constant stream of reminders to "reply all" to stay on the public listserv).

Other lists to which I subscribe don't behave like this. I can't understand why this one does. Even if people remember to "reply all" the recipient gets 2 copies of the reply. (If only the list admin knew of some programmer who could alter this.... <g>)

All of this is tolerable for the great information exchanged, but it *is* annoying.

Ken

(Ironically, I initially forgot to "reply all" on this one, so I had to re-do it.)
--- End Message ---

Reply via email to