Javascript calls from flash send GET request
I'm having this problem with calling a javascript function
after opening a new URL from flash. Basically what I have going on
in my flash is a button, that when clicked, opens a new URL in
"_blank" sending values to it using a POST request (I have done
this both by using getURL and by using a LoadVars object). This
part works fine, however immediately after it, I have a call to the
javascript function "window.close()" (which I have done both using
getURL and ExternalInterface). This works great in Firefox, but in
IE the POST request seems to be getting interrupted by the
javascript call.
I did a check on the values getting passed using Charles, and
it clearly shows that in IE there is a POST request getting sent to
the page I'm loading in the new window, immediately followed by a
GET request. This get request overrides the POST and for some
reason only appears when making a javascript called. If I change
that javascript call to opening a new URL in _self, for example, it
doesn't show up.
Does anyone have any idea what this is all about? Is there a
solution to this? Why is this happening?!
Thanks for the speedy reply!
I'll just have to double check to make sure that any of the AJAX calls are security checked.
Similar Messages
-
Javascript call from Flash in modal dialog window
Hi.
As I see it's impossible to call Javascript function from
flash in modal dialog (opened with showModalDialog), neither with
getURL nor with ExternalInterface.call.
The only solution I found (in my case it's enough, I only
need to refresh some DIV content in the page from flash) is to
catch error in the modal dialog (Javascript window.onerror) and
then do some operations.
I'm intereseted: is this for security reason on Win XP SP2? I
didn't found any solution, but is there any?Hi Gary,
Actually I'm not very sure that whether it is the VS issue if it still has this issue in a new Environment.
To make sure that it is not the VS setup file issue, one idea is that you could re-download your VS2013 Pre version here:
http://www.visualstudio.com/downloads/download-visual-studio-vs
And then re-install it again. Test the result. Hope that it is not the VS setup file issue.
If still no help, really sorry for that I couldn't repro this issue in my side. But
you can submit this feedback to Microsoft Connect feedback portal:
http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx,Microsoft
engineers will evaluate them seriously. You could share this project in your report, the product team members would troubleshoot and repro this issue.
You will get email notification for update in your connect report.
If you submit it, please share us the link here, so we could get the latest information from the product team members.
Sincerely,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How can I turn off the phone saying "Call from" #/name when getting incoming call.
How can I turn off the phone saying "Call from" #/name when getting incoming call before the ring tone starts? I have a LG accolade
I recommend checking your prompts and alerts to turn this feature off. This may be you "Call Connect" or "Readout" alerts. Listed below are steps to update this feature.
With the flip open, press the Voice Command Key (on the left side of the phone).The Voice Commands feature has several settings which allow you to customize how you want to use it. Access Voice Commands, then press the Right Soft Key[Settings]. Your choices are below:
-Confirm Choices--- Automatic/Always Confirm/ Never Confirm
-Sensitivity--- Control the sensitivity as More Sensitive/ Automatic/Less Sensitive
-Adapt Voice ---If the phone often asks you to repeat voice command,train the phone to recognize your voice patterns.Train Words/ Train Digits
Prompts ---Mode/ Audio Playback/Timeout
* For Mode, set Prompts/ Readout+ Alerts/ Readout/ Tones Only.
* For Audio Playback, set Speakerphone or Earpiece.
* For Timeout, set 5 seconds or 10seconds. -
SCORM Issue, fscommand LMSGetValue call from Flash
Hi all
I'm using fscommands to communicate with the SCORM 1.2
template published from Flash. I need to use fscommand because,
even though I'm working in Flash 8, I'm working in an older file
that was created in Flash 6. And
everything breaks when I try to publish it to version 8.
So I can't use the ExternalInterface method, I have to use
fscommands.
Now my problem is that I'm able to write to the LMS using the
following:
fscommand("LMSSetValue", 'cmi.suspend_data,'+toLMS);
//<--toLMS is a string of text i want saved
fscommand("LMSCommit", "");
BUT I'm not able to retrieve that string later. I try to use:
fscommand("LMSGetValue", "cmi.suspend_data,returnVal");
//<--returnVal is a string declared earlier
Ive also tried a number of variations like:
fscommand("LMSGetValue", 'cmi.suspend_data,'+returnVal);
var fromLMS:String = String(fscommand("LMSGetValue",
"cmi.suspend_data,returnVal"));
textbox.text = String(fscommand("LMSGetValue",
"cmi.suspend_data,returnVal"));
fscommand('LMSGetValue', 'cmi.suspend_data,returnVal');
Nothing has returned anything.
I do know for certain that my main_DoFSCommand in my HTML is
called, it then calls the SCOGetValue, and that successfully calls
the LMSGetValue function. And at each call, the variables being
passed are all as expected.
So this is making me wonder if I'm actually calling it
correctly from Flash in the first place. And with anything
pertaining to SCORM and Flash, I haven't found much out there
pertaining to this, so hopefully someone here can help.
Thank you in advanced
ChrisI have the same problem, and i have send request complementary upgrade (Adobe® Flash® Builder® 4.7 Complimentary Upgrade), and only received a Acrobat change licensed...
I´m working with 4.7 Beta the last mounths, and now all the days have to see "please enter your license". So one problem that you can jump with money (if you have that money..), isn´t a problem. Like a i have license from flex 3, upgrade to flex 4, and upgrade to flex 4.5, i´m going to take de upgrade from 4 standard to 4.7 standard (47,97 euros), and not waste my time and money on calls. So yes, I'll see adobe with another eyes...
Best regards,
José Ramón León -
Executing javascript actions from flash...
I have a flash header with my site navigation in it. I want
to use this great javascript utility (loaded in the head section of
my page) that dynamically loads page content, instead of reloading
the whole page. This works great with static html text links - but
I'm having a hard time getting it to work from flash.
Here is the text link that works great:
<a class="menu" href="javascript:ajaxpage('home1.html',
'contentarea');">test link</a>
Here is my actionscript that doesn't work:
on (press) {
//Goto Webpage Behavior
getURL("javascript:ajaxpage('home1.html', 'contentarea');");
//End Behavior
Any thoughts on what I should do different in my actionscript
to get this javascript to work properly?Try using the built-in ExternalInterface class.
http://livedocs.adobe.com/flash/9.0/main/00001652.html -
Download File Via JavaScript Calls From Website
Hello,
I am currently trying to create a program in c# that will download the file "PracticeProfiles.xls" from this website:
http://fingertips.phe.org.uk/profile/general-practice/data
I need to somehow on navigation to this site pass the javascript calls "showExport();exportData();", which will start the download.
Any help would be greatly appreciated.
Many ThanksThe link has a method which apparently works, however I had to modify a few things to make it compile:
public void DownloadIEFile(Browser browser)
HwndSource source;
source = HwndSource.FromHwnd(WatiN.Core.Native.Windows.NativeMethods.GetWindow(browser.hWnd, 5));
Window windowMain = source.RootVisual as Window;
System.Windows.Automation.TreeWalker trw = new System.Windows.Automation.TreeWalker(System.Windows.Automation.Condition.TrueCondition);
System.Windows.Automation.AutomationElement mainWindow = trw.GetParent(System.Windows.Automation.AutomationElement.FromHandle(browser.hWnd));
source = HwndSource.FromHwnd(WatiN.Core.Native.Windows.NativeMethods.GetWindow(new WindowInteropHelper(windowMain).Handle, 5));
Window windowDialog = source.RootVisual as Window;
// if doesn't work try to increase sleep interval or write your own waitUntill method
Thread.Sleep(1000);
windowDialog.Activate();
System.Windows.Automation.AutomationElementCollection amc = System.Windows.Automation.AutomationElement.FromHandle(new WindowInteropHelper(windowDialog).Handle).FindAll(System.Windows.Automation.TreeScope.Children, System.Windows.Automation.Condition.TrueCondition);
foreach (System.Windows.Automation.AutomationElement element in amc)
// You can use "Save ", "Open", ''Cancel', or "Close" to find necessary button Or write your own enum
if (element.Current.Name.Equals("Save"))
// if doesn't work try to increase sleep interval or write your own waitUntil method
// WaitUntilButtonExsist(element,100);
Thread.Sleep(1000);
System.Windows.Automation.AutomationPattern[] pats = element.GetSupportedPatterns();
// replace this foreach if you need 'Save as' with code bellow
foreach (System.Windows.Automation.AutomationPattern pat in pats)
// '10000' button click event id
if (pat.Id == 10000)
System.Windows.Automation.InvokePattern click = (System.Windows.Automation.InvokePattern)element.GetCurrentPattern(pat);
click.Invoke();
However I am getting null when I try to get the hwnd source, can't see why?
Any Suggestions?
Many Thanks -
We just wrote an AE program and is called through the vanilla SYSTEM PROCESS REQUEST.
It's running on a daily basis ie. with RECURRENCE.
Now we need to call the same program through the regular page run control request.
But we are not how to recognize from inside the AE program if whether it's been called from SYSTEM PROCESS REQUEST or RUN CONTROL REQUEST.
Any of you might have suggestion ?
Any technique or workaround is also appreciated.
THANKS in Advance .This AE pgm is currently automatically called from SYSTEM PROCESS REQUEST on a daily basis to load data from an input file deposited on the server ready for pickup.
We would like to use the same AE pgm ( thus using the same validation and loading logic ) to load the same file format but defined by the user ( via attachment load ) as needed any time during the day.
The user will initiate this AE pgm online ( ie. from a page with his parameters ).
Currently, the pgm now already runs automatically daily and we wish to make it also available to be run by user anytime in the day
To achieve that, we would need to know:
Is the AE pgm ran by (a) the user or by the (b) SYSTEM PROCESS REQUEST so that the program can decide of where to take input file.
(a) Take from an attachment defined by user or (b) from the input file already deposited on the server for pickup
That is the reason why we try to detect who called the AE pgm in order decide where to pickup the input file.
Your help is much appreciated as I do researches but so far haven't gotten a concluded decision.
Thank you.
Message was edited by: Kel_123 -
Stored Procedure call from JDBC sender for Oracle Database
Hi,
I have a requirement to call stored procedure using JDBC sender adapter for retriving data from an Oracle database.
I need to execute first stored procedure call from Querry SQL statement and then trigger second stored procedure call for confirming the succesful retrival of those records from the update SQL statement.
Querries:
1. Can we trigger stored procedure from Update statement of JDBC sender.
2. Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
3. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
Please note PI does not have direct access to main table and hence the need to have separate stored procedure calls.
The PI version is PI 7.11 sp4.
Appreciate your inputs.
Thanks.
Siddhesh S.Tawate>1. Can we trigger stored procedure from Update statement of JDBC sender.
I think not possible using update statement.
> Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
Yes using select query you can call stored procedure.
>. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
No select and update handles in the same session using the same thread so if one transaction fails update should not proceed. -
Can I Capture Javascript Calls from a Loaded SWF?
My scenario:
My main movie (SWF A) loads another movie (SWF B) and plays it.
SWF B is legacy content - I can't modify it.
SWF A is AS3. SWF B might be AS2 or AS3
SWF B makes several calls to a javascript function that would normally reside in the hosting web page.
The javascript calls might use ExternalInterface, or they might use getURL(javascript: xxx) or they might even use fscommand.
My questions:
Is there any way I can intercept the javascript call in movie A? I don't want to have to resort to the browser, so simply using ExternalInterface or similar to pipe the request back into the movie won't work.
If there is a way, how does it vary across the different versions (ie. what's the difference between the child movie being AS2 or AS3, and what's the difference between the various means of calling js?
I'm working on a web deployment, using Flex 4.0. I would be interested also in whether this is possible in Air, or Air Mobile.
Many thanks in advance for any replies.
JcFx
http://www.jcfx.euno, not with all those constraints.
-
Need assistance using coherence calls from an ejb, get exception
I've added some Coherence calls to a simple EJB, that can be called from a plain java client or a jsp. The bean code is attached as well as the call stack for the exceptions, first
for plain java client, second for jsp. Have also run Web installer, this file
is attached too.
Your help would be greatly appreciated.
Thank you,
Ken Rubin<br><br> <b> Attachment: </b><br>javaclientexception.txt <br> (*To use this attachment you will need to rename 209.bin to javaclientexception.txt after the download is complete.)<br><br> <b> Attachment: </b><br>jspexception.txt <br> (*To use this attachment you will need to rename 210.bin to jspexception.txt after the download is complete.)<br><br> <b> Attachment: </b><br>ConverterBean.java <br> (*To use this attachment you will need to rename 211.bin to ConverterBean.java after the download is complete.)<br><br> <b> Attachment: </b><br>coherence-web.xml <br> (*To use this attachment you will need to rename 212.bin to coherence-web.xml after the download is complete.)Hi CP,
I had added C:/tangosol/lib/tangosol.jar;C:/tangosol/lib/coherence.jar
to my classpath originally and could not find the classes. After I copied both jars into
my Sun/AppServer/lib path, the jars were found, yet I
get another exception, which is attached.
My server is Sun Java Application Server 8 Q1.
Thank you,
Ken<br><br> <b> Attachment: </b><br>aftercopyinglibs.txt <br> (*To use this attachment you will need to rename 213.bin to aftercopyinglibs.txt after the download is complete.) -
Calling a javascript function from Flash
Maybe someone out there can help?
I'm trying to set a variable in AS3 and then use an event to call that variable. The links are set in an xml file. I have it working with hyperlinks using navigateToURL, but it's not doing exactly what I want. What I want is to use flash to call the link in the xml file. That link will target a javascript function. There is no need to open a new window. I'm trying to target a particular div on the page. Here's what I have so far:
import flash.net.navigateToURL;
import com.flashloaded.as3.PhotoFlowEvent;
function eventHandler (eo:PhotoFlowEvent):void {
var request:URLRequest = new URLRequest(eo.data.link);
navigateToURL (request,"_self");
<?xml version="1.0" encoding="utf-8"?>
<photos path="images/">
<photo name="photo1" url="1.png" link="javascript:loadContentA();">This is photo 1</photo>
</photos>
I'm thinking there must be a way to set the variable and then use ExternalInterface in flash to do the rest of the work?
any help is greatly appreciated! Cheers!<script type="text/javascript">
function loadContentA(elementSelector, sourceUrl) {
$("#mainContent").load("ad01.html");
</script>
<?xml version="1.0" encoding="utf-8"?>
<photos path="images/">
<photo name="photo1" url="1.png" link="javascript:loadContentA();"></photo>
</photos>
import flash.net.navigateToURL;
import com.flashloaded.as3.PhotoFlowEvent;
function eventHandler (eo:PhotoFlowEvent):void {
var request:URLRequest = new URLRequest(eo.data.link);
navigateToURL (request,"_self");
photoflow.addEventListener (PhotoFlowEvent.CLICK_SELECTED, eventHandler); -
ExternalInterface | How to get called from flash in"xml flavor"?
Hi guys,
I have seen that ActiveX version of Flash Player issues an
event (FlashCall) that describes using xml the function call that
the programmer has called with ExternalInterface.call method.
That xml has the form : <invoke
name="thenameofthefunction"><arguments>...</arguments></invoke>
However, regarding the NPPlugin version, when you make a
"ExternalInterface.call" flash always ask to its container to
"evaluate" a chunk of javascript code.
Also, both flash player versions (ActiveX and NPPlugin)
provide the "CallFunction" method that allows you to pass, in a
single parameter, an xml (in the same form as the one from
"FlashCall" event) describing the actionscript function (and its
arguments) to be called.
I would need to use the "xml flavor" in both directions
(flash to container and container to flash) independently of the
version of Plash Player being used (ActiveX or NPPlugin). The
reason: I do not have any problem parsing and consuming xml and,
however, I do not want to write a javascript interpreter at all.
Does anyone know if there is any possibility to instruct
flash npplugin, in any way, to describe the function calls using
xml instead of javascript?
Any suggestion will be welcome.
Best regards.Hi people,
Finally I've got the answer to my question:
It seems that there is not a feasible way to achieve that
Flash Player (Netscape Plug-in) calls into its wrapper using the
XML pattern that uses its "brother" (ActiveX Flash Player). Thus,
the solution is to interpret the chunk of javascript code in the
best way that is suitable for your (my) needs.
Bellow, for your convenience, is the answer I got from one of
the player architecs.
Thanks a lot to Matt, Gary and all the people that replied to
this topic.
For the Netscape plug-in, I think the easiest thing for him
to do is
just to parse the JS coming from the Player. You don't need a
full
_JavaScript interpreter to do it. The _JavaScript code
generated always
follows the same basic pattern. A parser to transform it into
XML or
any other data structures would probably only be a few
hundred lines. -
Send Get request from a servlet.
Is it possible to send parameters from one servlet to another by using get? I don't want to use Post because the servlet recieving the parameters already has the post method doing something else. Any ideas?
May you can use the RequestDispatcher for your use.
Doc:
public interface RequestDispatcher
Defines an object that receives requests from the
client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server.
The servlet container creates the RequestDispatcher
object, which is used as a wrapper around a server
resource located at a particular path or given by a
particular name.
This interface is intended to wrap servlets, but a
servlet container can create RequestDispatcher objects
to wrap any type of resource.
It send the requset with the same methode to an other resource. You don't have care about the parameter.
Your code could look like this:
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
RequestDispatcher dispatcher = getServletConfig().getServletContext().getRequestDispatcher("/next");
dispatcher.forward(request, response);
}Dietmar -
Javascript call from a Flash button
I have 2 Panel Groups of 5 panels each and I made a Flash
button to controll them.
The following code works if the panels are both open but it
only works the first time.
Then the second time I get an error;
cpg is undefined
CODE:
on(release){
getURL("javascript:cpg.closeAllPanels();cpg2.closeAllPanels()");
This would need to work for both panelgroups even if only one
is open.
I tried using fscommand but not sure how to write it.Hi Doug,
A few questions for you...
<ol>
<li>What functionality are you trying to achieve?</li>
<li>What version of APEX are you using?</li>
<li>When you say 'process', do you mean 'Page Process'?</li>
</ol>
There are definitely ways of submitting the page and triggering a page process to run via JavaScript, but it would be good to better understand your requirements first before proposing a certain solution.
Regards,
Anthony. -
Javascript Call from AS3 Playbar
Platform: Captivate 7
Source: AS3 (hopefully obvious!)
Output: Flash v10
I'm making a one-off version of one of the default playbars. I am trying to make the Exit button call a JavaScript function using the following code:
var btnTipsId = 8;
function onClicked()
import flash.external.ExternalInterface; //Register ExternalInterface
ExternalInterface.call("closeModule()"); //Call JS to close Div
//parent.onPBCBtnClick("exit");
As you can probably see, I don't want to Exit button to close the module the way it normally does. My "closeModule()" function removes a a Div layer that hosts the Captivate. I know this works as we use it in other places. The problem I'm encountering is strictly with getting the Playbar to call that JavaScript instead of it's default "parent.onPBCBtnClick("exit");" function.
Any ideas?Okay, it turns out my original code was totally right with one significant exception.
What was it?
Wait for it ...
Wait for it ...
I was calling the wrong JS function.
<forehead slap>
Maybe you are looking for
-
i got an ipad the other day and changed my apple id on both my iphone4 and ipad, now my icould no longer works due to the fact my old id is still programmed into icould. how do i reset this?
-
How can I prevent my Camera Archive import from being interrupted by timecode breaks?
I'm trying to create Camera Archives from my old mini-dv tapes. I have a Sony Handycam DCR-TRV22 connected via FireWire. When I start the Camera Archive import process, everything is fine for a while but then the process stops with a message about a
-
OOPS A TECHNICAL ERROR OCCURRED
Why must it be so very difficult with all those installations of softwares? Some clever technicians should look at this. Ok it is certainly so that we customers are doing something wrong. But let us know that when we do an installation. And tell us e
-
Need Help with Weblogic Portal WSRP setup on IE10 & above
Hello, My client hosts weblogic Portal server and consumes portlets built in .Net. These work fine in all browsers except for IE10 and above. In IE10 and above, none of the click events seem to work. This does not generate any error in the browser or
-
How to convert an html file to an image
Any Sample Codes.........................