more ajaxy customer notes
authorjeff <jeff>
Sun, 26 Nov 2006 23:06:37 +0000 (23:06 +0000)
committerjeff <jeff>
Sun, 26 Nov 2006 23:06:37 +0000 (23:06 +0000)
httemplate/edit/process/cust_main_note.cgi
httemplate/view/cust_main.cgi
httemplate/view/cust_main/notes.html

index 2de9b7f..8b9105b 100755 (executable)
 %    
 <% header('Note ' . ($notenum ? 'updated' : 'added') ) %>
     <SCRIPT TYPE="text/javascript">
-      window.top.location.reload();
+      parent.cust_main_notes.location.reload();
+      try{parent.cust_main_notes.cClick()}
+      catch(err){}
+      try{parent.cClick()}
+      catch(err){}
     </SCRIPT>
-
     </BODY></HTML>
 %
 %
index fa3de92..3c66df1 100755 (executable)
@@ -138,7 +138,7 @@ Comments
 
 %   }else{ # make firefox happy wrt POSTDATA
 
-<iframe src="<% $p %>view/cust_main/notes.html?custnum=<% $cust_main->custnum %>" height="18" width="6" name="cust_main_notes" frameborder="0" marginborder="0" marginheight="0" scrolling="auto">
+<iframe src="<% $p %>view/cust_main/notes.html?custnum=<% $cust_main->custnum %>" height="24" width="616" name="cust_main_notes" frameborder="0" marginborder="0" marginheight="0" scrolling="auto">
   <div><br>[iframe not supported]<br><br></div>
 </iframe>
 
index 75bf30e..f10eccf 100755 (executable)
@@ -9,8 +9,6 @@
 % my $cust_main = qsearchs('cust_main', {'custnum' => $custnum} );
 % die "Custimer not found!" unless $cust_main;
 %
-% my (@notes) = $cust_main->notes();
-% if ( scalar(@notes) ) { 
 
 <STYLE TYPE="text/css">
 
@@ -21,6 +19,9 @@ body { background: #e8e8e8 }
 
 </STYLE>
 
+% my (@notes) = $cust_main->notes();
+% if ( scalar(@notes) ) { 
+
 <SCRIPT TYPE="text/javascript" SRC="/elements/overlibmws.js"></SCRIPT>
 <SCRIPT TYPE="text/javascript" SRC="/elements/overlibmws_iframe.js"></SCRIPT>
 <SCRIPT TYPE="text/javascript" SRC="/elements/overlibmws_crossframe.js"></SCRIPT>
@@ -28,7 +29,6 @@ body { background: #e8e8e8 }
 
 <TABLE CLASS="inv" CELLSPACING=0 CELLPADDING=0 BORDER=0 >
 
-%#<% include('/elements/table-grid.html') %>
 %   my $bgcolor1 = '#eeeeee';
 %   my $bgcolor2 = '#ffffff';
 %   my $bgcolor = '';
@@ -71,9 +71,7 @@ body { background: #e8e8e8 }
 % } #end display notes
 
 </TABLE>
-% } else { 
 
-<BR>
 % } 
 %
 %#subroutines