external

php file send variable to .js external file

こ雲淡風輕ζ 提交于 2019-12-12 01:13:38
问题 From jquery file to php: $.post('http://botk-online.com/play2.php', { 'rate': Pontuacao.misses }); How to modyficate this code to pass $data variable from php file to js external file and read it value. 回答1: PHP <?php $result = array('data' => 'this is some data'); echo json_encode($result); Javascript: $.ajax({ url: 'http://botk-online.com/play2.php', type: 'post', data: { rate: Pontuacao.misses }, dataType: 'json', success: function(json) { alert('Data is: '+json['data']); // Alerts: 'Data

Executing external Java program from a webapp

感情迁移 提交于 2019-12-12 00:50:29
问题 I am trying to call an external Java class file from a servlet running on Tomcat 6, Windows 7, 64bit . There are already some threads on this subject around, but none are really helping me. Fyi, I have successfully been able to do this if I run it from the shell directly. Im using a ProcessBuilder to execute the command like this ProcessBuilder bp = new ProcessBuilder("cmd.exe","/C","java", "TheExternalClass", "ParameterA" }); I'm also consuming the errorStream and inputStream from the

fileReference browse from js, simulate keypress in flash workaround

99封情书 提交于 2019-12-11 23:37:51
问题 I am trying to call fileReference.browse from outside the flash SWF, i read some articles that said normally it's imposible due to Flash 10 security stuff.. so i was wondering isnt it posible to send a command from js to flash which will simulate a keypress inside the flash, which (this keypress) will trigger the fileReference. Thank you in advance, Daniel! 回答1: It's impossible (it would create quite a serious security risk). You can confirm this by checking any uploader module out there that

Loading an external swf - dimensions not correct

人走茶凉 提交于 2019-12-11 23:18:31
问题 I have a main swf file. It has a simple empty movieclip with instance name mc_external_swf. Now I use the document class to load an external swf file. The external file loads and is visible, but its dimensions are not fitting inside the movieclip conatiner, some of the stuff from the external swf is overlapping outside of the movieclip container. Look in the image below. Here is the code used to load the external swf file. var _swfLoader:Loader; var _swfContent:MovieClip; function goToPlay(e

Limit number of Characters entered for Link Title Field in General Link

一世执手 提交于 2019-12-11 21:27:31
问题 Can we limit number of characters that a content author can enter in the Link Title Field for general link for both Internal and External Link as shown below Thanks in Advance, 回答1: I have yet to find a way to set this per template-field but I managed to add a MaxLength on the input in this file: sitecore\shell\Applications\Dialogs\ExternalLink\ExternalLink.xml <Edit ID="Title" Width="100%" MaxLength="20" /> Edit: new solution to enable per template-field maxlength I dug a bit further and

Refresh external loaded javascript files

冷暖自知 提交于 2019-12-11 20:36:14
问题 I have a number of js files that I put in an another folder for ease of updating and for sharing between different pages. These files are called from another page and I use the <script type="text/javascript" src="/js/file.js"></script> notation. This works fine but when I change something in one of these js files, the browser (chrome, firefox, safari) still loads the previous version without the changes, therefore not updating the js file it uses to the updated one. I tried to clean out the

Running external program in matlab and getting output results

こ雲淡風輕ζ 提交于 2019-12-11 19:49:32
问题 I need to write a script that will run external program from matlab and to get output results from it. This program should simulate 20 variants. I made those 20 files in matlab, and I'm able to open external program, but I am not able to write a command that will simulate the files in it. And return me output results. (Input files have .idf extension and output .eso) I tried with these and similar commands for id=1:20; system(sprintf('C:\...\myprogram.exe<''variant_%i.idf',id)); i=1+1; end or

Deploying a project that includes an MDF file to an external computer

谁都会走 提交于 2019-12-11 18:54:05
问题 Basically, I have a Windows Forms Application that includes a dataGridView with the DataSource being an MDF file named VoRteXData.mdf. Now, I need to deploy this to an external location. For my forms code, it includes: private void Form1_Load(object sender, EventArgs e) { SqlConnection sqlCon = new SqlConnection(); sqlCon.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Moderator\Documents\VoRteXData.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";

PHP scandir explorer view to display network share files (file://) via WAMP. Works on localhost but not by IP address

无人久伴 提交于 2019-12-11 18:23:13
问题 Maybe I am being daft, or misunderstanding either WAMP restrictions or browser restrictions, but I have created a PHP file explorer view using the scandir function recursively using Ajax, and it works great to display the files from our network share (\computername\share). I can launch the files when accessing http://localhost, however if from the same localhost machine I access http://[our_external_ip_address] then the files do not open. The path in the status bar displays the same on both

VBS: target fields by div and tabIndex from external .vbs

两盒软妹~` 提交于 2019-12-11 18:09:21
问题 I am struggling to set the values of some very awkward fields on a webpage (one that I do not control), would value a boffin's input, please. I have made a mock up of the webpage, demonstrating the issue. Here goes: <html> <body> <div id="mydiv1" style="position: none; display: block; z-index: 1; width: 800px;"> <p>First div (mydiv1) starts here.</p> <br /> <div id="mydiv2" style="position: none; display: block; z-index: 6; width: 800px;"> <p>Second div (mydiv2) starts here. The following