I recently seen a flash game application that posted a score to a db and there was an iframe that reloaded when the score was updated it was simple but i cant seem to find anything on google, and the page was taken down- how car i achieve this myself?
setTimeout(window.location.reload(), 60000); // Reload after 60 seconds
Maybe they used jQuery/javascript and called the reload function from within the flash
http://www.devcurry.com/2009/07/how-to-refreshreload-page-using-jquery.html
You can manipulate an iFrame with JavaScript, I think something similar could be acheved with AS3 too.
http://www.devarticles.com/c/a/JavaScript/Working-with-IFRAME-in-JavaScript/1/
Related
I'm using the fancybox v2.1.5 for a .net application.
I use the iframe for displaying an aspx-side. Works fine. But today I noticed, that the request to my aspx-page to be displayed in a fancybox was made 4 times. I tested it with another page - same issue.
Here is all what I do:
Change password
This is the easy side, but in another there are some DB-Calls an many lines of code, so it isn't really a good thing because of the performance.
I've only found one very old link: google groups
thx
©a-x-i
I have to mock up a ticking dashboard which is part of a proposal. I am looking for ideas other than the HTTP Refresh option that I am thinking of. The objective is to quickly mock up a look and feel and a working dashboard that ticks over. It only had to provide new content every five seconds. EG there are a bunch of KPI's and their outputs which are percentages have to be updated..
A simple bunch of HTML pages using HTTP Refresh is on my mind. Is there a better option anyoine can think of. EG can HTML5 do this better? Is CSS an option? Thank you in advance for any ideas
I would be going for an ajax call back to the server to get the latest update and then embed that wherever it needs to go - you could set the ajax function on a timer to run every 5 seconds or 1 second or whatever. This way your entire page is not being refreshed, and additionally you can be calling back to the server for a new update even while the previous on is still being rendered.
Downside is that you won't have a page history (i.e. the users will not be able to navigate 'back' to previous ajax updates) unless you explicitly create one; I can't see that being necessary though.
Please post a comment if you need more info about ajax.
I have have a calendar web part that I am displaying on an anonymous SharePoint page.
I would like to be able to make all the links in that web part inactive.
Right now, when I click something it takes me to the login page.
Can't have that, boss doesn't want them to see that page.
So I'd like it if I could just have it do nothing when they click on these links.
Is there a way to deactivate all the 's in just the web part ? (I am thinking CSS)
Or does anyone know another way to do it? Is it possible for me to put some kind of a layer over top of the web part that would essentially intercept or block the clicks?
Thanks for your time!! I am really desperate right now, this was due yesterday
Thanks,
John
you should see if you can do it via CSS or JQuery.
$(document).ready(function() {
$('CLASS OF WP').find('a').hide();
});
Also if you render links from code behind using asp:HyperLink control, you can disable them
then
myLink.Enable = false;
This works in other browsers but not in chrome. I am trying to allow users to upload large files and have an ajax call to update them on the progress of the file upload.
So a unique ID is generated on the client side and added to the action of the form before sending. Then the form is submitted (form only contains a file upload input) and an ajax call is made to get the progress of the upload.
The ajax call goes to another page and uses the ID to lookup the upload.
I am using JQuery 1.5.1. Debugging this and putting something on the error function give me nothing other than "error". Not very helpful. I used Chrome's debugger and it just says failed to load resource xxxx.aspx. xxx.aspx is the URL i needed. Turns out that there seems to be some sort of conflict between the form and the ajax call.
Is there some way to get around this?
you should really look at SWFupload, a great flash based uploader, with concurrent upload and progressbar support. Also it makes it really easy to use server-side, you dont need to implement upload percentage view as it client-side based.
not exactly an answer to your question, but a link to a tool that can really help you drill down and find good error messages, step through javascript code and such would be firebug for Chrome, I got the IE and Chrome versions working and use it very regularly, it has been a life saver and greatly has decreased debugging time:
http://getfirebug.com/releases/lite/chrome/
I would suggest making firebug a common tool in your debugging arsenal.
Use SlickUpload
It is a server control and module that does exactly what you are looking for and takes less than 10 minutes to setup.
Documentation: http://krystalware.com/Products/SlickUpload/Documentation/overview/
I am working on a Flex AS3 application and wanted to add the Facebook Like button inside the app. I am unable to find any API or anything apart from the http://developers.facebook.com/docs/reference/plugins/like code generator.
Any ideas on how this might be accomplished? I am quite new to the recent changes in the Facebook Platform, so any info would be appreciated.
A direct "like" button should not be possible, since Facebook needs to sandbox the whole thing. Both like button formats (iframe and xfbml) use a sandboxed iframe, so nobody but facebook can set "likes" or know anything about the user.
For that to work with Flash, I think facebook would have to provide the button itself as a SWF file so you can load it in Flash. Then it can create a sandbox within itself and thus load the user information safely. Very much like the Chromeless Youtube Player, where it's almost impossible for Flash to access the actual FLV URL (even through introspection).
But even so, I don't think this would provide enough security... realize that you are dealing with very private user information and credentials here.
The only way I know you can "like" stuff through Flash is first doing the whole Facebook Connect thing (several popup windows asking the user for permissions) and then using the API of your choice to do the actual "liking", for instance, with the Graph API:
http://developers.facebook.com/docs/api#publishing
The closest information I could find are these 2 items so far. Hope it helps you in your journey.
Facebook Developer Site: Source
Facebook like button in flash
I hate answering "no" to a question because what I really mean is "I don't know and I can't find a way". I'm sure your Google-fu is as good as mine. All I can see are Facebook forum posts like this where people are asking the same question and no one is answering.
The examples they give of the like button are either embedded in iFrames or using XFBML <fb:like ../> tag. There are no examples of how to like something using their new graph api or either of their old APIs (FQL and REST API).
I had to get a Facebook like button in a html page (looked like a header on the top) and get the swf embedded below. As its a complete flex app in my case, this work around was possible and plausible