I'm using a script from javascript that opens a new window and populates the new page. This is great for working with pdfs. I decided to add it to a page that has a CF_TwoSelectsRelated tag and a cf_autofill tag. The variables will not pass in the url(makes sense as the variable isn't defined yet). (The variables do pass fine with submit buttons). I'm wondering if there's a way to get this to work- either sending it through the url or modifying it somehow to be sent with the submit button. Or is there a better way to open a new window with the submit button/is there a way to add the javascript there?
<!---Javascript to set up the new window---> <cfhtmlhead text=" <!--- Javascript function to open popup window ---> <script language=""JavaScript""> <!-- hide from JavaScript-challenged browsers function openAnyWindow(url, name) { var l = openAnyWindow.arguments.length; var w = """"; var h = """"; var features = """"; var resize =""""; for (i=2; i<l; i++) { var param = openAnyWindow.arguments[i]; if ( (parseInt(param) == 0) || (isNaN(parseInt(param))) ) { features += param + ','; } else { (w == """") ? w = ""width="" + param + "","" : h = ""height="" + param; } } features += w + h; var code = ""popupWin = window.open(url, name""; if (l > 2) code += "", '"" + features; code += ""')""; eval(code); } // done hiding --> </script> "> then my link that doesn't work is the following. The TeacherId is used in the CF_TwoSelectsRelated tag (first the user picks a grade than teacher). The school id is the current schoolid- the school that the user is admin at. <a href="javascript:openAnyWindow('index.cfm?fuseaction=GetReportCards&CLIENT.S CHOOLID=<CFOUTPUT>#CLIENT.SCHOOLID#</cfoutput>&TEACHERID=<CFOUTPUT>#TEACHERI D#</cfoutput>', 'remote1', 600, 600, 'scrollbars');">View Class Report Cards</A> Any ideas would be great. thanks, j ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.