Steve, When you link the .js file in a <script src=...> tag, the browser loads the file directly from the path you specify. It doesn't go through witango, so it won't evaluate the <@userreferenceargument> tag.
You're probably safe using cookies for the userreference, but if you really need it in the link you can either pass it to the newApp function, or define the newApp function within a witango file. Dave -----Original Message----- From: Fogelson, Steve [mailto:[EMAIL PROTECTED] Sent: November 25, 2003 12:02 AM To: Witango User Group (E-mail) Subject: Witango-Talk: I had help this last week with page optimization. One of the concepts was to move all javascript to a separate file and link the script with the following statement: <script language="JavaScript" type="text/javascript" src="<@var domain$ThemePath>JavaScripts.js"></script> Abbreviated contents of JavaScript.js are as follows: function newApp(MasterID) { popupWindow = window.open("<@var domain$CGI><@var domain$RootPath>searchapc.taf?Master_ID=" + MasterID + "&<@userreferenceargument>", "newWin", "toolbar=yes, scrollbars=yes, resizable=yes, menubar=yes, status=yes, directories=yes, location=yes, width=700, height=500, screenX=0, screenY=0") } The script is called via a field (Cat_Description) in a table with the following contents: For help in choosing the proper Drive Belt, select <a href="javascript:newApp(3)"><b> The field is displayed in a taf with the following tag: <@var method$CurrentCategory[1,Cat_Description] encoding=metahtml> Now the resulting url is http://www.upnorthsports.com/<@var%20domain$CGI><@var%20domain$RootPath> sear chapc.taf?Master_ID=3&<@userreferenceargument> This worked fine prior to removing the script to a separate file and the script was: http://www.upnorthsports.com/searchapc.taf?Master_ID=1&_UserReference=22 99BE 383C675C823FC2A483 I tried add encoding to the var tags in the script file and the url came out as follows: http://www.upnorthsports.com/<@var%20domain$CGI%20encoding=metahtml><@va r%20 domain$RootPath%20encoding=metahtml>searchapc.taf?Master_ID=3&<@userrefe renc eargument> Didn't help. Any ideas or do I need to move the script back to the original file? Thanks Steve Fogelson Internet Commerce Solutions ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
