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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open array results in a new window

Status
Not open for further replies.

zoser

Programmer
May 9, 2002
39
US
I wrote a CF page to parse XML and display the contents on the web. The contents are a bunch of news links; I would like the links to open in a new window and reuse the window instead of opening multiple windows. I am really close to getting it to work but whenever I test the page it only opens the same news link over and over again. It doesn't seem to recognize any of the other news items in the array result set. Any one got any tips?

<cfloop index="i" from="1" to="#ArrayLen(SearchResults)#">
<tr>
<td width=400 valign="top" nowrap>
<cfoutput>
<script language="JavaScript" type="text/JavaScript">
function newsFeed()
{
var printdata = window.open("#SearchResults.link.XmlText#",'printdata')
}
</script>
<img src="../images/bullet.gif"> <a href="javascript:newsFeed('#SearchResults.link.XmlText#')" class="style1">#SearchResults.title.XmlText#</a><br>
</cfoutput>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top