Javascript in AIR, bind function undefined
I'm creating an HTML/Javascript based AIR app, but getting the error that 'bind' (a standard JavaScript function) is undefined.
Since bind is being used in a 3rd party library this pretty much kills my hopes of using it unless I wanted to hack through that library, which I don't. I guess this is because the version of WebKit embedded in AIR is not able to support bind for whatever reason (I'm publishing to AIR 13.0)
But I'm wondering if the correct approach is to create an ActionScript based app that uses StageWebView? Is StageWebView using a more updated version of WebKit?
Thanks
if I place all of the commands into a single <script> element, the problems go away but it's quite a limitation to only have one document.write in the document. I plan to eventually script re-formatting of the Metadata data so that I can do something like this:
<p>version name</p>
<p>caption line 1 [return]
caption line 2</p>
<p>aperture: f2.8</p>
becomes:
<h3 class="version_name">version name</h3>
<p>caption line 1</p>
<p>caption line 2</p>
<p class="exif">aperture: f2.8</p>
Similar Messages
-
Hi,
I am trying to compile and build a mxml file and its
app-config.xml file into a AIR installable file from an AIR
application.
Is it possible to access the AIR SDK functions inside an AIR
application.
Please help in this issue.
Regards,
Code....Hi,
This is not possible directly from an AIR application. -
Air-Play functionality on IOS 8
Can you tell me, is it possible to revert from IOS 8.1.3 back to IOS 7 ?
With IOS 7 it was possible to stream a movie on the iphone and play it through the apple TV. Once playing, you could then come out of the browser and leave it playing while you used other apps.
The Air play functionality with IOS 8 is primitive in comparison ! Often, only the sound casts to the TV and if you do get the picture cast too, if you come out of the browser to read a text or such, it stops playing.
Please tell me there is a way to revert to IOS 7 ?
IOS 8 has ruined the Apple TV experience when used in conjunction with iphone!Thanks for your reply. Having already done a little digging, it appears I am not alone.
With IOS 7, when you played a video in the browser there was a button in the bottom right window which gave you the option to play it on Apple TV. This button has now been removed and you must bring up the menu first. Select apple TV, then drop down the menu again. Seems like a step backwards having to perform a number of additional steps to perform the same function. Particularly when it appears to cause problems playing content.
I am blaming IOS 8 as there were never any problems with IOS 7. Now there are numerous issues with it.
Appreciate your input Lawrence. Thanks. -
JavaScript runtime error: 'WebForm_DoPostBackWithOptions' is undefined
Hi, I am using VS2010 and Windows 7. ASP 4. I am testing an application that has been running for 7 years. I usually add modifications that I test every month. Now when I enter test mode in VS2010 and display the first screen
and then hit the first button I receive "JavaScript runtime error: 'WebForm_DoPostBackWithOptions' is undefined". This is a first. I have been racking my brain to remember what I have installed or upgraded in the last month. I believe I may have
updated IE to 11 but I am not sure. Can anyone lead me to the correct direction? Thanks, JimHi,
Welcome to MSDN forum. But I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
It seems that you got the issue when you click the button on the web application manually, if yes, I suggest that you can consult your issue on ASP.NET forum:
http://forums.asp.net/
for better solution and support like this thread with similar issues:
http://forums.asp.net/t/1949713.aspx?Getting+Error+on+IE11+.
Best regards,
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. -
Javascript function undefined error
Hi developers,
I am generating a html file on the fly using a perl program. The main form to be used is generated by a javascript function called loadPage(). loadPage writes the <form> <input type="checkbox"> blah..</form> into the document by using document.write When the checkbox is unchecked, a javascript function called delFromList is called. This function is generated when the html is generated(by the perl program). The problem now is that the form comes out well but when I uncheck the checkbox, the javascript error says delFromList undefined...the same problem occurs for each function call...what am I missing here...any help will be highly appreciated...
tia.
vish
PS: the sample html is inlined below
Content-type: text/html
<html>
<head>
<title>Level Refinement</title>
<script Language=JavaScript>
function delFromList(box) {
blah blah....
function addToList(box) {
blah blah....
....and many other functions...all function that are used are defined....
function loadPage()
document.write("<form name=layout action=\"http://software.somesite.com:81/cgi-bin/parser.pl\" Method=post>");
document.write("<INPUT TYPE=CHECKBOX NAME=\"European\" VALUE=\"European\" onClick=\"if(this.checked){addToRankList(this)}else{delFromRankList(this)}\" CHECKED>European<BR>");
document.write("<INPUT TYPE=CHECKBOX NAME=\"Canadian\" VALUE=\"Canadian\" onClick=\"if(this.checked){addToRankList(this)}else{delFromRankList(this)}\" CHECKED>Canadian<BR>");
document.write("<INPUT TYPE=CHECKBOX NAME=\"Japanese\" VALUE=\"Japanese\" onClick=\"if(this.checked){addToRankList(this)}else{delFromRankList(this)}\" CHECKED>Japanese<BR>");
document.write("<h4>Rank your preferences:<ul type=circle><li> Select the attribute to move<li> Use the \"Move Up\" and \"Move Down\" buttons to move the attribute ranking HIGHER and LOWER respectively.<br></h4>");
document.write("<div align=center><center><table width=100% border=1><tr><td width=30% valign=top align=center>Ranking (High to Low)<br><select name=col1 size=10 onChange=checkSelectCol1()>");
document.write("<option>European");document.write("<option>Canadian");document.write("<option>Japanese");
document.write("</select><p>");
document.write("<INPUT TYPE=button value=\"Move Up\" size=4 onClick=javascript:col1Up(document.layout.col1)>");
document.write("<INPUT TYPE=button value=\"Move Down\" size=4 onClick=javascript:col1Down(document.layout.col1)>");
document.write("</td></tr></table></div><br>");
document.write("<INPUT TYPE=button value=\"Next\">");
document.write("</form>");
</script>
</head>
<body onload="loadPage()">
</body>
</html>As mentioned above javascript and java are 2 different thigns. How ever after looking at your code I would have to guess that you missed a '{' or '}' some where in you actual code. Other than some minor html syntax errors I realy didn't see anything wrong with the code above. But since you didn't post the actual code it hard to say if fixing the few minor errors would make any diff. I'm going with missed curly braces.
Ron_W -
How can I run a .bat file from an html/javascript adobe air installation package?
I write an html/javascript code which works completely true
but when I made the installation package by air-sdk
it dosent work properly
my code is:
<html>
<head>
<title>Hello World</title>
<script type="text/javascript">
function appLoad() {
air.trace("Hello World");
</script>
</head>
<body onLoad="appLoad()">
<h1>Hello World</h1>
<br />
<button onclick="window.open('file:///C:/Windows/notepad.exe')"> Launch notepad </button>
<button onclick="window.open('file:///D:/opennotepad.bat')"> Launch batnote </button>
</body>
</html>
Chapter 5: Creating your first HTML-based AIR application with the AIR SDKSeems to be security violation. You can't execute bat or cmd
-
ExternalInterface Call Javascript Array to AS2 throwing undefined error
I need to pass various (tracking) IDs to a .swf. the IDs are in an array like this =
<script type="text/javascript">
function getImpID() {
var medID={impID:'12345',pvID:'677890',exID:'654332'};
return medID;
function thisMovie(banner) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[banner]
else {
return document[banner]
window.onload=getImpID;
</script>
Right now the AS2 I have is:
import flash.external.*;
System.security.allowDomain(sourceDomain)
var allID:String = ExternalInterface.call.apply("getImpID");
function getIDs(){
var impID:Number;
var pvID:Number;
var exID:Number;
var id_arr:Array = allID.split(",");
_root.id_test.text = impID;
getIDs();
Basically what I need is to split the three ID's from the javascript so that I can append them with various URL clickTags in the AS. Main issue I have is the 'undefined' error, so I'm going out on a limb here that the AS2 I have doesn't do anything right now of value. Biggest head scratcher for me is, if I have the IDs in an array in the javascript (medID) how to get them not only properly into Flash but to separate them into their separate IDs.
Any suggestions would be greatly appreciated.
Thanks!Forgot to reply, your guidance helped in solving the riddle =
actionscript:
function idTag(){
getID = Object(ExternalInterface.call("getImpID"));
getID.toString();
//_root.id_test.text = getID;
idTag();
javascript
<script type="text/javascript">
function getImpID() {
var getID=['impID=8910424942498409873&pvID=8910423767061585831'];
thisMovie("banner").getID;
return getID;
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName]
else {
return document[movieName]
</script>
worked like a charm! -
Embedded .swf's calling javascript from air container
1) I have an html/ajax air app version 1.5.1
2) This air app embeds .swf files from an external source / web server & plays the embdded .swf inside air.
3) The embedded .swf file has a button with an onClick event
function onClick(event:MouseEvent):void {
ExternalInterface.call("someJavascriptMethod()" );
4) The javascript method to be called is already parsed inside the containing Air app and is waiting to be triggered.
5) When the onClick is triggered, the following error is thrown.
Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX,
Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.
at Error$/throwError()
at flash.external::ExternalInterface$/call()
at stress_fla::MainTimeline/onClick()
6) On investigation I found on your livedoc's website that Air does not support the ExternalInterface.call method.
http://livedocs.adobe.com/labs/air/1/aslr/flash/external/ExternalInterface.html
Look for Note: Adobe AIR currently does not support the ExternalInterface class.
7) Does anyone here know how I can get an embbeded .swf file to call javascript methods in the containing air application? I have had a look at the getUrl method but this is now longer supported & even the FS command but still to no avail. I may have a work around by inserting a DOM element over the top of the embedded .swf but this is not an elegant solution & want the .swf to talk directly to the air app container.
All help & comments welcome
Thanks
Kyle
Additionally I have found
http://help.adobe.com/en_US/AIR/1.5/devappsflash/WS5b3ccc516d4fbf351e63e3d118666ade46-7ed4 .html
Using the Html Loader so that Actionscript can call/manipulate the dom objects. At first I was whopee but then I tried the examples listed in the help. The HTMLLoader class is only available in Air. When trying to use import flash.html.HTMLLoader; Flash C4 complains that the Definition cannot be found on compile time & therefore does not export my movie correctly. Has anyone else had this problem or have a solution??
More additions:
The reason the htmlLoader class was not compiling was due to the source action script provided being ActionScript 2.0 - the htmlLoader class is a 3.0 library.
However, after more investigation I have found the current structure.
The air app has an html base/root doc. On periodic javascript events - .swf files are downloaded via
videos = new air.Loader();
netStream = new air.URLRequest(path + file);
videos.load(netStream);
So now I have a html container in my air app that creates a new air.Loader which downloads the external .swf file in which I want an onClick event in the action Script of the downloaded .swf file to call a Javascript method of the parent air container. Simple yea?
Or am I making life to hard for myself? Have been looking at the security snadboxes but I don't see how I can get the .swf file to talk nicely with the outer air container. Please help if able.
Thanks
KyleHi Kenneth,
Your explanation makes sense.
I have a big JavaScript file full of special mathematical functions written by a mathematician who only knows how to program in Javascript.
I need to call the Javascript functions from within an ActionScript library, which obviously has no UI, and thus HTML and/or HTMLLoader are not an option.
Any ideas?
TIA,
mlavie -
Macbook Air binding to AD and OD - HOW?
We recently migrated to an Active Directory structure.
I have bound 50 Macs of various flavors without a hitch to Active Directory. All clients are running 10.5.8 or later.
I have an Open Directory Server on the network bound to AD. I am not binding clients to the OD server, yet simply adding the OD server to clients' Directory Utility for Mac client preference management such as login items, printers, and denying client access to various items. This all works flawlessly.
When I try and add a MacBook Air, I am unable to get the Air added to my groups on the OD Server via WGM as I did for 50 other machines.
My process.
1. Open WGM > Authenticate with Directory Admin
2. Goto Accounts > Computer Groups and access the "Mac Users" group I created for client management.
3. I click on the Members tab and then click the "..." button. All the AD bound computers on the network are listed with their Ethernet ID.
4. I click on the computer I want to add and it populates into my "Mac Users" group.
5. Manage "Mac Users" using the Preferences tab.
I have bound the Macbook Air for AD. It does not show up under the "..." button for me to add it to be managed.
The only information I could find was in this Apple mailing list exchange.
It's for binding a client to OD, which I don't need yet it alludes to my issue with my AD binding. I ran the ifconfig command on the Air, and this is what returned:
MACBOOKAIR (192.168.111.107)
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:9a:00:00:40:e0
inet6 fe80::129a:ddff:feac:40e0%en1 prefixlen 64 scopeid 0x4
inet 192.168.111.105 netmask 0xffffff00 broadcast 192.168.111.255
media: autoselect
status: active
en2: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 58:00:00:00:67:e4
inet6 fe80::5a55:caff:fe23:67e4%en2 prefixlen 64 scopeid 0x5
inet 192.168.111.107 netmask 0xffffff00 broadcast 192.168.111.255
media: autoselect (100baseTX <full-duplex>)
status: active
How do I take this information and use it to get the MacBook Air managed via OD?
Thanks in advance for any assistance.
This image may help explain some things (I edited out part of the MAC addresses for fun) :Hi Daniel
If /Active Directory/All Domains is listed above /LDAPv3/ODServerIPaddress or FQDN in Directory Access on the client machines then it wont really matter whether the authentication and/or contacts is enabled or not as the AD node will be searched first, after the local Net Info node of course. However you should disable the KerberosClient on the server as it can cause problems sometimes.
Enable the Inspector feature in WGM Preferences, select Config and as long as you type something different in the attribute field for KerberosClient then clients won’t even bother looking.
I’m assuming you’ve used Mike Bombich’s article for leveraging OD and AD.
Tony -
How to pass javascript variable to jsp function
i want to check which table header (that is <th> in html )is clicked and based on that a jsp funtion do a query in database and should show records in sorted way according to which column head is clicked.
Table is created in html.
My function is
Vector varray = workcaseid.getWorkcaseId(Long.parseLong(MasterAccountNumber),SelectedColumn);
<table border="1">
<th ><label onClick="<%SelectedColumn="workcase_id";%>">Workcase Id</label></th>
<th><label onClick="<%SelectedColumn="status_id";%>">Status</label></th>
<tr><td>etc</td></tr>
</table>im using bean for business login, following mvc model,and i think mvc is one of good design practice to use.
<jsp:useBean id="workcaseid" scope="session"class="beanFiles.SearchWorkcaseId" />
varray = workcaseid.getWorkcaseId(Long.parseLong(MasterAccountNumber),SelectedColumn);
just tell me whether it is possible to pass javascript variable to jsp variable or not.i can do it by using hidden input type,using form and submit button. -
hi all i wonder if there is a way to to override pressing function keys(f1,f3,f6,f7,....) in adf page for all of the page not just for an input text .
in another way can i make a client listener for a <f:view> or <af:document> so the javascript function will be called when i preses any button in keyboard without focusing in inputtext or a command button
Edited by: user554540 on 22/06/2010 03:03 صHi,
the problem is that keyboard events are only raised from input components. client listeners can only added to ADF Faces components and af:document does not accept keyboard entries. However, I tried
af:document > panelStrechtLayout (center facet) > panelGroupLayout (scroll) and assigned a clientListener. At runtime has the desired effect
Frank
Edited by: Frank Nimphius on Jun 22, 2010 6:27 PM -
HANA Server site JavaScript how to call functions in another .js file? thanks
In HANA Studio, I have created a .js file and a server site javaScript .xsjs file. The .js file and .xsjs file are in the same path .I create function F1() in js file. Then I want to call function F1 in xsjs file. But it always through an error “f1 was used before it was defined”. Any suggestion? Thanks very much
.js file:
.xsjs file:Hi Jim,
Now I have found the method how to use external library. If we want to outsource some of xsjs functions to an external library, XSEngine provides a special format for this, called “.xsjslib”. Then in xsjslib file, we define functions need to be outsourced.
In .xsjs file, we can import a library using the following code:
$.import("<Package_Library_was_deployed>","xsjslib File Name");
The Package_Library_was_deployed please refer to:
Access functions inside library by this path:
$.Package_Library_was_deployed.xsjsFileName.FunctionName(); -
MacBook AIR not functioning correctly
HI everyone,
I have a 2014 MacBook Air running Yosemite and it has been completely functional until Friday morning when it rebooted itself without any input from myself. I was on a webpage and the screen went white before going to the Apple logo and loading bar. It stays on 50% and does not move... Occasionally after powering it down I cab get to the log in screen but cannot actually log in (the beachball of death spins and spins)
I have loaded it in Safe mode but cannot log in, have gone through Disk Utility (Cmd R) and checked the drives are functioning and I have reinstalled the OS. Just now i have done a PRAM check too... I am totally stuck now and if anyone has some advice then I am all ears.
Thanks in advance,
HQ78If you have reinstalled the OS and it still doesn't work, then I'm sorry to tell you it's likely a hardware problem, which needs checking at a Genius Bar in a local Apple Store or at a Certified Service Provider.
Use this page to find one near you: https://locate.apple.com/country
If you have none nearby, I suggest you get it sent to Apple to get repaired. To do so, contact Apple Support here: http://www.apple.com/support/contact/ -
Flex3/air calling functions in embedded swf problem
i'm a newbie to flex so i'm hoping there is going to be a
simple answer to this problem. it's caused a massive headache!
i have been using a swfLoader to load a swf, then triggering
function calls within the swf from flex by using the following in
the script tag of my mxml
var mc:MovieClip = MovieClip(myMP3player.content);
mc.loadMP3Player("file:///"+path, artist, title);
where loadMP3Player is the function in the linked swf and
myMP3player is the id of the swfLoader.
this works great, no problems... but when i change the code
so that the swf is embedded, rather than loaded at runtime the code
above gives a
"ReferenceError:Error #1069 Property loadMP3Player not found"
error
when i try to trigger the function.
i have tried many different ways of referencing and embedding
the swf, all have the same result. i.e. swf loads fine and the flex
project compiles without errors, but i am unable to call the
function. see the code snippet for my details.
any help will be really appreciated.
btw: i need to embed the swf as i am distributing the
finished article as an air app.
-------------------------------------------------code
excerpt--------------------------------------------------1. You must be using the Flex Component Kit for Flash
2. Select the clip in the library that you want to turn into
a component for Flex
3. Use the command (command menu in Flash) to convert the
clip to a Flex Component
4. Publish -> your swc is ready
If you don't have a document class, one is made automatically
and it has the same name as the name of the clip in the library
You can provide a document class. Look at the linkage
identifier for the clip in the library. There you will see what the
name of the class is. Create the class yourself and Publish. Now
add the swc to your library path in Flex. Now you can use the
component as any other component in Flex. So, put the clip on the
stage using mxml or in ActionScript using var myplayer = new
MyPlayer(); -
Binding function pointer to class member fnction
Hi,
I have created a function pointer to class nonstatic member function. But facing some compilation issue. Can someone help on this.
#include "stdafx.h"
#include "iostream"
#include <functional>
using namespace std;
using namespace std::placeholders;
class A
public:
void Fun(void* param, bool b){cout<<"Hi\n";}
typedef void (A::*fptr)(void*,bool);
int _tmain(int argc, _TCHAR* argv[])
fptr obj;
auto f = std::bind(&A::Fun, &obj,_1,_2);
f(NULL,1);
return 0;See some samples about std::bind and std::function
http://en.cppreference.com/w/cpp/utility/functional/bind
http://en.cppreference.com/w/cpp/utility/functional/function
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.
Maybe you are looking for
-
Previously, using firefox 3.6.1, when I opened a secure or encrypted page, the lock icon appeared on that page. When I upgraded to firefox 4.0, the lock icon is no longer appearing when I open a secure page. Please confirm whether this has been remov
-
I'm getting an error message that a file is missing. It suggests that I reinstall the program. If I download iTunes and re-install it, will all of my current songs and downloads still be there?
-
Aperture Script - Can't replicate problem
I wrote this script to rename and File Aperture projects by date : http://www.johneday.com/9/rename-and-file-aperture-projects-by-date . A Mountain Lion user has given me this feedback: OK, so I get the error that the EXIF tag does not have capture y
-
How can I get VBA in Excel to read an Apple Mail email?
Hi I need Excel VBA to be able to read in the contents of an Apple Mail email, with no attachments, from a mailbox I have called "EGP Reports". Can anyone help me? briano216
-
Web Dynpro ABAP - Select Option and ALV Component Usage
Hi, I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial Web Dynpro ABAP - Select Option and ALV Component Usage In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn