Re: Witango-Talk: Javascript to Witango
Ok, now this is making some sense... I seem to remember something like that as well. dynamically specifying the method name caused me some problems in the past... take a look at this code... <@ASSIGN SCOPE=LOCAL NAME=METHODCALLVAR VALUE='<<@CHAR 64>CALLMETHOD OBJECT="ERUBE_AUX" SCOPE="LOCAL" METHOD="<@VAR LOCAL$TEMPVAR>()" METHODTYPE="invoke">'> <@VAR LOCAL$METHODCALLVAR ENCODING=METAHTML> Although I wrote this code a long time ago. I think I did it this way because of the exact same problem you had. the "METHOD" attribute of the callmethod tag doesn't seem to evaluate metatags. So if you look, the approach i use above is to build a string that has the full call method tag, (notice that the method name is in the tempvar variable). Then on the last line, i call the method by outputting that string with Metahtml encoding. By the way <@Char 64> is the "@" symbol Unless you want to do an if/elseif/elseif/elseif type control structure, i think you will have to do something like too Steve. /John Steve Smith wrote: Yes your assumption was correct, I'm not trying to use the server side javascript. I have been able to make some progress, but I'm still not 100% there yet. Here's what I'm trying to do. I have a file called popup.taf which displays kind of a 'More Info' type window on an ecomm site. What I thought I would do, would be to create three methods in the tcf, one for shipping information, one for return information, and one for sales tax information. Then could use the same javascript to create a popup window, call popup.taf inside that window, and pass to it the method that I want to call. What I'm finding now is puzzling. It appears that we cannot use a Witango meta tag as the method name in the <@CALLMETHOD...> tag. I've tried using both a variable <@CALLMETHOD request$product "<@VAR NAME='request$r_popuptype'>" ENCODING=NONE> and an argument <@CALLMETHOD request$product "<@ARG infoArg>" ENCODING=NONE> and both times I received the following: *Error *An error occurred while processing your request: File: *popup.taf *Position: *Results *Class: *Internal *Main Error Number: *-810 */Error getting object's introspection information. Couldn't find info for method <@ARG infoArg> /*Meta Stack Trace: *Line Meta Tag 0013 <@CALLMETHOD local$product "<@ARG infoArg>" ENCODING=NONE> /*The meta stack is interpreted top-to-bottom: the top line shows the inner metatag that caused the error. / I have come up with a different approach, I simply merged the three methods (shipping, returns, and sales_taxes) into one method with a series of IF-ELSEIF actions to check the argument and this works fine. It may also be a cleaner approach. But I'd like to hear a definitive answer on if we can use meta tags in the method name. If we can, what was I doing wrong and if we can't, why? Thanks to all who helped. Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: _http://www.oakbridge.ca_ On Friday, July 2, 2004, at 09:34 AM, John McGowan wrote: Steve, I want to help you out on this, but after reading your post a couple of times I still don't quite understand what you're trying to do. First let me clarify that you are NOT refering to using the server side javascript feature of Witango, right? I you simply want popup.taf to receive the value of info when it generates the code page that shows up in the popup window, you just need to do the following... Return Policy and the javascript code is: function popupwin(file,info,x,y) { var winName = info + "x"; // Move this up before you build the URL {var fileInfo = file +"?<@USERREFERENCEARGUMENT>&infoArg="+info;}; // To pass the variable as an argument to the witango server var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos); } Now, on the server side in popup.taf if you want to access info as a "variable" you just need to do the assignment from an ARG. <@assign scope=request name=r_myvarname value=<@ARG infoArg>> I know this is basically the same response that Gene gave, the only thing that I've added is showing how to access that arg as a variable on the server? If this isn't what you're looking for, try to explain the problem one more time... /John Steve Smith wrote: No, I'm still waiting for an answer. I have created a workaround that involved three separate files but I would like to condense that down to one file that can use the value coming from the JavaScr
Re: Witango-Talk: Javascript to Witango
I did, however at first glance I thought it was more than I needed. Perhaps I just didn't read it correctly. Compared to what my final solution was (see earlier post from this morning), was it on the same train of thought? Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA:(416) 606-3885 Fax:(519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web:http://www.oakbridge.ca On Friday, July 2, 2004, at 11:16 AM, Ben Johansen wrote: Did you read my post? Ben Johansen - http://www.pcforge.com Authorized Witango & MDaemon Reseller Available for Witango Developement -Original Message- From:Steve Smith[mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 12:19 AM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: Javascript to Witango No, I'm still waiting for an answer. I have created a workaround that involved three separate files but I would like to condense that down to one file that can use the value coming from the JavaScript parameter. Are you looking for the same thing or do you have a possible solution for me? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca On Thursday, July 1, 2004, at 06:37 PM, Charles Brown wrote: Steve, did you ever get your question answered? Steve Smith wrote: No I think what I'm trying to do is the reverse of what you are describing. I want to take the value of the 'info' parameter that is passed when the javascript is called (i.e. returns) and pass it into the taf that I am calling. I have created a popup.taf that will display shipping information, returns information, and taxes information. I have set up methods for each in my tcf. I want to pass the value that is in 'info' into a Witango variable and use it in the <@CALL...> tag such as: <@CALLMETHOD local$product "<@VAR NAME='request$r_myvarname'>" ENCODING=NONE> so that when the value 'returns' is passed in the 'info' parameter, like so: "javascript:popupwin('popup.taf','returns',750,500);" onMouseOver="window.status='Returns Information'; return true" onMouseOut="window.status=' '; return true">Return Policy I end up with: <@CALLMETHOD local$product "returns" ENCODING=NONE> So another way of asking my question is how to I get the value of what is in 'info' into <@VAR NAME='request$r_myvarname'>? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca On Wednesday, June 30, 2004, at 10:59 AM, Wolf, Gene wrote: When you are creating your VAR, include the value of the variable you want to send to your program and code it as an arg. For example, {var fileInfo = file +"?yMax="+yMax+"&<@USERREFERENCEARGUMENT>";}; Hope this is what you're looking for. -Original Message- From: Steve Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 30, 2004 10:54 AM To: WiTango List Subject: Witango-Talk: Javascript to Witango Forgive my basic level question but how can I pass a javascript variable to Witango? I'm calling a script that creates a popup and when I call it I pass some parameters. I'd like one of those parameters to be a value that I can assign to a Witango variable that will be used within the popup. The calling code is: "javascript:popupwin('popup.taf','returns',750,500);" onMouseOver="window.status='Returns Information'; return true" onMouseOut="window.status=' '; return true">Return Policy and the javascript code is: function popupwin(file,info,x,y) { {var fileInfo = file +"?<@USERREFERENCEARGUMENT>";}; var winName = info + "x"; var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos); } I want to take the value from the 'info' parameter and assign it to a Witango variable. Can somebody point me in the right direction? Thanks,
Re: Witango-Talk: Javascript to Witango
Yes your assumption was correct, I'm not trying to use the server side javascript. I have been able to make some progress, but I'm still not 100% there yet. Here's what I'm trying to do. I have a file called popup.taf which displays kind of a 'More Info' type window on an ecomm site. What I thought I would do, would be to create three methods in the tcf, one for shipping information, one for return information, and one for sales tax information. Then could use the same javascript to create a popup window, call popup.taf inside that window, and pass to it the method that I want to call. What I'm finding now is puzzling. It appears that we cannot use a Witango meta tag as the method name in the <@CALLMETHOD...> tag. I've tried using both a variable <@CALLMETHOD request$product "<@VAR NAME='request$r_popuptype'>" ENCODING=NONE> and an argument <@CALLMETHOD request$product "<@ARG infoArg>" ENCODING=NONE> and both times I received the following: Error An error occurred while processing your request: File: popup.taf Position: Results Class: Internal Main Error Number: -810 Error getting object's introspection information. Couldn't find info for method <@ARG infoArg> Meta Stack Trace: Line Meta Tag 0013 <@CALLMETHOD local$product "<@ARG infoArg>" ENCODING=NONE> *The meta stack is interpreted top-to-bottom: the top line shows the inner metatag that caused the error. I have come up with a different approach, I simply merged the three methods (shipping, returns, and sales_taxes) into one method with a series of IF-ELSEIF actions to check the argument and this works fine. It may also be a cleaner approach. But I'd like to hear a definitive answer on if we can use meta tags in the method name. If we can, what was I doing wrong and if we can't, why? Thanks to all who helped. Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA:(416) 606-3885 Fax:(519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web:http://www.oakbridge.ca On Friday, July 2, 2004, at 09:34 AM, John McGowan wrote: Steve, I want to help you out on this, but after reading your post a couple of times I still don't quite understand what you're trying to do. First let me clarify that you are NOT refering to using the server side javascript feature of Witango, right? I you simply want popup.taf to receive the value of info when it generates the code page that shows up in the popup window, you just need to do the following... ,,"> onMouseOver="window.status='Returns Information'; return true" onMouseOut="window.status=' '; return true">Return Policy and the javascript code is: function popupwin(file,info,x,y) { var winName = info + "x"; // Move this up before you build the URL {var fileInfo = file +"?<@USERREFERENCEARGUMENT>,,">;}; // To pass the variable as an argument to the witango server var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos); } Now, on the server side in popup.taf if you want to access info as a "variable" you just need to do the assignment from an ARG. <@assign scope=request name=r_myvarname value=<@ARG infoArg>> I know this is basically the same response that Gene gave, the only thing that I've added is showing how to access that arg as a variable on the server? If this isn't what you're looking for, try to explain the problem one more time... /John Steve Smith wrote: No, I'm still waiting for an answer. I have created a workaround that involved three separate files but I would like to condense that down to one file that can use the value coming from the JavaScript parameter. Are you looking for the same thing or do you have a possible solution for me? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca On Thursday, July 1, 2004, at 06:37 PM, Charles Brown wrote: Steve, did you ever get your question answered? Steve Smith wrote: No I think what I'm trying to do is the reverse of what you are describing. I want to take the value of the 'info' parameter that is passed when the javascript is called (i.e. returns) and pass it into the taf that I am calling. I have created a popup.taf that will display shipping information, returns information, and taxes information. I have set up methods for each in my tcf. I want to pass the value that is in 'info' into a Witango variable and use it in the <@CALL...> tag such as: <@CALLMETHOD local$product "<@VAR NAME='request$r_myvarname'>" ENCODING=NONE> so that when the value 'returns' is passed in the 'inf
RE: Witango-Talk: Javascript to Witango
Did you read my post? Ben Johansen - http://www.pcforge.com Authorized Witango & MDaemon Reseller Available for Witango Developement -Original Message- From: Steve Smith [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 12:19 AM To: [EMAIL PROTECTED] Subject: Re: Witango-Talk: _javascript_ to Witango No, I'm still waiting for an answer. I have created a workaround that involved three separate files but I would like to condense that down to one file that can use the value coming from the _javascript_ parameter. Are you looking for the same thing or do you have a possible solution for me? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca On Thursday, July 1, 2004, at 06:37 PM, Charles Brown wrote: Steve, did you ever get your question answered? Steve Smith wrote: No I think what I'm trying to do is the reverse of what you are describing. I want to take the value of the 'info' parameter that is passed when the _javascript_ is called (i.e. returns) and pass it into the taf that I am calling. I have created a popup.taf that will display shipping information, returns information, and taxes information. I have set up methods for each in my tcf. I want to pass the value that is in 'info' into a Witango variable and use it in the <@CALL...> tag such as: <@CALLMETHOD local$product "<@VAR NAME='request$r_myvarname'>" ENCODING=NONE> so that when the value 'returns' is passed in the 'info' parameter, like so: "_javascript_:popupwin('popup.taf','returns',750,500);" Information'; return true" '; return true">Return Policy I end up with: <@CALLMETHOD local$product "returns" ENCODING=NONE> So another way of asking my question is how to I get the value of what is in 'info' into <@VAR NAME='request$r_myvarname'>? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca On Wednesday, June 30, 2004, at 10:59 AM, Wolf, Gene wrote: When you are creating your VAR, include the value of the variable you want to send to your program and code it as an arg. For example, {var fileInfo = file +"?yMax="+yMax+"&<@USERREFERENCEARGUMENT>";}; Hope this is what you're looking for. -Original Message- From: Steve Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 30, 2004 10:54 AM To: WiTango List Subject: Witango-Talk: _javascript_ to Witango Forgive my basic level question but how can I pass a _javascript_ variable to Witango? I'm calling a script that creates a popup and when I call it I pass some parameters. I'd like one of those parameters to be a value that I can assign to a Witango variable that will be used within the popup. The calling code is: "_javascript_:popupwin('popup.taf','returns',750,500);" Information'; return true" '; return true">Return Policy and the _javascript_ code is: function popupwin(file,info,x,y) { {var fileInfo = file +"?<@USERREFERENCEARGUMENT>";}; var winName = info + "x"; var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos); } I want to take the value from the 'info' parameter and assign it to a Witango variable. Can somebody point me in the right direction? Thanks, TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
Re: Witango-Talk: Javascript to Witango
Steve, I want to help you out on this, but after reading your post a couple of times I still don't quite understand what you're trying to do. First let me clarify that you are NOT refering to using the server side _javascript_ feature of Witango, right? I you simply want popup.taf to receive the value of info when it generates the code page that shows up in the popup window, you just need to do the following... "_javascript_:popupwin('popup.taf','returns',750,500);" >Return Policy and the _javascript_ code is: function popupwin(file,info,x,y) { var winName = info + "x"; // Move this up before you build the URL {var fileInfo = file +"?<@USERREFERENCEARGUMENT>&infoArg="+info;}; // To pass the variable as an argument to the witango server var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos); } Now, on the server side in popup.taf if you want to access info as a "variable" you just need to do the assignment from an ARG. <@assign scope=request name=r_myvarname value=<@ARG infoArg>> I know this is basically the same response that Gene gave, the only thing that I've added is showing how to access that arg as a variable on the server? If this isn't what you're looking for, try to explain the problem one more time... /John Steve Smith wrote: No, I'm still waiting for an answer. I have created a workaround that involved three separate files but I would like to condense that down to one file that can use the value coming from the _javascript_ parameter. Are you looking for the same thing or do you have a possible solution for me? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca On Thursday, July 1, 2004, at 06:37 PM, Charles Brown wrote: Steve, did you ever get your question answered? Steve Smith wrote: No I think what I'm trying to do is the reverse of what you are describing. I want to take the value of the 'info' parameter that is passed when the _javascript_ is called (i.e. returns) and pass it into the taf that I am calling. I have created a popup.taf that will display shipping information, returns information, and taxes information. I have set up methods for each in my tcf. I want to pass the value that is in 'info' into a Witango variable and use it in the <@CALL...> tag such as: <@CALLMETHOD local$product "<@VAR NAME='request$r_myvarname'>" ENCODING=NONE> so that when the value 'returns' is passed in the 'info' parameter, like so: "_javascript_:popupwin('popup.taf','returns',750,500);" >Return Policy I end up with: <@CALLMETHOD local$product "returns" ENCODING=NONE> So another way of asking my question is how to I get the value of what is in 'info' into <@VAR NAME='request$r_myvarname'>? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca On Wednesday, June 30, 2004, at 10:59 AM, Wolf, Gene wrote: When you are creating your VAR, include the value of the variable you want to send to your program and code it as an arg. For example, {var fileInfo = file +"?yMax="+yMax+"&<@USERREFERENCEARGUMENT>";}; Hope this is what you're looking for. -Original Message- From: Steve Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 30, 2004 10:54 AM To: WiTango List Subject: Witango-Talk: _javascript_ to Witango Forgive my basic level question but how can I pass a _javascript_ variable to Witango? I'm calling a script that creates a popup and when I call it I pass some parameters. I'd like one of those parameters to be a value that I can assign to a Witango variable that will be used within the popup. The calling code is: "_javascript_:popupwin('popup.taf','returns',750,500);" >Return Policy and the _javascript_ code is: function popupwin(file,info,x,y) { {var fileInfo = file +"?<@USERREFERENCEARGUMENT>";}; var winName = info + "x"; var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,sta
Re: Witango-Talk: Javascript to Witango
No, I'm still waiting for an answer. I have created a workaround that involved three separate files but I would like to condense that down to one file that can use the value coming from the JavaScript parameter. Are you looking for the same thing or do you have a possible solution for me? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA:(416) 606-3885 Fax:(519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web:http://www.oakbridge.ca On Thursday, July 1, 2004, at 06:37 PM, Charles Brown wrote: Steve, did you ever get your question answered? Steve Smith wrote: No I think what I'm trying to do is the reverse of what you are describing. I want to take the value of the 'info' parameter that is passed when the javascript is called (i.e. returns) and pass it into the taf that I am calling. I have created a popup.taf that will display shipping information, returns information, and taxes information. I have set up methods for each in my tcf. I want to pass the value that is in 'info' into a Witango variable and use it in the <@CALL...> tag such as: <@CALLMETHOD local$product "<@VAR NAME='request$r_myvarname'>" ENCODING=NONE> so that when the value 'returns' is passed in the 'info' parameter, like so: ,,"> onMouseOver="window.status='Returns Information'; return true" onMouseOut="window.status=' '; return true">Return Policy I end up with: <@CALLMETHOD local$product "returns" ENCODING=NONE> So another way of asking my question is how to I get the value of what is in 'info' into <@VAR NAME='request$r_myvarname'>? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca On Wednesday, June 30, 2004, at 10:59 AM, Wolf, Gene wrote: When you are creating your VAR, include the value of the variable you want to send to your program and code it as an arg. For example, {var fileInfo = file +"?yMax="+yMax+"&<@USERREFERENCEARGUMENT>";}; Hope this is what you're looking for. -Original Message- From: Steve Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 30, 2004 10:54 AM To: WiTango List Subject: Witango-Talk: Javascript to Witango Forgive my basic level question but how can I pass a javascript variable to Witango? I'm calling a script that creates a popup and when I call it I pass some parameters. I'd like one of those parameters to be a value that I can assign to a Witango variable that will be used within the popup. The calling code is: ,,"> onMouseOver="window.status='Returns Information'; return true" onMouseOut="window.status=' '; return true">Return Policy and the javascript code is: function popupwin(file,info,x,y) { {var fileInfo = file +"?<@USERREFERENCEARGUMENT>";}; var winName = info + "x"; var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos); } I want to take the value from the 'info' parameter and assign it to a Witango variable. Can somebody point me in the right direction? Thanks,
Re: Witango-Talk: Javascript to Witango
Steve, did you ever get your question answered? Steve Smith wrote: No I think what I'm trying to do is the reverse of what you are describing. I want to take the value of the 'info' parameter that is passed when the _javascript_ is called (i.e. returns) and pass it into the taf that I am calling. I have created a popup.taf that will display shipping information, returns information, and taxes information. I have set up methods for each in my tcf. I want to pass the value that is in 'info' into a Witango variable and use it in the <@CALL...> tag such as: <@CALLMETHOD local$product "<@VAR NAME='request$r_myvarname'>" ENCODING=NONE> so that when the value 'returns' is passed in the 'info' parameter, like so: HREF="" FFFE,, -->"_javascript_:popupwin('popup.taf','returns',750,500);" FFFE,, -->"window.status='Returns Information'; return true" FFFE,, -->"window.status=' '; return true">Return Policy I end up with: <@CALLMETHOD local$product "returns" ENCODING=NONE> So another way of asking my question is how to I get the value of what is in 'info' into <@VAR NAME='request$r_myvarname'>? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca On Wednesday, June 30, 2004, at 10:59 AM, Wolf, Gene wrote: When you are creating your VAR, include the value of the variable you want to send to your program and code it as an arg. For example, {var fileInfo = file +"?yMax="+yMax+"&<@USERREFERENCEARGUMENT>";}; Hope this is what you're looking for. -Original Message- From: Steve Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 30, 2004 10:54 AM To: WiTango List Subject: Witango-Talk: _javascript_ to Witango Forgive my basic level question but how can I pass a _javascript_ variable to Witango? I'm calling a script that creates a popup and when I call it I pass some parameters. I'd like one of those parameters to be a value that I can assign to a Witango variable that will be used within the popup. The calling code is: HREF="" ,, -->"_javascript_:popupwin('popup.taf','returns',750,500);" ,, -->"window.status='Returns Information'; return true" ,, -->"window.status=' '; return true">Return Policy and the _javascript_ code is: function popupwin(file,info,x,y) { {var fileInfo = file +"?<@USERREFERENCEARGUMENT>";}; var winName = info + "x"; var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos); } I want to take the value from the 'info' parameter and assign it to a Witango variable. Can somebody point me in the right direction? Thanks,
Re: Witango-Talk: Javascript to Witango
No I think what I'm trying to do is the reverse of what you are describing. I want to take the value of the 'info' parameter that is passed when the javascript is called (i.e. returns) and pass it into the taf that I am calling. I have created a popup.taf that will display shipping information, returns information, and taxes information. I have set up methods for each in my tcf. I want to pass the value that is in 'info' into a Witango variable and use it in the <@CALL...> tag such as: <@CALLMETHOD local$product "<@VAR NAME='request$r_myvarname'>" > so that when the value 'returns' is passed in the 'info' parameter, like so: "javascript:popupwin('popup.taf','returns',750,500);" "window.status='Returns Information'; return true" "window.status=' '; return true">Return Policy I end up with: <@CALLMETHOD local$product "returns" > So another way of asking my question is how to I get the value of what is in 'info' into <@VAR NAME='request$r_myvarname'>? Please let me know. Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA:(416) 606-3885 Fax:(519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web:http://www.oakbridge.ca On Wednesday, June 30, 2004, at 10:59 AM, Wolf, Gene wrote: When you are creating your VAR, include the value of the variable you want to send to your program and code it as an arg. For example, {var fileInfo = file +"?yMax="+yMax+"&<@USERREFERENCEARGUMENT>";}; Hope this is what you're looking for. -Original Message- From: Steve Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 10:54 AM To: WiTango List Subject: Witango-Talk: Javascript to Witango Forgive my basic level question but how can I pass a javascript variable to Witango? I'm calling a script that creates a popup and when I call it I pass some parameters. I'd like one of those parameters to be a value that I can assign to a Witango variable that will be used within the popup. The calling code is: "javascript:popupwin('popup.taf','returns',750,500);" "window.status='Returns Information'; return true" "window.status=' '; return true">Return Policy and the javascript code is: function popupwin(file,info,x,y) { {var fileInfo = file +"?<@USERREFERENCEARGUMENT>";}; var winName = info + "x"; var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos); } I want to take the value from the 'info' parameter and assign it to a Witango variable. Can somebody point me in the right direction? Thanks,
RE: Witango-Talk: Javascript to Witango
You need to create a linking variable between the parent and child _javascript_ windows Notice the opener vars in the child window Parent window lookups.taf?_function=&<@USERREFERENCEARGUMENT>&SVal=' + .value,'retvalue','Width=400,Height=300');"> Child window <@ARG _function> Search...
<@ARG _function> Select <@ARG _function>: <@CHOICELIST NAME="Svalue" TYPE=SELECT OPTIONS="@@ResultArray[*,3]" VALUES="@@ResultArray[*,1]" SIZE=5 SELECTEXTRAS='>
"_javascript_:popupwin('popup.taf','returns',750,500);" >"window.status='Returns Information'; return true" >"window.status=' '; return true">Return Policy and the _javascript_ code is: function popupwin(file,info,x,y) { {var fileInfo = file +"?<@USERREFERENCEARGUMENT>";}; var winName = info + "x"; var xMax = screen.width, yMax = screen.height; var xSiz = x, ySiz = y; var xPos = (xMax - xSiz)/2, yPos = (yMax - ySiz)/5; infoFile = window.open(fileInfo,winName,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=" + xSiz + ",height=" + ySiz + ",screenX=" + xPos + ",screenY=" + yPos + ",left=" + xPos + ",top=" + yPos); } I want to take the value from the 'info' parameter and assign it to a Witango variable. Can somebody point me in the right direction? Thanks, Steve Smith Oakbridge Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.oakbridge.ca TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf