Click here to Skip to main content
14,550,882 members

JavaScript

 
AnswerRe: e.target.value, switch-case operators Pin
Richard Deeming11-Dec-18 1:16
mveRichard Deeming11-Dec-18 1:16 
PraiseRe: e.target.value, switch-case operators Pin
ghazabaz13-Dec-18 6:05
Memberghazabaz13-Dec-18 6:05 
QuestionEasy HTML Editor Pin
Bram van Kampen3-Dec-18 15:23
MemberBram van Kampen3-Dec-18 15:23 
AnswerRe: Easy HTML Editor Pin
Nathan Minier6-Dec-18 1:24
professionalNathan Minier6-Dec-18 1:24 
AnswerRe: Easy HTML Editor Pin
Nitin Sawant7-Dec-18 1:57
professionalNitin Sawant7-Dec-18 1:57 
AnswerRe: Easy HTML Editor Pin
RedDk28-Dec-18 11:44
MemberRedDk28-Dec-18 11:44 
GeneralRe: Easy HTML Editor Pin
Bram van Kampen28-Dec-18 12:55
MemberBram van Kampen28-Dec-18 12:55 
QuestionProblems to obtain value "0" or "1" from a div Pin
serenimus1-Dec-18 0:37
Memberserenimus1-Dec-18 0:37 
Hi!!

so, I have this Ajax function vinculated to a change Jquery event:

  $("#nif").change(function(){

         <pre> $.ajax({
async:true,
type:"POST",
data:N,
url:"<?=$this->basePath("alta/nuevouser/vernifduplicadoajax")?>",
    success:function(datos){
    $("#res").html(datos);

    }
    });


});



The matter is...that the result is or "1" (double register at DB) or "0" (no repeat), the value always appear in the div, depending of this result, I want to activate another
and show a message an other operations..

to evaluate this value I do the next

if($("#res").length !==0){
			var warn=parseInt(document.getElementById("res").innerHTML);
			alert(warn);
			}


but I always receive (using alert();)..isNan ...that is, "is not a Number"..
I`d need to evaluate:

if(warn==1){
//do this
}else{
//do that
}

Thanks a lot in advance!! Smile | :)

AnswerRe: Problems to obtain value "0" or "1" from a div Pin
ZurdoDev4-Dec-18 2:27
mveZurdoDev4-Dec-18 2:27 
QuestionUnable to switch events in jquery Pin
vmann30-Nov-18 18:45
Membervmann30-Nov-18 18:45 
SuggestionRe: Unable to switch events in jquery Pin
ZurdoDev4-Dec-18 2:28
mveZurdoDev4-Dec-18 2:28 
QuestionError on line 45 Pin
ghazabaz30-Nov-18 13:38
Memberghazabaz30-Nov-18 13:38 
AnswerRe: Error on line 45 Pin
ZurdoDev4-Dec-18 2:29
mveZurdoDev4-Dec-18 2:29 
AnswerRe: Error on line 45 Pin
maryam.saboor4-Dec-18 23:54
professionalmaryam.saboor4-Dec-18 23:54 
Questiondata transfer in two dimensional array format Pin
Member 1406088822-Nov-18 20:31
MemberMember 1406088822-Nov-18 20:31 
QuestionRe: data transfer in two dimensional array format Pin
ZurdoDev4-Dec-18 2:29
mveZurdoDev4-Dec-18 2:29 
QuestionJavascript syntax Pin
ghazabaz22-Nov-18 15:48
Memberghazabaz22-Nov-18 15:48 
AnswerRe: Javascript syntax Pin
Graham Breach22-Nov-18 21:36
MemberGraham Breach22-Nov-18 21:36 
AnswerRe: Javascript syntax Pin
NithyaKumarJai25-Nov-18 18:23
MemberNithyaKumarJai25-Nov-18 18:23 
Questionunexpected result function autocomplete() Jquery Pin
serenimus21-Nov-18 7:15
Memberserenimus21-Nov-18 7:15 
AnswerRe: unexpected result function autocomplete() Jquery Pin
Richard Deeming21-Nov-18 8:16
mveRichard Deeming21-Nov-18 8:16 
GeneralRe: unexpected result function autocomplete() Jquery Pin
serenimus22-Nov-18 6:11
Memberserenimus22-Nov-18 6:11 
GeneralRe: unexpected result function autocomplete() Jquery Pin
serenimus22-Nov-18 6:13
Memberserenimus22-Nov-18 6:13 
GeneralRe: unexpected result function autocomplete() Jquery Pin
Richard Deeming22-Nov-18 8:41
mveRichard Deeming22-Nov-18 8:41 
GeneralRe: unexpected result function autocomplete() Jquery Pin
serenimus1-Dec-18 0:19
Memberserenimus1-Dec-18 0:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.