3.10.2 Call by Pop-upWindows
This example demonstrates eWebEditor's way of calling by pop-up windows. When there are a lot of form elements in webpage, this method can make the page tidier and speed up the form page's loading
To use this code normally, please set the path of "popup.htm" to eWebEditor's actual saving path.
This example is packed in the example directory of _example/popup.asp(.php/.aspx/.jsp) in compressed system package.
<HTML> <HEAD> <TITLE>eWebEditor : Demo of Calling by Pop-up Windows</TITLE> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <link rel='stylesheet' type='text/css' href='example.css'> </HEAD> <BODY>
<p><b>Navigator : <a href="default.asp">Home</a> > Demo of Calling by Pop-up Windows</b></p> <p>When there are a lot of form elements in webpage, this method can make the page tidier and speed up the form page's loading.</p> <p>Click on "HTML Editor" button, edit some contents in pop-up windows, then click on "save and return" button to preview the effect.</p>
<Script Language=JavaScript> function eWebEditorPopUp(form, field, width, height) { window.open("../popup.htm?style=popup&form="+form+"&field="+field, "", "width="+width+",height="+height+",toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no"); } </Script>
<TABLE border="0" cellpadding="2" cellspacing="1"> <TR> <TD>Content:</TD> <TD> <FORM ACTION="retrieve.asp" METHOD="post" NAME="myform"> <TEXTAREA NAME="myField" COLS="50" ROWS="10" style="width:550px"><i>eWebEditor demo of calling by pop-up windows</i></TEXTAREA><br> <INPUT TYPE="BUTTON" NAME="btn" VALUE="HTML Editor" ONCLICK="eWebEditorPopUp('myform', 'myField', 580, 380)"> </FORM> </TD> </TR> <TR> <TD align=right colspan=2> <INPUT type=submit value="Submit"> <INPUT type=reset value="Reset"> <INPUT type=button value="View Source" onclick="location.replace('view-source:'+location)"> </TD> </TR> </TABLE>
</BODY> </HTML> |