Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WRITING TO NEW WINDOW

Status
Not open for further replies.

justjim

Programmer
Oct 22, 2002
13
US

I am trying to get a window to open and to then write out the new pages' code that has been dynamically
created and placed in a string.

========== lines below are the last few lines to form the string ===============


if (nncNames.length >= 1){tagStrList += &quot;<tr><td align=center><b> - </b></td><td align=center><b> - </b></td><td align=center> C#-Value </td><td align=center>&quot;+ nncTagValue +&quot;</td></tr>&quot;}

} // this is end of FOR loop to build tags table

tagStrList += &quot;</table><br><center><b><a href='&quot; + rtnLocation + &quot;'>&lt;==BACK~</a></b></center>&quot;
tagStrList += &quot;<form name=newDomTags><textarea align=left cols=120 rows=32 name=origCode value='---Original-Code---'></textarea><textarea align=right cols=120 rows=32 name=domCode value='---Results DOM code goes here---'></textarea></form>&quot;
tagStrList += &quot;</table><br><center><b><a href='&quot; + rtnLocation + &quot;'>&lt;==BACK~</a></b></center>&quot;
tagStrList += &quot;</body></html>&quot;


====== the following is the syntax i am trying to use to open a new window and then write the pages code to it ====

// var OpenWindow=window.open(&quot;&quot;, &quot;HTML-DOM-TAGS&quot;, &quot;height=550,width=800,top=50,left=50&quot;)
// OpenWindow.document.write(tagStrList)
// OpenWindow.document.close()


===== this code works but just overwrites the current page' and is not a separately opened window ======

document.write(tagStrList)
document.newDomTags.origCode.value = srchorig
document.newDomTags.domCode.value = tempstr
============================================================================================================

Does anyone know if possible to write out a variable-string containing the text :

tagStrList += &quot;</table><br><center><b><a href='&quot; + rtnLocation + &quot;'>&lt;==BACK~</a></b></center>&quot;
tagStrList += &quot;</body></html>&quot;
OpenWindow.document.write(tagStrList)

----- rather than writing out each line explicitly ? -- like :

OpenWindow.document.write(&quot;</table><br><center><b><a href='' + rtnLocation + ''>&lt;==BACK~</a></b></center>&quot;)
OpenWindow.document.write(&quot;</body></html>&quot;)

If so, please provide the syntax of that statement.

Thanks, Jim

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top