w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Input multiple iFrame Source from Form Input with http
Try: <html> <head> <link href="style.css" rel="stylesheet" type="text/css" /> <title>Blah</title> <script type="text/javascript"> function SetSrc() { document.getElementById("myIfreme1").src = document.getElementById("txtSRC").value; document.getElementById("myIfreme2").src = document.getElementById("txtSRC").value; } </script> </head> <body> <form> Enter URL: <input type="text" id="txtSRC" /> <input type="button" value="GO" onclick="SetSrc()" /> </form> <iframe id="myIfreme1" src="" frameborder="0" marginwidth="0" height="500" width="480"> </iframe> <iframe id="myIfreme2" src="" frameborder="0" marginwidth="0" height="500" width="840"> </iframe> </body> </html>

Categories : Forms

Creating a MIMO (multiple input multiple output) transfer function system without hardcoding the number of inputs and outputs
I suggest you try realizing each SISO as a state space system, say (Ak, Bk, Ck, Dk), assembling a large diagonal system like A = blkdiag(A1,....) B = blkdiag(B1,...) C = blkdiag(C1,...) D = diag([D1, ....]) and then use ss2tf to compute the transfer function of the augmented system.

Categories : Matlab

NAudio multiple Input to multiple Output
The WaveOut is Synchronous and Exclusive a workaround is to use FunctionCallback to set WaveOut in a Background Thread WaveOutSpeech = new WaveOut(WaveCallbackInfo.FunctionCallback()); WaveOutSpeech.DeviceNumber = device; If you still need synchronous code you must: Run this code in a N Tasks Wait for one of them Control WaveOut flow Here is a sample: private void RunSession(WaveOut WaveOut, WaveStream stream, string match) { played.Add(match); WaveOut.Init(stream); WaveOut.Play(); while (stream.CurrentTime < stream.TotalTime && played.Contains(match)) { Thread.Sleep(100); } WaveOut.Stop(); stream.Dispose(); played.Remove(match); } The 3rd parameter match is the name of the streamed item. This allow stopping loop before end.

Categories : C#

how to get input from multiple users
What you can do is use a loop for each "round" of guessing, and then take 3 inputs per round: import random secretNumber = random.randint(1,99) while True: for player in range(1,4): userNumber = input("Player %s: enter a number between 1 and 99:" % player) if userNumber > secretNumber: print "too high..." elif userNumber < secretNumber: print "too low..." else: print "Player %s, you made the right guess..." % player exit(0)

Categories : Python

multiple prints for each input. Why?
At the end of the switch, you have while ( test = true) You probably want to change that to while ( test == true) Also, take these lines out of the loop: Scanner keyboard = new Scanner(System.in); PrintWriter outputFile = new PrintWriter("gradeReport.txt");

Categories : Java

How to use multiple Input Dialogs (New to Java)
I think the confusion is this: the JOptionPane opens with an input dialog when the option pane closes, whatever you put there is ignored then the code goes to this line sentinel=input.nextInt(); which waits for input from the console (e.g. you need to go back to the console, type the number there and press enter, only then the program will advance, it will block untill you do) I would change it to something like this: String sentinelInput = JOptionPane.showInputDialog("Please enter a sentinel value: "); sentinel= Integer.parseInt(sentinelInput); (repeat for all places where you expect input) An alternative solution is Don't use the JOptionPane, and instead just System.out.println to print the user a request for input (instead of the popup dialog). Then you can and keep the

Categories : Java

How can I allow input of multiple lines of text?
You can use the <textarea> element. <textarea name="yourInputName" rows="4"></textarea> To set a more exact width and height of your textarea you can use CSS and set the height and width properties, instead of using the rows and cols attributes on the element.

Categories : HTML

Display multiple input files in JSP
Change <input type="Submit" value="Submit" name="Submit" onclick="xyz()" /> to <input type="button" value="Submit" name="Submit" onclick="xyz()" /> And do submit inside your javascript function if needed.

Categories : Jsp

multiple input fields with same name. how to save them all into db
This is very easy.... You are posting all the information as an array. You obviously want 3 database entries to be inserted each time. (You could make life simpler by just having three different names) So on the php retrieval page you would do the following. <?php CONNECT TO DATABASE $itemname = $_POST['ball']; $subitem = $_POST['racket']; $quantity = $_POST['racket']; foreach($itemname as $itemname): foreach($subitem as $subitem): foreach($quantity as $quantity): SQL QUERY HERE INSERTING $itemname, $subitem, $quantity endforeach; endforeach; endforeach; Close SQL Connection ?> The above code will shoot off nine sql queries which is the ammount of combinations you could get. You could of course check to see is any value is empty and than skip inserting. Not quite sure wha

Categories : PHP

"Multiple" XML-File (new input should not replace) using c#
Correct me if I'm wrong, but from your code it seems to me that you always create a new dataset, that contains only the new values. Do you read the already existing Todos first? If not, you simply always overwrite your xml file and the previous entries.

Categories : C#

Taking an input as multiple elements instead of only 1
Use the str.split() method: >>> "1 2 3 4 5".split() ['1', '2', '3', '4', '5'] And then convert each string into an integer: >>> map(int, "1 2 3 4 5".split()) [1, 2, 3, 4, 5] >>> [int(c) for c in "1 2 3 4 5".split()] [1, 2, 3, 4, 5]

Categories : Python

Submitting multiple variables with one input
Because they all have the same name attribute, so they set the same variable multiple times and thus the last one is what you always get. Try giving all the hidden inputs unique names, so you can get the membership you want. HTML forms aren't smart enough to pick only the hidden input next to the radio button, they all get posted.

Categories : PHP

jquery sum of multiple input fields in one
do $sumDisplay.val(sum); instead of $sumDisplay.text(sum); WORKING DEMO

Categories : Javascript

If condition for multiple search input in PHP
<?php // Check if form was submitted if(!isset($_POST['search']) { // Display the form } else { // Form was submitted, check if values are empty if(trim($_POST['category1'])=="" ) { // One or more value is empty, do something } else if (trim($_POST['category2'])=="") { // Process form } } ?>

Categories : PHP

Custom multiple select input
Option 1) First, split your f.input into f.label and f.select, so that it would look like: <%=f.label "Multiple Select Input"%> <%= f.select :categories, CategoriesList.all.collect {|x| [x.category, x.id]}, {}, :multiple => true %> Then wrap it with the required div: <div class="control-group"> <%=f.label "Multiple Select Input", :class => "control-label"%> <%= f.select :categories, CategoriesList.all.collect {|x| [x.category, x.id]}, {}, :multiple => true, :class => "controls" %> </div> Option 2) Use twitter-bootstrap-rails gem which would take care of the styling.

Categories : Ruby On Rails

Textbox multiple input types?
no, html inputs have exactly 1 type. now, the value of input type can be different values and you can validate the value. so if you want numeric passwords. make the input type password validate the characters entered into the input are all digits. type is semantic, it controls how the input behaves: passwords = masked input numeric = a number email = valid email address checkbox = yes/no radio = mutually exclusive range = inclusive list of numbers .... the value is an instance of the semantic type.

Categories : C#

JQuery DatePicker Multiple Input
You should apply the datepicker on a normal textbox. You can't have it on a hidden field or three different fields. Because it's a textbox, on the server-side (in your code-behind) you'll only have a string. Use [DateTime.Parse][1], [DateTime.TryParse][2], [DateTime.ParseExact][3] or to get the selected date. If you want to work with the hiddenField and have it in a certain format (so you can parse knowing the format), you can use altField and altFormat: $("#myTextBox").datepicker({ altField: "#myHiddenField", altFormat: "yy-mm-dd" }); If it's an ASP.NET hiddenfield, you might want to use the following selector: altField: "input[id$=myHiddenField]" because in your javascript, you can't know the actual id ASP.NET will generate (unless you construct your javascript in code-

Categories : Javascript

