זה יותר ב javascript מאשר ASP.NET

  • פותח הנושא udiko
  • פורסם בתאריך

udiko

New member
זה יותר ב javascript מאשר ASP.NET

ברגע שלוחצים על לחצן אני רוצה לבצע: 1. הודעת בקשת אישור ביצוע 2. להפוך את הלחצן ל DISABLE הבעיה היא שפונקצית ה CONFIRM מבטלת את ה DISABLE מה עושים ?
send.Attributes.Add("onclick", "return confirm('נא אשר ביצוע');this.value='אנא המתן...';this.disabled = true;" + this.GetPostBackEventReference(this.send));​
 

yuval k

New member
אל תשים return לפני confirm...

תעשה if:
"if (confirm('נא אשר ביצוע') { this.value='אנא המתן...';this.disabled=true; }"​
 

udiko

New member
עכשיו גם שלוחצים על CANCEL הפונקציה

מתבצעת איפה אני טועה?
send.Attributes.Add("onclick", "if (confirm('נא אשר ביצוע')) { this.value='אנא המתן...';this.disabled=true;" + this.GetPostBackEventReference(this.send) + ";}");​
 
למעלה