savemsg.js

Summary

No overview generated for 'savemsg.js'


// savemsg.js



/* === WINDOW Events === */

/*

  onload event handler

*/

function SaveMsgOnload()

{
	var f = new Array();
	f["File"] = "HTTPPost/savemsg.js";
	f["Function"] = "SaveMsgOnload";

	document.getElementById("version").value = opener.mozile.version;

	

  try {

  	var i, n;

		i = opener.reqObj;
		//alert(i);



		n = document.getElementById("messagetext");

		//Get rough number of rows.

		//Won't account for any long lines that wrap, but you can scroll the textbox.

		var msgSplit = i.msgText.split('\n',10);

		var msgRows = msgSplit.length;

		n.setAttribute( "rows", msgRows ); 

		n.value = i.msgText.toString();



    n = document.getElementById("status");

		while( n.hasChildNodes() ) n.removeChild( n.firstChild );

		n.appendChild( document.createTextNode(i.status + " " + i.statusText) );



		if ( !( "documentText" in i ) ) {

    	document.getElementById("infoButton").setAttribute( "hidden", "true" );

		}

  }

	catch (e) {
 	  //alert(e);

	  opener.mozileDebug(f,4,"Exception: "+e);

	}

	self.sizeToContent();

	return true;

}



function SaveMsgInfo()

{
	var f = new Array();
	f["File"] = "HTTPPost/savemsg.js";
	f["Function"] = "SaveMsgInfo";
	

  try {

    var SaveInfoWindow = window.opener.open( "", "mozileSaveInfo", "centerscreen,chrome,resizable=yes,height=400,width=400" );

    SaveInfoWindow.document.open();

    SaveInfoWindow.document.write( opener.reqObj.documentText );

    SaveInfoWindow.document.close();

	}

	catch (e) {
	  opener.mozileDebug(f,4,"Save Info Window exception: "+e);

	}

  return true;

}




Documentation generated by JSDoc on Fri Feb 3 19:22:12 2006