Sunday, January 1, 2012

On-fly windows in

If we want to create a window with no source file as it's content then we have to implement on-fly window concept(blank windows)This type of windows content is populated completely based on other programmer statements.The blank windows are not useful but by adding the reference to this blank window we can populate dynamic content .Here i will show how to create the blank window using java script.In java script we use same open method but this time with out file name and assign they open statement result to js variable.

on-fly windows in javacript

<form nane="form1">
username=<input name="t1" />
password=<input name="t2" />
<input name="b1" onclick="fly()" type="button" value="Click me" /> </form>
<script language="javascript">
function fly()

x.document.write("<img src=wondor.gif>");
//Here i will given more example script for area is covered on not.This can be use in above fly() method

 x.document.write("<img src="" />");
x.document.write("<img src="" />");
 x.document.write(" Area covered");
 x.document.write("<img src="" />");
 x.document.write(" Area not covered");
The above on fly windows code create a blank window and populate static dynamic and decision content.Area not cover is decision base welcome is static username image is dynamic
Note:If you want to display the result in current window just do a small modification as below
this.document.write instead of x.document.write

No comments: