Guest User

Untitled

a guest
Jan 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript" src="jquery.js"></script>
  2. <script type="text/javascript">
  3. jQuery(document).ready(function(){ 
  4.     var client = sessionStorage.getItem('client_cookie');
  5.     if (client != null)
  6.         {
  7.             $.get('/batch_/runBatches_custom.php?client=' + client + '&from=' + ' ' + '&to=' + ' ' + '&period=' + 'Monthly',
  8.             function(data)
  9.         {
  10.  
  11.  
  12.  
  13.                 var iframe = document.createElement("iframe");
  14.                 $(iframe).css({ 'width' : 400, 'height' : 500 });
  15.                                 $(iframe).attr("id", "content-iframe");
  16.                                 $('#cheese').append(iframe);
  17.                 var doc = iframe.document;
  18.                 if(iframe.contentDocument)
  19.                     doc = iframe.contentDocument; // For NS6
  20.                 else if(iframe.contentWindow)
  21.                     doc = iframe.contentWindow.document; // For IE5.5 and IE6
  22.         // Put the content in the iframe
  23.                 doc.open();
  24.                 doc.writeln(data);
  25.                 doc.close();
  26.                 $textBox =  $('<input type = "text" id = "textBox" />');
  27.                 $textBox.appendTo('#cheese');
  28.                 $textBox.css({
  29.                     position: 'aboslute',
  30.                     top : iframe.position().top -10,
  31.                     right: iframe.position().right + (iframe.position.width()/2),
  32.                     })
  33.  
  34.  
  35.     });
  36. }
  37.     else
  38.     {
  39.         var textbox = document.createElement("div");
  40.                 textbox.innerHTML = "Please go back to Analyst Data and select a valid client.";
  41.         document.getElementById('cheese').appendChild(textbox);
  42.                
  43.  
  44.     }
  45.  
  46.  
  47.  
  48. });
  49. </script>
Add Comment
Please, Sign In to add comment