/* Created with PageBuilder version 4.04 on Thu Jan 23 11:00:30 2014 */

#include "AsExtern.h"

#if RomPagerServer



/* ********************************************** */
/* *    Built from "html\simpleWebPage.html"    * */
/* ********************************************** */

extern rpObjectDescription PgsimpleWebPage;

static char PgsimpleWebPage_Item_1[] =
	C_oHTML_oHEAD_oTITLE "A Test Page" C_xTITLE "<!-- a javascript file to "
	"put up a " C_S_small "window -->\n"
	"<script language=\"javascript\" type=\"text/javascript\" "
	"src=\"simple_javascript_newwin.js\">\n"
	"</script>\n"
	C_xHEAD C_oBODY ">\n"
	"Hello from HTML\n"
	C_oP "<!-- a live link that calls a javascript function when clicked "
	"-->\n"
	C_oANCHOR_HREF "javascript:void(0);\" onclick=\"makeMeAWindow(); return"
	" false;\">Make me a window"
	C_xANCHOR;

static char PgsimpleWebPage_Item_3[] =
	"Enter a name:\n";

static char PgsimpleWebPage_Item_4[] =
	" id=\"theNameField\"";

extern char theNameField[];
static rpTextFormItem PgsimpleWebPage_Item_5 = {
	"theNameField",
	(void *) &theNameField,
	(void *) &theNameField,
	eRpVarType_Direct,
	eRpVarType_Direct,
	eRpTextType_ASCII,
	64,
	64,
	(char *) PgsimpleWebPage_Item_4
};

static char PgsimpleWebPage_Item_6[] =
	C_oP "Enter Street Address:\n";

static char PgsimpleWebPage_Item_7[] =
	" id=\"theStreetAddressField\"";

extern char theStreetAddressField[];
static rpTextFormItem PgsimpleWebPage_Item_8 = {
	"theStreetAddressField",
	(void *) &theStreetAddressField,
	(void *) &theStreetAddressField,
	eRpVarType_Direct,
	eRpVarType_Direct,
	eRpTextType_ASCII,
	64,
	64,
	(char *) PgsimpleWebPage_Item_7
};

static char PgsimpleWebPage_Item_9[] =
	C_oP;

static rpButtonFormItem PgsimpleWebPage_Item_10 = {
	"submit",
	(char *) 0
};

static char PgsimpleWebPage_Item_11[] =
	C_xFORM
	C_xBODY_xHTML;



static rpItem PgsimpleWebPage_Form_1_Items[] = { 
	{ eRpItemType_FormAsciiText, (void *) &PgsimpleWebPage_Item_5 }, 
	{ eRpItemType_FormAsciiText, (void *) &PgsimpleWebPage_Item_8 }, 
	{ eRpItemType_FormSubmit, (void *) &PgsimpleWebPage_Item_10 }, 
	{ eRpItemType_LastItemInList } 
};

static rpObjectExtension PgsimpleWebPage_Form_1_ObjectExtension = {
	(rpProcessDataFuncPtr) 0,
	&PgsimpleWebPage,
	(rpObjectDescriptionPtr) 0,
	0,
	kRpObjFlags_None,
	(char *) 0
};

rpObjectDescription PgsimpleWebPage_Form_1 = {
	"/Forms/simpleWebPage_1",
	PgsimpleWebPage_Form_1_Items,
	&PgsimpleWebPage_Form_1_ObjectExtension,
	(Unsigned32) 0,
	kRpPageAccess_Unprotected,
	eRpDataTypeForm,
	eRpObjectTypeDynamic
};

static rpItem PgsimpleWebPage_Items[] = { 
	{ eRpItemType_DataZeroTerminated, (void *) &PgsimpleWebPage_Item_1 }, 
	{ eRpItemType_FormHeader, (void *) &PgsimpleWebPage_Form_1 }, 
	{ eRpItemType_DataZeroTerminated, (void *) &PgsimpleWebPage_Item_3 }, 
	{ eRpItemType_FormAsciiText, (void *) &PgsimpleWebPage_Item_5 }, 
	{ eRpItemType_DataZeroTerminated, (void *) &PgsimpleWebPage_Item_6 }, 
	{ eRpItemType_FormAsciiText, (void *) &PgsimpleWebPage_Item_8 }, 
	{ eRpItemType_DataZeroTerminated, (void *) &PgsimpleWebPage_Item_9 }, 
	{ eRpItemType_FormSubmit, (void *) &PgsimpleWebPage_Item_10 }, 
	{ eRpItemType_DataZeroTerminated, (void *) &PgsimpleWebPage_Item_11 }, 
	{ eRpItemType_LastItemInList } 
};


