MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Graphic Buttons - Mike didn't tell it all



******    message to minivend-users from mikeh@minivend.com     ******

Quoting Lee Hamilton (lee@subvert.net):
> 
> On Wed, 21 Apr 1999, Thompson-Jordan wrote:
> 
> > Try [set name="Cancel Order"]
> > 
> > Christopher Thompson
> 
>   Unfortunately this doesn't work, as well as
> 
> [set "Cancel Order"]
> 
>   which I had tried earlier.  So I can still only get this to work if I
> use "Cancel_Order".
> 
>   You know, thinking about this though, what I've observed above *should*
> be the desired behaviour; variable names shouldn't have spaces in them.
> But why do the examples from the demo use
> 
> [set Place Order!]
> 
>   for instance, and more importantly, why do they work?
> 

Because the PosNumber is 1. 8-) If you want to know what that
means, look at the docs and source and ponder why
[area scan
          se=whatever
          sf=wherever
          fi=foo
          ] works while [area scan/se=whatever/sf=wherever]
will not.

Unless you used named attributes, i.e. an = sign in the first parameter
set, the [set ...] tag interprets any passed parameter as one variable
name. This works out quite well for many tags.

The reason images don't work the way you might expect is because
the *name* of the variable has a space, not the value; remember the
name of an IMAGE button is really both "Cancel Order.x" and "Cancel
Order.y". The browsers, in their infinite wisdom, decree that any image
variable having a space in its value will have that replaced with a +
sign. It is really just a slightly divergent use of HTTP; I think that
theoretically I am supposed to change the + to a space in my routines,
but every other place in the HTML they will use "Cancel%20Order". Encoding
is hard sometimes; I have made quite a few changes in MV in that area
over time, arriving at what I feel to be the sweet spot only after a
considerable effort.

So this works:

    <INPUT TYPE=image NAME="Cancel Order" SRC="cancel.gif">
    <INPUT TYPE=hidden NAME=mv_click_map VALUE="Cancel+Order">

[set Cancel+Order]
mv_todo=foo
mv_nextpage=bar
[/set]

I don't use IMAGE buttons, because they are definitely second-class
citizens as far as the browsers are concerned. No JavaScript can
be attached, for instance, and there are other anomalies. Image maps
actually work better in many ways.

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
                                    131 Willow Lane, Floor 2  | ||  _ \
It's a little-known fact            Oxford, OH  45056         | || |_) |
that the Y1K problem caused         <mikeh@minivend.com>     |___|  _ <
the Dark Ages. -- unknown           513.523.7621 FAX 7501        |_| \_\
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: