nobody puts inputs in a thickbox and needs to access his value ??

my script works well when i comment the line :

TB_show('Verification du code promo',
'#TB_inline?height=120&width=220&inlineId=codepromo', null);
but whithout thickbox, it's not pretty.. ?




vince wrote:
> 
> Hi,
> 
> I'm trying to make an ajax validation for reductions codes..
> 
> I've got an hidden form to test the value :
> 
> My problem is that when i use thickbox, i don't have access to the value
> of my input text anymore !!
> 
> my input #code doesn't seems to have a value !!
> 
> What's the problem ?? how can i get this value ??
> 
> Thanks in advance
> 
> 
> 
> <div id='codepromo' style='display:none;'>
>       <input type='text' name='code' id='code'/>
>       <input type='button' name='verif' id='verif' value='V&eacute;rifier le
> code !'/>
>       <br/>
>       <div class='verif'></div>
> </div>
> 
> 
> and here is my jquery code :
> 
> <link rel="stylesheet" href="../thickbox.css" type="text/css"
> media="screen" />
> <script type="text/javascript" src="/v3/scripts_js/jquery.js"></script>
> <script type="text/javascript" src="../thickbox.js"></script>
> 
> <script type="text/javascript">
> $(document).ready(function(){
>       
>       document.getElementById("opt_pkg_other_promo1").checked = true;
>       
>       $("[EMAIL PROTECTED]'opt_pkg_other_promo2']").click(
>       function(){
>               if(this.value == "avec_promo")
>               {
>                       document.getElementById("opt_pkg_other_promo1").checked 
> = true;         
>                       
>                       TB_show('Verification du code promo',
> '#TB_inline?height=120&amp;width=220&inlineId=codepromo', null);
>                       
>                       $("div.verif").html("");
>                       $("input#verif").show("fast");                  
>                       $("div#codepromo").show("slow");
>                       
>                       $("input#verif").click(
>                       function()
>                       {
>                       alert($("input.code").val());
>                       $("div.verif").html(" ../ajax-loader.gif ");
>                       $.get("../verif.php",
>                         {code:$("input#code").val()},
>                         function(data){
>                               if(data == "1")
>                               {
>                                       $("input#verif").hide("fast");
>                                       $("div.verif").html("<strong>Merci, 
> votre code est valide
> !</strong>");
>                                       
> document.getElementById("opt_pkg_other_promo2").checked = true;
>                                       $("[EMAIL 
> PROTECTED]'opt_pkg_other_promo']").unbind();
>                               }
>                               else
>                               {
>                                       $("div.verif").html("<strong>Code 
> Invalide !</strong>");
>                                       
> document.getElementById("opt_pkg_other_promo1").checked = true;
>                               }
>                         });   
>                 });
>               }
>       });
> });
> </script>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Ajax-get-And-Thickbox%2C-problem-accessing-value-tf3149610.html#a8745855
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to