Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 9th, 2012  |  syntax: None  |  size: 0.34 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if (dojo.byId('viewLink')) {
  2.         dojo.connect(dojo.byId('viewLink'), 'onclick', function(event) {
  3.                 dojo.xhrGet({
  4.                         url: event.target.href,
  5.                         handleAs: 'text',
  6.                         timeout: 10000,
  7.                         load: function(data){
  8.                                 console.log('success');
  9.                         },
  10.                         error: function(){
  11.                                 console.log('error');
  12.                         }
  13.                 });
  14.  
  15.                 dojo.stopEvent(event);
  16.         });
  17. }