I'm trying to make my Gadget html to navigate to another page, but when I try to do it via
window.location = 'http://newurl.com'
It opens the address in a default browser new window.
All I could do so far is to iframe the page in the gadget html (in the flyout html it didn't work), but the site I'm trying to frame has a frame detector and won't allow it.
You can't change the location of a gadget file to a remote location. There are ways to get it working but I don't remember what they are right now (or if they were fixed in Win 7). There's also a security risk - gadgets run with higher privaleges than web pages so they have access to the clipboard, cross domain web requests and can run unsigned ActiveX controls that are not marked as safe for scripting.
If you're willing to use COM, then you can use the WebBrowser control that comes with windows, with certain limitations. You will only be able to communicate with the original domain the control is loaded with, if the user navigates away from this domain access will be blocked by the same origin policy.
<OBJECT ID="WebBrowser1" WIDTH=332 HEIGHT=276
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
<PARAM NAME="ExtentX" VALUE="8784">
<PARAM NAME="ExtentY" VALUE="7303">
<PARAM NAME="ViewMode" VALUE="1">
<PARAM NAME="Offline" VALUE="0">
<PARAM NAME="Silent" VALUE="0">
<PARAM NAME="RegisterAsBrowser" VALUE="0">
<PARAM NAME="RegisterAsDropTarget" VALUE="0">
<PARAM NAME="AutoArrange" VALUE="1">
<PARAM NAME="NoClientEdge" VALUE="1">
<PARAM NAME="AlignLeft" VALUE="0">
</OBJECT>
If you can't live with those limitations, your only option is to create your own ActiveX control that references the WebBrowser control and proxy the commands.
See also, http://support.microsoft.com/kb/176789.
Related
Thinking about getting a mikrotik router for a small project ..
but I wanted to know if the following in any way possible w/ Mikrotik Hotspot feature?
Users connecto to wifi w/o pass
sees the captive portal w/ ads (basically a website remotely hosted) for x seconds
then user is allowed internet access (redirected to google.com)
So basically what i need to do is:
Make microtik allow internet traffic to, and load, a remote webpage as its captive portal (mypage.com/captivePortal.php)
Disallow internet traffic to anything else until x number of seconds, or better yet, when my page triggers the approval
User is then allowed internet access
Going thru the docs I can't find anything about "wait time" for the hotspot feature... But I was thinking it would be nice if I could simply code the captive portal website w/ javascript timeout that would call a function that triggers the Mikrotik router to allow access..
Now since I don't think there's any exposed/public methods i could call that would tell the router to "OK allow access now" on the specific user viewing the Portal, perhaps i could set 1 user/pass for all guests of the router, then have a hidden form of user/pass pre-filled in.. and then have javascript trigger "submit form" when I'm ready?
How am I doing so far? Would love to be guided....
You have to create(or you can download from internet) hotspot folder in MikroTik, and in login.html
<form action="http://10.5.50.1/login" method="post"> //http://10.5.50.1 your server ip
<input type="hidden" name="username" value="admin" />
<input type="hidden" name="password" />
<input type="hidden" name="dst" value="www.yourwebsite.com" />
<input type="hidden" name="popup" value="false" />
<button type="submit">Continue</button>
</form>
<script type="text/javascript">
function doLogin()
{
document.sendin.username.value = document.login.username.value;
document.sendin.password.value =
hexMD5('\011\373\054\364\002\233\266\263\270\373\173\323\234\313\365\337\356');
document.sendin.submit();
}
</script>
run this function on document load it will automatically logged in and will redirect you to this given address in form
on this page you can show advertisment for 5 seconds and after 5 second redirect to google.com
I am using load-balancing in my application hosted in ColdFusion 9 application server and am trying to play an mp4 video. I am displaying the video directly in the browser by clicking an anchor tag. Its working fine in IE, but does not work in Firefox. Firefox displays some junk characters like squares and question marks. There is no video or error message. However, when I run the same application without load-balancing its working fine in FF. Is the issue is due to the load balancing or do I need to set a MIME type?
Note: I am using FF 23.0
I tried with HTML 5 tag with flash fallback support. The code is `
<source src="https://#CGI.SERVER_NAME#/video.mp4" type="video/mp4">
<source src="https://#CGI.SERVER_NAME#/video.webm" type="video/webm">
<!--- Flash player code to play video in HTML5 non support browser --->
<object type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" width="1000" height="600">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="allowFullScreen" value="true">
<param name="wmode" value="transparent">
<param name="flashVars" value="config={'playlist':[{'url':'https://#CGI.SERVER_NAME#/video.mp4','autoPlay':true}]}">
</object>
</video>`
Also I added MIME types in httpd.conf file of Apache server. The MIME types are,
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
Now its working fine.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am wondering if it is possible to get current pubCenter eCPM via some kind of API?
There is a WindowsPhone app called "PubCenter Adviser", and it displays current eCPM for all pubCenter categories.
How did they make it?
Is there any API so I can get the data from?
If solution exists - can someone provide a link to any documentation or similar stuff?
I've searched google and found nothing :(
kind regards,
maciej
How did they make it?
You'd have to ask them.
Is there any API so I can get the data from?
There is no documented API. Still, it's more than likely that an API is available: on the pubcenter page, the graphs are displayed using Silverlight. A quick look at the HTML code of the page shows that the data isn't provided directly to the Silverlight app:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/AdvancedReport.xap"/>
<param name="onerror" value="OnSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="2.0.31005.0" />
<param name="autoUpgrade" value="true" />
<param name="uiculture" value="en-US" />
<param name="culture" value="en-US" />
<param name="initParams" value="LogFlushThreshold=1,TraceLevel=Verbose,LogServiceUrl=/Shared/Services/LogService.svc,LocaleId=en-us,IsMobileOnlyUser=True,WebMobileAlertMessage=Note: Click data is for websites only" />
<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
</a>
</object>
It means that, once loaded, the Silverlight app will call some kind of service to get the data. But to know which service is called and with what parameters, you'll have to reverse-engineer the app (either by decompiling the XAP, or by monitoring the HTTP requests with Fiddler).
I'm developing an application that runs on several domains.
I want to use Google Custom Search on all of them. But GCS requires to provide the domain(s) of websites to search.
Is there any way to specify domains dynamically? In theory I can have thousands of domains, and I don't like the idea of adding all of them manually.
Google provide a service where you can Create a Custom Search Engine on the fly.
To use this you have to have real links on your page and not JavaScript generated links – this is so the remote service can parse your page.
<form name="cse" id="searchbox_demo" action="http://www.google.com/cse">
<input type="hidden" name="cref" value="" />
<input type="hidden" name="ie" value="utf-8" />
<input type="hidden" name="hl" value="" />
<input name="q" type="text" size="40" />
<input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.co.uk/cse/tools/onthefly?form=searchbox_demo&lang="></script>
stackoverflow<br />
serverfault<br />
superuser
Therefore you would need to use some mechanism to dynamically create your site list page (e.g. Ruby, Python, PHP, ASP, JSP etc). From my limited experimentation it appears that the on the fly service aggressively cache your requests for the creation of a custom search engine based on the requesting page (I'm not sure how long the cache lasts). It would therefore appear that you will not be able to add and drop search sites from your list very quickly. As a workaround you could change the url that requested the custom search box for every change.
I created parameters in templateDetails.xml as
<params>
<param name="font-size" value="12" />
</params>
Where will this parameter be visible?
It's visible in the admin back-end when you click on the template in the template list