Insert multiple input value in database
You redirect IN your for-loop. It should be like this: if (isset($_POST['url_db'])) { for($i=0;$i<$count;$i++){ $urllink = $_POST['url_db'][$i]; $web = $_POST['web']; $cat = $_POST['cat']; $sql="INSERT INTO $tbl_name (web, urllink, cat) VALUES ('$web', '$urllink', '$cat')"; if(!($result = mysql_query($sql))){ "<BR>Error Adding!!<BR>".mysql_error(); exit(); } } header("location:index.php"); } EDIT: You should really escape your values before inserting them into the query. I suggest this: if (isset($_POST['url_db'])) { for($i=0;$i<$count;$i++){ //escape with mysqli_real_escape_string or PDO::quote() (mysql_real_escape_string) is deprecated $urllink

Categories : PHP

How to change html input multiple value
Try using .setAttribute() Syntax: element.setAttribute(attributename,attributevalue) Your code should look like this document.getElementById("files").setAttribute("multiple","false");

Categories : Javascript

Input outside of multiple form containers
Using a javascript onsubmit, such as is provided in this answer, may be useful to get the data and append it to your form, regardless of the submitted form.

Categories : HTML

Multiple input files in Scalding
try passing all the file names as args to a Class, and then handle them accordingly (loop over the args list, or handle them individually): import com.twitter.scalding.{ Args, Job } class someScalaClass(args: Args) extends Job(args) { args.restrictTo(Set("arg1", "arg2") val someFile = args.getOrElse("arg1").read } im not sure what else to say without more context info, if you could please edit and provide moar details

Categories : Misc

Inner join same multiple times based on input
If you have a variable number of states coming in, then don't use the join method. It'll quickly get out of control. I'd suggest something more like: SELECT PlanID, COUNT(stateID) AS count FROM yourtable WHERE (stateID IN (x,x,x,x,x)) GROUP BY PlanID HAVING count = ($number_of_states_being_searched_for) You'd still have to count up how many states you're looking for, but this will still be a much cheaper query than doing N self-joins.

Categories : Sql Server

Multiple line input string using fgets
#include <stdio.h> #include <string.h> char *mfgets(char * restrict s, int n, FILE * restrict stream){ int ch, i=0; if(n<1)return NULL; if(n==1){ *s = ''; return s; } while(EOF!=(ch=fgetc(stream))){ s[i++] = ch; if(i == n - 1) break; if(ch == ' '){ char next = fgetc(stream); if(next == ' ') break; else ungetc(next, stream); } } s[i] = ''; return i == 0 ? NULL : s; } int main(int argc, char *argv[]){ char str[100]; printf("input (only newline is end) "); mfgets(str, 100, stdin); printf("%s", str); return 0; }

Categories : C

Add multiple values in input field with jQuery
You add strings together with + $("button").on('click', function(e) { e.preventDefault(); var elem = $(this).parent().find('input[name=myinput\[\]]'); elem.val( elem.val() + 'add this' ); }); FIDDLE Now you only need something useful to add ?

Categories : Javascript

Multiple row input in asp.net for editing database table
You are talking about bulk insert/update. You could use XML insertion/updation for this purpose. Get all the data to a DataSet ds variable. Then use ds.GetXml() method to convert the dataset to XML string. Pass this to an XML parameter into SQL server which has the datatype 'XML' INSERT INTO YOURTABLE SELECT V.VOI.value('(.)[1]', 'int') FROM @Input.nodes('/DATASETNAME/DATATABLENAME/') V(VOI) Use this link to learn more

Categories : C#

laravel 4 form submit with multiple input
Why are you using Laravel to use standard PHP functions? That kind of insertion code shouldn't be in the routes.php file, it should be in a controller or a closure. You should probably using an Eloquent model to create items. Furthermore, you can use the Input class to retrieve data that is provided by GET or POST parameters.

Categories : PHP

Multiple styles for input placeholder text
Use classes on your inputs should work. Have you tried the below: HTML: <input type="text" class="myClassNameOne" placeholder="test input" /> <input type="text" class="myClassNameTwo" placeholder="test input" /> CSS: /* WebKit browsers */ input.myClassNameOne::-webkit-input-placeholder { font-size: 16pt; color: #555; } /* Mozilla Firefox 4 to 18 */ input.myClassNameOne:-moz-placeholder { font-size: 16pt; color: #555; } /* Mozilla Firefox 19+ */ input.myClassNameOne::-moz-placeholder { font-size: 16pt; color: #555; } /* Internet Explorer 10+ */ input.myClassNameOne:-ms-input-placeholder { font-size: 16pt; color: #555; } JSFiddle: http://jsfiddle.net/markwylde/fFLL7/1/

Categories : HTML

Loop Multiple Form Input Name to an Array
I assume, you want to print something like that if "E" is selected. Sektor 1 Sektor 2 if so you should use this code segment: foreach( $_GET['ndata'] as $key => $value ) { if($value == 0) { echo "<li><a href="img2.php" target="blank">Sektor ".($key + 1)."</a></li> "; } } because, $_GET['ndata'] will return such array: array(3) { [0]=> string(1) "0" [1]=> string(1) "1" [2]=> string(1) "0" } so above code segment helps you to print correct sector number ($key + 1) by looking $value . if this is not the case, can you write errors you got in detail.

Categories : PHP

Storing User Input and using it through multiple pages
Change order_model.html to this: <form action="process.php" method=post> Model: <input type="text" name="model" size="20" maxlength="20"> <input type="hidden" name="brand" value="<?php if(isset($_POST['brand'])) echo $_POST['brand']; ?>"> <input type="submit" value="Next >>"> </form> Update: as pointed out by Phas1c, in addition to these changes, you might also want to rename order_model.html to order_model.php and make corresponding changes to order.html. You might also want to rename that file to order.php for better consistency.

Categories : PHP

Using multiple InputReaders on a single input stream
Refer this old thread this may help you Usage MultiXMLDocReader xmlReader = new MultiXMLDocReader(new InputStreamReader(anyInputStream)); ObjectA a = (ResponseHeader) u.unmarshal(xmlReader); ObjectB b = (SubmissionProgress) u2.unmarshal(xmlReader);

Categories : Java

Get values of multiple text input fields with different name?
Can you give all the inputs a particular class? If so: var answers = {}; $(".theClass").each(function() { var fieldName = $(this).prop("name"); answers[fieldName] = $(this).val(); }); Now you have an object with the input names and the answers. If you can't give them a class, you could use $("input[type='text']").each(..., but I don't know if you have other text inputs on the page. If you do, maybe you could put them in a div with a certain class and use $(".myDiv").find("input[type='text']").each(...

Categories : PHP

Is there a way to have user input multiple char arrays at once c++
I would change your sample from this: char input [4] ; cin >> input; int i = name_index[name_number(input)]; cout << name[i].fullName; To this: string input; cin >> input; const int i = name_index[name_number(input)]; cout << name[i].fullName; Then you can start using a vector to track multiple inputs: vector<string> inputs; string line; while (cin >> line) { if (line == "done") break; inputs.push_back(line); } for (unsigned int i = 0; i < inputs.size(); ++i) { cout << "inputs[" << i << "]: " << inputs[i] << endl; //const int index = name_index[name_number(inputs[i])]; //cout << name[index].fullName; } You asked for an explanation of line. The line while (cin >> line

Categories : C++

Append from input field to multiple select
I found the solution: <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $().ready(function() { $('#add').click(function() { var option = new Option($('#cellNbr').val(), "value"); $('#select2').append(option); }); $('#remove').click(function() { $('#select2 option:selected').remove(); }); }); </script> </head> <body> <input type="text" id="cellNbr"> <a href="#" id="add">add &gt;&gt;</a><br><br> <select multiple id="select2"></select> <a href="#" id="remove">&lt;&lt; remove

Categories : Jquery

Multiple selections multiplied by an input value jQuery
How about something like this: $(document).ready(function() { $(".dropbox").on("change", function() { var unit = $("#unit").val(); if (unit != "") alert($(this).val() * unit); }); }); If you aren't populating the Unit textbox then I would also consider attaching this to the text box change so it updates when values are typed in. This should give you enough information to adapt it to suit your needs. The key is $("#unit").val();. This gets the value from the associated input / drop down etc based on ID (#) or class (.). To get the company value for instance you would use: $("#comapny").val(); Fiddle Example

Categories : Jquery

changing values of multiple input fields
You have a few things wrong. first, don't use # in getElementById(). second is that div elements doesn't have .value attribute, use innerHTML instead.. the third is that you're trying to access multiple elements by their id instead of creating a class shared by all of them. Code example: HTML: <div id="div1" class="myDiv"></div> <div id="div2" class="myDiv"></div> <div id="div3" class="myDiv"></div> <div id="div4" class="myDiv"></div> <div id="div5" class="myDiv"></div> <div id="div6" class="myDiv"></div> ... jQuery: (tagged in question - easiest example) $(function(){ $('.myDiv').text('something'); });

Categories : Javascript

multiple input parameters from command line in C
To be able to call a function that you have as a string, you have know which name is paired to which function. If all functions take the same arguments, you can have an array of structures with name and function pointer, and then match the name with the correct entry in the table. Otherwise, if the arguments are different you have to have a chain of strcmp calls to call the correct function.

Categories : C

Multiple input of same variable in a line Python
Maybe (although I'm not sure if I understand what you're asking for) n = 0 while n < 3: name = raw_input('What is your name?') if name: print name n + =1 The variable name will change each time, keep in mind.

Categories : Python

How to concatenate multiple pdf as one, each input pdf starting on an even page?
This can be done with pdfjam (which uses TeX; see TeX.SE); the pdfpages package it uses has an option openright which can probably automatically achieve what you want.

Categories : Pdf

Error in Multiple Input Path in MapReduce
What I can tell is you have wrongly imported an incompatible, import org.apache.hadoop.mapred.TextInputFormat; which should have been, import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; Hadoop offers two APIs to create a job, one belongs to org.apache.hadoop.mapred and other is org.apache.hadoop.mapreduce. I think you are using the latter and that's the one you should import.

Categories : Hadoop

why multiple input iterator will cause unexpected result?
This is answered in 24.6.1/1: The class template istream_iterator is an input iterator (24.2.3) that reads (using operator>>) successive elements from the input stream for which it was constructed. After it is constructed, and every time ++ is used, the iterator reads and stores a value of T. So when you create is1 it reads 1. When you create is2 it reads 2 and then you iterate over the rest of the file with is1. Finally you print the single already-extracted value from is2 and then end its iteration.

Categories : C++



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.