Results 1 to 14 of 14

Thread: js :D

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573

    js :D

    .
    AJAX:
    http://www.w3schools.com/PHP/php_ajax_database.asp

    , , txtHint , , :
    Code:
    <select name="cat" onchange="showUser(this.value)">
        <option....
        <option....
    </select>
    
    <select name="select" id="txtHint">
    </select>
    , , select, showUser(); php id="txtHint".

    w3 <div id="txtHint"...
    .
    , IE6/7.

    .
    "" php , "". , , , .

    JS, .

    .. .
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  2. #2
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    :

    1) "select" PHP-.
    2) <div> id - txtHint "" select, "" AJAX-.
    3) .

  3. #3
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    , , ...

    ...
    , + , . , onchange $_POST... .

    PS - , .
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  4. #4
    White awesomeness z0ne's Avatar
    Join Date: Feb:2002
    Location: o
    Posts: 13,331
    Quote Originally Posted by BornToDrink View Post
    , , ...

    ...
    , + , . , onchange $_POST... .
    ( - bad / good) $_REQUEST . "post" $_POST. Survive.

  5. #5
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    Quote Originally Posted by BornToDrink View Post
    Code:
    <select name="cat" onchange="showUser(this.value)">
        <option....
        <option....
    </select>
    
    <select name="select" id="txtHint">
    </select>
    - name id . , .
    , , ...
    Last edited by Bombera; 22nd October 2008 at 01:58.
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  6. #6
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    z0ne, , !

    Bombera, ID & name (..!?, , ) .
    .
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  7. #7
    a.k.a. Bibi Flower's Avatar
    Join Date: Aug:2006
    Location: Sofia, Bulgaria
    Posts: 562
    , , id name!
    JS Option.
    ...
    , ?

    ( ) AJAX.
    - onSubmit- .
    , ( ).
    AJAX, . ( json.)
    - , - alert .

  8. #8
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    JS- , show();
    php option- .

    :

    Code:
    <select name="cat" onchange="show(this.value)">
    	<option> </option>
    	<option  value="4"> e</option>
    </select>
    
    <select name="subcat" id="txtHint">
    
    </select>
    : , - .
    div - .
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  9. #9
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    Code:
    document.getElementById("txtHint").innerHTML=xmlHttp.responseText
    (SPAN, DIV, TD - ), , IE . (option)? , . - => . , , . , . . ?
    (name id) . - - , ( , ). , document.forms[], , . . Name deprecated, . , . , .
    , - . , , . , .

    P.S. innerHTML, . getElementdById() , . , <option>teskta ot zaqwkata
    tuka</option>.
    :
    http://msdn.microsoft.com/en-us/libr...93(VS.85).aspx
    bool canHaveHTML(void). , .

    P.S.S . , ! .
    Last edited by delian; 23rd October 2008 at 16:55.
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  10. #10
    a.k.a. Bibi Flower's Avatar
    Join Date: Aug:2006
    Location: Sofia, Bulgaria
    Posts: 562
    1. AJAX.
    , ( ). .

    2. , ( ), - . JS- . .

    3. "name" , . , . - , , . . "id" ( ).

    4. , , , . . , , :
    , , optList . :
    Code:
    function loadOptions(optList) {
      var sel = document.getElementById('txtHint');   // ,   
      sel.options.length = 0;   //   
      var newOpt;   //  option
      for (var i in optList) {  //     
        newOpt = document.createElement('option');
        newOpt.value = i;
        newOpt.innerHTML = optList[i];
        sel.appendChild(newOpt);  //    
      }
    }
    5. , innerHTML, . '<option value="1">edno</option><option value="2">dve</option>'.
    :
    Code:
    <select id="txtHint">
      <option/>
    </select>
    <script>
    var sel = document.getElementById('txtHint');
    sel.innerHTML = '<option value="1">edno</option>';
    alert(sel.innerHTML);
    </script>
    .
    , ( )...
    Last edited by Flower; 23rd October 2008 at 22:40.

  11. #11
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    .

    Bombera:
    option-, .
    , JS- value-, .js-a .php GET, :
    value- , sql :
    <option value=$sql['id']>$sql['name']</option> .. .
    , .

    ==============

    Flower:

    1. , php , - , , sql, php w3.

    ...

    , JS , , , z0ne -.

    , ...

    ===

    , , , , ...
    , JS ?
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  12. #12
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    , . . , , . JS, , .
    , , -

    P.S. AJAX . " ", AJAX. , , AJAX . Java , , 2000-. javascript-, DIV-. .
    IE4/5 , .
    Last edited by Bombera; 24th October 2008 at 01:33.
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  13. #13
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    , . :P

    " JS, , ." .
    , , , .
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  14. #14
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    -,
    "1" , "0" .

    Code:
    switch(stringa_ot_servera){
       case "0":
           izwyrshi_deistwiq_ako_dannite_sa_OK();
           break;
       case "1":
           izwyrshi_deistwiq_ako_dannite_smuchat_demek_sa_newalidni();
           break;
    }
    , .
    Last edited by Bombera; 24th October 2008 at 02:25. Reason:
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |