Browse by Tags

Dynamically Resize an IFrame According to its contents
Tuesday, November 25, 2008 4:30 AM
problem with iframe is that you can't always predict the size of the content and eventually you'd end up with a scrollbar or even less convenient: a hidden part of the Iframe content this is a straight forward, easy way to make sure that the IFrame is properly resized according to the contents of the page loaded inside the Iframe. this will rely on the... Read More...
by amir.magdy | 1 comment(s)
Filed under: ,
Most Used Javascript Date functions
Thursday, August 21, 2008 12:16 PM
var OneDay = 1000*60*60*24; function subtractDates (firstDate,secondDate){ return Math.ceil(( new Date(firstDate).getTime() - new Date(secondDate).getTime())/(OneDay)); } function addDays (dateToAdd,amountInDays){ return new Date(dateToAdd.valueOf() + this .OneDay * amountInDays); } function daysInMonth (year,month){ var m = [31,28,31,30,31,30,31,31,30,31,30... Read More...
by amir.magdy | 1 comment(s)
Filed under:
Object Orientation In JavaScript III [Overloading and Overriding]
Thursday, December 06, 2007 3:17 PM
let's start with Overriding it's easier to explain of course you must have the idea of inheritence in your mind well if you have missed it check back here first 1: function superClass (){ 2: this .superClassMember = function (){ 3: alert ( 'this is executed from the Super Class' ); 4: } 5: } 6: 7: // and then 8: 9: function subClass(){ 10: //... Read More...
by amir.magdy | 2 comment(s)
Filed under:
Object Orientation In JavaScript II [Inheritance]
Wednesday, December 05, 2007 2:38 PM
well there are two ways inheritance can be implemented in JavaScript this code explains how the first way 1: function superClass (){ 2: this .superClassMember = function (){ 3: alert ( 'this is executed from the Super Class' ); 4: } 5: } 6: 7: // and then 8: 9: function subClass(){ 10: // the next two lines are the inheritence implementation 11: this... Read More...
by amir.magdy | 5 comment(s)
Filed under:
Object Orientation in JavaScript
Tuesday, December 04, 2007 7:14 AM
JavaScript and object orientation has been a long debated issue, and because of the untyped nature of JavaScript many have thought of it as a temporary solution till something that is OO emrges and replaces it, well the current AJAX sites has proved them wrong in the coming javascript posts i'll try to tap into the OO concepts and how it can be mimicked using... Read More...
by amir.magdy | 3 comment(s)
Filed under:
Software Needed to create Ajax Applications
Saturday, November 17, 2007 2:56 AM
well there's a lot of approaches to create ajax applications but i like .net and c#, I use asp.net controls to render the initial page and then do all the manipulation using manually coded javascript. and for the server calls i use normal asmx's and a script manager to generate a javascript that i can use to send and receive data so this way the tools... Read More...
by amir.magdy | with no comments
Filed under: , ,
Are you sure [Prompt User Validation]
Saturday, November 17, 2007 1:26 AM
there's so many times when you need to ask a user "are you sure?" but you want it to be quick and painless you don't want to do one more server round trip just for that you can always use this the javascript prompt function so confirm() but how to integrate that into your asp.net code ok. 1: < asp:Button id ="btnDelete" runat ="server"... Read More...

This Blog

Syndication