Javascript and ColdFusion won't pop-up correct web page

Hello,

I'm not sure if I should have put this in the javascript or the CF section but here goes.

I'm using Cold Fusion MX on Win2003 (IIS6) with Oracle 8.0.3 DB on Unix (HPUX9.0.2).

I wrote a page to allow our consumers to search (Verity) the Archives.  This is a collection of documents that are removed from their 1st level place on the site and relegated to a folder of their own to keep them for consumers reference.  The folder structure is:

inetpub/wwwroot/thesite/archive
  archive.cfm
  searcharchive.cfm, etc.

inetpub/wwwroot/thesite/archive/ideaexchange
  bunch of docs.html...
inetpub/wwwroot/thesite/archive/tipsandtricks
  bunch of docs.html...

Our site is constructed of a bunch of <CFINCLUDE> tags and so although it appears to be one page to the browser it's actually about 7 different included pages.  So, I have the following page that was found when someone searched the archive.

http://130.175.58.77/index.cfm?page=archive/ideaexchange/ideas_010199.html
(the page= variable places the following page into the main window below all the navigation)..

So, the person clicks on the link and goes to view the page which is actually appearing through this set of <CFINCLUDE> tags.  I need them to be able to pop-up a separate window with JUST the archived page so that they can print it out and put it in their notebook.  I think that's where the problem starts.  I have this code in the found document.
_______________________________________
<cfset pageToPrint = #page#>
...
<script language="JavaScript1.2">
function newWindow(currentURL)
{
window.open("currentURL", "PrintWindow", "scrollbars=1,resizable=1,width=500,height=500")
}
</script>
</head>
. . .
<td align="right" nowrap class="bodyGeneral">
<cfoutput>
<a href="javascript:newWindow('http://130.175.58.77/#pageToPrint#');">PRINT THIS PAGE</a><br>

#PAGE# - JUST TO TEST THE VALUE (appears correctly in status bar when mouse is over the link)

</cfoutput>
<cfif http_referer CONTAINS "searchArchiveAction">
<p>
<strong><a href=javascript:history.back()>&lt;&lt;back to Archive</a></strong>
</p>      
<cfelse>
<p>
<strong><a href="index.cfm?page=archive/archive.cfm">&lt;&lt;back to Archive</a></strong>
</p>
</cfif>
</td>
________________________________________________

The #page# variable is coming from the URL to the previous page.  It appears to print out correctly as I said in the code comment above.

The problem is that I either get one of two results:

1.  I get a new pop-up window but the entire home page appears.  That is a pop-up window that shows exactly the site and NOT the page I was trying to send the person to.
2.  I get a Page Not Found error.

I think that because the #PAGE# variable shows the correct path I am simply not getting the right information to the javascript.  But it's really strange that as far as I can tell I'm sending the right thing but not being able to display ONLY the archive page.

Thanks in advance for your help.
Jerry



geraldwAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tacobell777Commented:
window.open("currentURL", "PrintWindow", "scrollbars=1,resizable=1,width=500,height=500")

without the quotes around currentURL

window.open(currentURL, "PrintWindow", "scrollbars=1,resizable=1,width=500,height=500")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
geraldwAuthor Commented:
Tacobell777,

Sorry for the delay.  Honestly, it turned out to be something very different - that is it involved using a variable for the page name rather than the IP number, etc.  However, your answer is correct in that I shouldn't have used the double quotes in the question I submitted.  I had the thing working but it was really a matter of telling it which page to show and not the way I was sending the variables.  The double quotes were just one of those last ditch efforts to try something bizarre.  Nonetheless, thanks for reading it and your answer took time so I'm awarding you the points.
Jerry
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.