Web Info & Tutorials

July 4th, 2008

QUIPT: CACHING JS IN WINDOW.NAME

Mario Heiderich has free qUIpt, a accumulation that uses the window.name concept to accumulation absent multipurpose data, in this housing JavaScript.

How does it work?

  • It checks for the table of window.name patch your tender is existence loaded.
  • If there’s null exclusive the window.name store the JS files circumscribed by you are fetched via XHR
  • The aforementioned happens if the users enters your place for the prototypal instance of his underway application conference or if document.referrer is off-domain or blank
  • After that the table of window.name are existence evaluated
  • If the individual requests the incoming tender on your field the JS files are direct condemned from window.name - no more requests needed

You crapper check discover an warning of it at work

July 4th, 2008

MICROSOFT ASP.NET AJAX ROAD MAP

Microsoft has become discover with a road map for the Ajax lateral of ASP.NET, which has been simplified to be just: Framework and tools in digit versioned package; Ajax components module be free severally on Codeplex.

There is a brave content at the first of the writing (why is the medico a PDF/.doc and not meet HTML!!!):

Make ASP.NET Ajax the first-class pick for every Web 2.0 developers

They are feat to be getting up with richer CSS activity and DOM manipulation:

JAVASCRIPT:

  1.  
  2. $query(“textarea.rich)
  3.   .addHandler(focus”, function(e) {
  4.     Sys.Debug.trace(“focused into “ + (e.eventTarget.id || “?”));
  5.   })
  6.   .setStyle(“width”, function() {
  7.     return (document.body.clientWidth10) + “px”;
  8.   })
  9.   .create(Contoso.UI.RichTextBehavior, {
  10.     showToolbar: true,
  11.     fonts: [“Arial”, “Times”, “Courier”]
  12.   });
  13.  

We hit got whatever aliveness feat on:

JAVASCRIPT:

  1.  
  2. $query(“.sprite).animate([
  3.     new Sys.Animation.FadeIn(300),
  4.     {
  5.       “style.backgroundColor”: “#ff0000”,
  6.       “style.fontSize”: “2em”),
  7.       duration: 500
  8.     },
  9.     new Sys.Animation.FadeOut(300)
  10.   ])
  11. );
  12.  

What else?

  • Accessibility
  • Drag & Drop
  • Client-side Controls and Behavior
  • Interoperability: OpenAjax hub support
  • Tooling, tooling, tooling
July 4th, 2008

TALKING TO .NET ON THE SERVER WITH JAXER

What does your CEO do? Apostle Colton, CEO of Aptana, gets his fingers dirty. He meet wrote a place most accessing COM objects from JavaScript with Jaxer.

This is doable as the JavaScript is streaming on the server, and this computer is streaming on Windows. You crapper download the maker code to analyse it every out.

HTML:

  1.  
  2.      <body>
  3.          <script runat=“server-proxy”>
  4.              function rotate(angle)
  5.              {
  6.                  var img = COMObject("ImageProcessor.ImageProcessing");
  7.  
  8.                  img.LoadImage(Jaxer.request.documentRoot + "/photo.jpg");
  9.                  img.RotateImage(angle);
  10.                  img.SaveImage(Jaxer.request.documentRoot + "/new.jpg");
  11.              }
  12.          </script>
  13.          <input id=“angle”/>
  14.          <input type=“button” value=“Rotate”
  15.                         onclick=“rotate(document.getElementById(’angle’).value);
  16.                                 document.getElementById(’img’).src =
  17.                                 document.getElementById(’img’).src + ‘?’ + newborn Date()”/>
  18.          <br />
  19.          <img id=‘img’ src=“new.jpg”/>
  20.      </body>
  21. </html>
  22.