Browse by Tags
All Tags »
Javascript (
RSS)
Will they dance together? Well, guess not that easy. When you are using RadToolTipManager and set its ‘AutoTooltipify’ property to “true”, every element on the page that has a 'title' attribute will be automatically “tooltify” with RadToolTip instead of the yellow default one. The RadToolTip and RadDock integration problem: The expected behavior is to have only one tool tip, the telerik’s one, absolutely not double tooltips (telerik’s and the default). Updated to the current version of the...
“Ajax client-side framework failed to load”. If you encountered with the error message above after login to your site and you're using the ASP.NET membership framework (and you verified that MS AJAX is properly installed), you can add the following configuration section to your web.config: < configuration > ... < location path ="ScriptResource.axd" > < system.web > < authorization > < allow users ="*" /> </ authorization > </ system.web...
Debugging javascript over running website should not be a problem, as long as you're equipped with Firebug plug-in for Firefox. Just find the relevant script peace of code and insert new breakpoint. What if you don't have Firebug installed, or you need to debug the script specifically over Internet Explorer for some reason (e.g. no javascript error on FF, only with IE)? Nice trick is to use the " Web Development Helper " IE plug-in to achieve this. Just open its Script Console window...
Every web developer using Firefox might have Firebug plug-in installed. For the ones who uses Internet Explorer during the development there is similar tool that you probably already know, the "IE Developer Toolbar". It's very nice one but it is lacking a bit compared to Firebug. This post will talk about the " Web Development Helper " which is a complementary tool for IE web developers, developed by Nikhil Kothari . This tool introduce few helpful features, here is some of...
I had a very annoying bug today. One of the pages at my web application raises its Page_Load event twice for some reason. At the first time, Page.IsPostBack = true, and false at the second time. One of the interesting things was that this wrong behavior described above was occurring only when browsing using Internet Explorer. Firefox wasn’t post back again (well, except if you right clicked the image and choose “View Image”, then it was posting back one more time, but not twice at a time). Go figure...
In our current project we are using the RadControls toolkit for ASP.NET AJAX from Telerik at the presentation layer. One of the controls we were used the most was the RadComboBox for its wide client side API, enables you to make changes at the client side without bothering the server with tasks like filling new list of items, remove some etc. I had few cascading combo boxes and I was using AJAX web-service to add items to the one depends on the other selected value on the client-side. Everything...
טפסי WebForms רבים המכילים שדות להזנת נתונים ע"י המשתמש, מכילים גם פקדי וולידציה שתפקידם לוודא את תקינות המידע שהוזן בשדות ע"י ה client. וולידציה יעילה מבצעת בדיקה בצד לקוח לפני שליחת הטופס לשרת ע"מ לחסוך round-trips מיותרים, של טפסים שלא מולאו בצורה תקינה. לפני שמתבצע Post-Back של ה form, נבדקים שדות הקלט ובמידה והכל תקין, יישלח הטופס לבדיקה נוספת בשרת ולאחמ"כ לביצוע הפעולה הרצוייה. במידה ויש לנו צורך לבצע בדיקות נוספות מלבד הבדיקות הרגילות, נוכל לקשור client-side event handler...
במצב שיש צורך לבטל (או לאפשר מחדש) את הוואלידציה על פקד מסויים דרך ה client-side, ניתן להשתמש ב Javascript בכדי לבצע זאת בקלות. Will Asrary מסביר בבלוג שלו איך עושים את זה . חשוב לשים לב שזה תקף ל client-side בלבד, ומבחינת ה server-side הפקדים עדיין enabled. פתרון אפשרי זה לשים hidden field עם ערך שאותו נקרא ב Page_Load ולפיו נעדכן את ה Validator.Enable בצד ה server. שימושי.
בעייה: כשעובדים עם הפקדים של MS AJAX Toolkit לעיתים קורה מצב שבעליית הטופס פקדים מסויימים, שאמורים לעלות במצב "collapsed" עולים "expanded" לחלקיק השניה ומיד נסגרים. בד"כ זה לא קורה והפקדים עובדים בסדר, אך הפעם היה לי צורך לשתול באופן דינמי alert של javascript שאומר שהנתונים עודכנו בהצלחה לאחר ביצוע פעולת שמירה. מכיוון שה alert עולה ב load של הטופס, חל עיכוב בטעינת ה form ובעצם מה שקרה זה שה CollapsiblePanel שלי, "נתקע" במצב "expanded" במקום "collapsed"...
לפני כמה ימים הייתה לי בעייה: ביצעתי פעולת עדכון נתוני משתמש ל Data Source, ולאחר בדיקה שהעדכון אכן בוצע, שתלתי js alert שהעדכון אכן בוצע בהצלחה. הבעיה הייתה שהסקריפט לא הופיע בדף אחרי העדכון, ובדיקה ב view source הראתה שהוא בכלל לא נשתל. מכיוון שהמערכת שלי מציגה נתוני משתמש לפי ID מה QueryString, לאחר יצירת משתמש חדש הייתי מבצע Response.Redirect ל URL + ה User ID החדש. מה שהיה קורה, זה שה alert היה נשתל בדף הישן, ואני הייתי נשלח לדף החדש. אז חשבתי, איך אני יכול לשתול JS alert בדף שאני רוצה לעבור...