rpObjectDescription PgsimpleWebPage = {
	"/simpleWebPage.html",
	PgsimpleWebPage_Items,
	(rpObjectExtensionPtr) 0,
	(Unsigned32) 0,
	kRpPageAccess_Unprotected,
	eRpDataTypeHtml,
	eRpObjectTypeDynamic
};


/* ******************************************************* */
/* *    Built from "html\simple_javascript_newwin.js"    * */
/* ******************************************************* */

extern rpObjectDescription Pgsimple_javascript_newwin;

static char Pgsimple_javascript_newwin_Item_1[] =
	"\n"
	"var myPopupWindow;\n"
	"var myWindowsDoc;\n"
	"var anInteger = 0\n"
	"\n"
	"function makeMeAWindow()\n"
	"{\n"
	"    myPopupWindow = window.open(\"new_window.html\", "
	"\"thePopupWindow\", \"height=500, width=500, left=100, top=100, "
	"resizable=yes, scrollbars=yes,toolbar=yes,menubar=no,location=no, "
	"status=yes\");\n"
	"    myWindowsDoc = myPopupWindow.document;\n"
	"    myWindowsDoc.open();\n"
	"    myWindowsDoc.writeln(\"<html><head><title>\");\n"
	"    myWindowsDoc.writeln(\"My Document Title\");\n"
	"    myWindowsDoc.writeln(\"</title>\");\n";

static char Pgsimple_javascript_newwin_Item_2[] =
	"    myWindowsDoc.writeln(\"</head>\");\n"
	"    myWindowsDoc.writeln(\"<body>\");\n"
	"    myWindowsDoc.writeln(\"Hello from javascript\");\n"
	"    myWindowsDoc.writeln(\"<p>\");\n"
	"    myWindowsDoc.writeln(\"This page was created on the fly\");\n"
	"    myWindowsDoc.writeln(\"by having a javascript function\");\n"
	"    myWindowsDoc.writeln(\"write HTML to a newly created window\");\n"
	"    myWindowsDoc.writeln(\"<p>\");\n"
	"    myWindowsDoc.writeln(\"An onClick associated with an href and an "
	"\");\n";

static char Pgsimple_javascript_newwin_Item_3[] =
	"    myWindowsDoc.writeln(\"anchor tag initiated the function call\");\n"
	"    myWindowsDoc.writeln(\"</body>\");\n"
	"    myWindowsDoc.writeln(\"</html>\");\n"
	"\ttheNameElement=document.getElementsByName(\"theNameField\");\n"
	"\tanInteger = anInteger + 1;\n"
	"\tif(theNameElement != null)\n"
	"\t{\n"
	"\t   theNameElement[0].value=\"javascript filled in this field  \" + "
	"anInteger +\" times\"; \n"
	"\t}\n"
	"    myWindowsDoc.close();\n"
	"    //myPopupWindow.close();\n"
	"}\n";


static rpItem Pgsimple_javascript_newwin_Items[] = { 
	{ eRpItemType_DataZeroTerminated, (void *) &Pgsimple_javascript_newwin_Item_1 }, 
	{ eRpItemType_DataZeroTerminated, (void *) &Pgsimple_javascript_newwin_Item_2 }, 
	{ eRpItemType_DataZeroTerminated, (void *) &Pgsimple_javascript_newwin_Item_3 }, 
	{ eRpItemType_LastItemInList } 
};


rpObjectDescription Pgsimple_javascript_newwin = {
	"/simple_javascript_newwin.js",
	Pgsimple_javascript_newwin_Items,
	(rpObjectExtensionPtr) 0,
	(Unsigned32) 0,
	kRpPageAccess_Unprotected,
	eRpDataTypeJs,
	eRpObjectTypeDynamic
};

#endif	/* RomPagerServer */
