php-general Digest 17 Jul 2011 19:38:48 -0000 Issue 7404

Topics (messages 314093 through 314099):

Re: Your language sucks because...
        314093 by: Ashley Sheridan
        314094 by: Daniel Brown
        314095 by: Robert Cummings
        314096 by: Daniel Brown
        314097 by: Daniel Brown
        314098 by: Stuart Dallas

chained select with ajax
        314099 by: Chris Stinemetz

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 ---
On Fri, 2011-07-15 at 10:42 +0100, Richard Quadling wrote:

> On 15 July 2011 01:42, Micky Hulse <[email protected]> wrote:
> > On Thu, Jul 14, 2011 at 4:19 PM, George Langley <[email protected]> 
> > wrote:
> >> He gave you a beautiful hint:
> >
> > :: slaps self on forehead ::
> >
> > I should've known!!! :D
> >
> > Thanks!
> > Micky
> 
> 
> He he!
> 
> Well done. It's a great word. My wife and I really didn't think
> anything started with "tme". I have yet to be in a position to use it
> in normal conversation.
> 
> -- 
> Richard Quadling
> Twitter : EE : Zend : PHPDoc
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
> 


I'm still not getting it, and the only dictionary I have about is some
tiny pocket one I've had since I was 9!

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Fri, Jul 15, 2011 at 16:04, Ashley Sheridan <[email protected]> 
wrote:
>
>
> I'm still not getting it, and the only dictionary I have about is some
> tiny pocket one I've had since I was 9!

    The word was 'tmesis', which is a linguistic phenomenon in which
words or phrases have other words or phrases thrown into the mix.  The
hint to which I believe George referred was Richard's
"abso-bloody-lutely" statement, which is a perfect example of tmesis.

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--- End Message ---
--- Begin Message ---
On 11-07-15 04:21 PM, Daniel Brown wrote:
On Fri, Jul 15, 2011 at 16:04, Ashley Sheridan<[email protected]>  
wrote:


I'm still not getting it, and the only dictionary I have about is some
tiny pocket one I've had since I was 9!

     The word was 'tmesis', which is a linguistic phenomenon in which
words or phrases have other words or phrases thrown into the mix.  The
hint to which I believe George referred was Richard's
"abso-bloody-lutely" statement, which is a perfect example of tmesis.

Damn... here I thought the hint was-- it begins with "tme". If only I had caught that abso-bloody-lutely embodied the principle, then I could have back-frickin-tracked from the principle, to the meaning, to the word itself. That would have been so much more efficient... NOT!

:)

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--- End Message ---
--- Begin Message ---
On Fri, Jul 15, 2011 at 18:37, Robert Cummings <[email protected]> wrote:
>
> Damn... here I thought the hint was-- it begins with "tme". If only I had
> caught that abso-bloody-lutely embodied the principle, then I could have
> back-frickin-tracked from the principle, to the meaning, to the word itself.
> That would have been so much more efficient... NOT!

    Have I told you lately you can bite me?

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--- End Message ---
--- Begin Message ---
On Fri, Jul 15, 2011 at 20:04, Stuart Dallas <[email protected]> wrote:
>
> Haven't you been told before that offers of and requests for services of a
> personal nature should be kept off the list!!

    I don't believe so, but then - if I had - I would've ignored the
order just as now.

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--- End Message ---
--- Begin Message ---
On Sat, Jul 16, 2011 at 12:46 AM, Daniel Brown <[email protected]> wrote:

> On Fri, Jul 15, 2011 at 18:37, Robert Cummings <[email protected]>
> wrote:
> >
> > Damn... here I thought the hint was-- it begins with "tme". If only I had
> > caught that abso-bloody-lutely embodied the principle, then I could have
> > back-frickin-tracked from the principle, to the meaning, to the word
> itself.
> > That would have been so much more efficient... NOT!
>
>     Have I told you lately you can bite me?


Haven't you been told before that offers of and requests for services of a
personal nature should be kept off the list!!

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
This is a [Cross-post] I didn't receive any feedback from phpdb list.
Hope fully there is someone out there that may offer some advice why
my code isn't working correctly.

Thanks all.

I am trying to create a cascading seletct with 3 menu choices.
For some reason my third select menu is not populating. It doesn't
seem like my ajax is correctly sending $_post values to the final
query in my PHP class I built.
By the time I make it to the final third select menu there are no choices.

Hopefully someone can find something I missed in the following code snippits.

Any help is greatly appreciated.

Please excuse the incorrect indentions. For some reason gmail changes it.

Thanks,

Chris

ajax code...

   <script>
       $(document).ready(function(){
           $("select#type").attr("disabled","disabled");
                       $("select#store").attr("disabled","disabled");
           $("select#market").change(function(){
           $("select#type").attr("disabled","disabled");
           $("select#type").html("<option>please wait...</option>");
           var id = $("select#market option:selected").attr('value');
           $.post("select_type.php", {id:id}, function(data){
               $("select#type").removeAttr("disabled");
               $("select#type").html(data);
           });
       });

                       $("select#type").change(function(){
                       $("select#store").attr("disabled","disabled");
                       $("select#store").html("<option>please
wait...</option>");
                       var id = $("select#type option:selected").attr('value');
           $.post("select_store.php", {id:id}, function(data){
               $("select#store").removeAttr("disabled");
               $("select#store").html(data);
                       });
               });




       $("form#select_form").submit(function(){
           var market = $("select#market option:selected").attr('value');
           var type = $("select#type option:selected").attr('value');
                       var store = $("select#store
option:selected").attr('value');
           if(market>0 && type>0 && store>0)
           {
               var market = $("select#market option:selected").html();
                               var type = $("select#type
option:selected").html();
                               var store = $("select#store
option:selected").html();
               $("#result").html('your choices were: '+market +' ,
'+type +' and '+store);
           }
           else
           {
               $("#result").html("you must choose three options!");
           }
           return false;
       });
   });
   </script>


php class for populating select menus....

<?php
class SelectList
{
       protected $conn;
               public function __construct()
               {
                       $this->DbConnect();
               }
               protected function DbConnect()
               {
                       include "db_config.php";
                       $this->conn =
mysql_connect($host,$user,$password) OR die("Unable
to connect to the database");
                       mysql_select_db($db,$this->conn) OR die("can
not select the database $db");
                       return TRUE;
               }
               public function ShowMarket()
               {
                       $sql = "SELECT DISTINCT id_markets FROM store_list";
                       $res = mysql_query($sql,$this->conn);
                       $market = '<option value="0">market...</option>';
                       while($row = mysql_fetch_array($res))
                       {
                               $market .= '<option value="' .
$row['id'] . '">' .
$row['id_markets'] . '</option>';
                       }
                       return $market;
               }

               public function ShowType()
               {
                       $sql = "SELECT DISTINCT store_type FROM store_list";
                       $res = mysql_query($sql,$this->conn);
                       $type = '<option value="0">store type...</option>';
                       while($row = mysql_fetch_array($res))
                       {
                               $type .= '<option value="' . $row['id'] . '">' .
$row['store_type'] . '</option>';
                       }
                       return $type;
               }

               public function ShowStore()
               {
                       $sql = "SELECT store_name FROM store_list WHERE
id_markets=$_POST[id] AND store_type=$_POST[id]";
                       $res = mysql_query($sql,$this->conn);
                       $Store = '<option value="0">stores...</option>';
                       while($row = mysql_fetch_array($res))
                       {
                               $Store .= '<option value="' . $row['id'] . '">' .
$row['store_name'] . '</option>';
                       }
                       return $Store;
               }
}

$opt = new SelectList();

?>

--- End Message ---

Reply via email to