prompt

JS Prompt to PHP Variable [closed]

末鹿安然 提交于 2019-11-29 13:06:18
Is this possible? Or do I really need to AJAX JS first? <?php echo'< script type="text/javascript">var eadd=prompt("Please enter your email address");< /script>'; $eadd = $_POST['eadd']; ?> and how can I do that with AJAX? divakar Its not possible. You should use ajax. jQuery was used in the following example: <script> var eadd=prompt("Please enter your email address"); $.ajax( { type: "POST", url: "/sample.php", data: eadd, success: function(data, textStatus, jqXHR) { console.log(data); } }); </script> in php file <?php echo $_POST['data']; ?> meda Ajax (using jQuery ) <script type="text

How can i verify if a process is already running on powershell?

本秂侑毒 提交于 2019-11-29 12:59:07
i have the following code Start-Process -windowstyle minimized "C:/xampp/xampp-control.exe" There is a way to know if process is already running? One way to do this is to get the process ID of the process (use the -PassThru parameter of Start-Process ) and then you can see if the process exists by ID. Example: $processId = (Start-Process notepad -PassThru).Id if ( Get-Process -Id $processId -ErrorAction SilentlyContinue ) { "Process is running" } 来源: https://stackoverflow.com/questions/43642694/how-can-i-verify-if-a-process-is-already-running-on-powershell

Is it possible to extend prompt() object in JAVASCRIPT

不想你离开。 提交于 2019-11-29 11:53:17
To make sure the question more clear, I want to re-implement the prompt object in JAVASCRIPT because i want to get two variables from the user at the same time. If it is possible to extend, re-implement or override this object, please tell me how. If not, do you have better solutions? Thanks. You should use something like http://jqueryui.com/demos/dialog/#modal-form You will need to split your javascript where you have your dialog So if you had function getAndUseUserInfo() { bla1(); bla2(); var x = prompt("Gimme something for bla 3",""); if (x) bla3(x); // this will not be executed until user

How can I style android spinner prompt

老子叫甜甜 提交于 2019-11-29 11:31:31
I have developed one example. Here I have to style a spinner prompt. Please help me. How can I style it? This is my string.xml code: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello World, CustomizedListView!</string> <string name="app_name">CustomizedListView</string> <string name="status_prompt">Choose a Status</string> </resources> This code is used on my main.xml: <Spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_x="106dp" android:layout_y="100dp" android:prompt="@string/status_prompt"

javascript prompt number and continue prompting if answer is wrong

浪尽此生 提交于 2019-11-29 10:22:41
I need prompt the visitor for an integer between 1 and 100 and to continue prompting until a valid number is entered. Here is what I have: <script> var number = parseInt(prompt("Please enter a number from 1 to 100", "")); if (number < 100) { document.write("Your number (" + number + ") is matches requirements", ""); } else if (isNaN(number)) { parseInt(prompt("It is not a number. Please enter a number from 1 to 100", "")); } else { parseInt(prompt("Your number (" + number + ") is above 100. Please enter a number from 1 to 100", "")); } </script> It recognizes the number but fails to re-ask

Run SCRIPT from PL/SQL Block

℡╲_俬逩灬. 提交于 2019-11-29 08:05:06
How to use "START SCRIPT" in pl/sql block ? I want to use something like this declare begin proc(para1,para2); execute immediate 'start prompt1' ; end; / Also I want to know , can i get a value from prompt1 into my PL/SQL block where am calling the script ? Because I need to use the value to perform some operations in the PL/SQL block. It is 2012 2017. Scripts are a clunky and brittle hangover from the last millennium. Oracle has a fantastic range of functionality we can execute in PL/SQL, plus there's Java Stored Procedures, and there's scheduling for starting jobs. Other than running DDL to

How can I respond to prompts in a Linux Bash script automatically? [duplicate]

ぐ巨炮叔叔 提交于 2019-11-29 06:54:30
This question already has an answer here: Have bash script answer interactive prompts 6 answers I am running a script (I can't edit it), and there are three yes/no questions. How can I automatically respond to these questions? I need to answer yes, yes, no (in that order). Try this: echo -e "yes\nyes\nno" | /path/to/your/script Pipe to Standard Input Some scripts can take replies from standard input. One of the many ways to do this would be: $ printf "%s\n" yes yes no | ./foo.sh yes yes no This is simple and easy to read, but relies on how your script internals handle standard input, and if

Javascript prompt() - cancel button to terminate the function

家住魔仙堡 提交于 2019-11-29 06:07:51
问题 I'm calling a Javascript window.prompt() and prompting the user to submit a variable which I compare to another variable (a very basic password protection). The function works great, however, if you click "cancel" on the prompt() window, the function does not simply terminate, but rather compares the variable to an empty string, (which the user opted not to submit by pressing "cancel" instead) resulting in the function continuing to the else{ } portion. My question is, how do I terminate the

Is there any way to create prompt with two input fields?

蹲街弑〆低调 提交于 2019-11-29 05:26:41
Is there any way to create prompt in JavaScript with two input fields ? I tried that code, but it didn't help me : var a = prompt("A : ", ""); var b = prompt("B : ", ""); alert(a + "\n" + b); This is not possible with an OS or native browser window popping up. You will have to create a custom overlay dialog. I would advise using a library like jQuery UI to do this. You can then customize whatever is in the popup. You can view a demo of the dialog here Short of constructing your own using DOM methods and Input elements: No. JavaScript Code <script> $( "#create-user" ) .button() .click(function(

How to respond to password prompt when using SCP in a shell script?

↘锁芯ラ 提交于 2019-11-29 04:13:22
First of all, I am well aware of that there are many of questions regarding this topic. I have read them, but still could figure out an appropriate answer for my situation. I would like to scp the entire ~/cs###/assign1 dir from local to school home dir with a shell script. My question is, is there a way in my script to wait for the password prompt, and then simulate key board event to 'type' in my password? here is a really detailed guide of how to set up the key Are ssh keys not allowed? That would be a better solution. Use "sshpass"! #!/bin/bash sshpass -p "password" scp -r /some/local/path