[Proto-Scripty] Re: Scriptaculous problem with option field

2009-01-20 Thread rolfK

Hello,

Thank you for your fast response. But unfortunately your suggestion
does not solve the problem. Using xyz as query, the following string
is transferred:

Without option field:
query=xyz
That is okay and as expected. With your suggestion as option field,
the following is pushed to the server.
query=xyz%5Bobject%20Object%5D

But the variable 'media_only' is not yet transferred. Changing double
quotes to single quotes has no influence. I've still no idea what to
do. Looking at the API documentation it seems simple. Meanwhile I
tried a lot with brackets and quotes ...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Scriptaculous problem with option field

2009-01-19 Thread rolfK

Using thescriptaculous framework, I toughed a problem that I can't
solve by myself. I try to send two variables from HTML code to the
server script. No problem to transfer the first variable ($query). For
the second variable ($media_only) I tried to use the option field. But
I do not succeed and need your advice which error I included.

Following the API Documentation and Reference: AJAX.AUTOCOMPLETER, I
tried the following:

HTML script:
?php
...
form action=search.php method=get
table class=searchBox
tr
td
input type=text name=query id=query size=40
value=?php print($query);?
/td
td
input type=hidden name=search value=1
input type=submit value=?php print $sph_messages
['Search'];?
/td
/tr
tr
td
input type=checkbox name=media_only
id=media_only value=1 ?php print $_REQUEST['media_only']
=='1'?'checked':''??php print $sph_messages['mediaOnly']?
/td
/tr
/table
div id=auto_suggest class=suggest
/div
script type=text/javascript
  new Ajax.Autocompleter(query, auto_suggest, include/
suggest.php, {media_only: media_only});
/script
/form
...
?

Server Script:
?php

$keyword = $_POST['query'];
$media_only = $_POST['media_only'];

// here get the suggestions and send them to div id=auto_suggest
class=suggest
...
?

There is no problem to transfer $query and get the suggestions. But
unfortunately $media_only is not transferred to the server.

I would be very thankful if someone could advise me how to fix my
invalid code.

Thank you for your efforts


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---