Search Results

Search found 71 results on 3 pages for 'inputbox'.

Page 1/3 | 1 2 3  | Next Page >

  • Overcome VBA InputBox Character Limit

    - by Ryan B
    Hi, The current function I use to collect text InputBox can't accept more than 255 characters apparently, and I need to be able to collect more than that? Is there a parameter or different function I can use to increase this limit?

    Read the article

  • Extending the InputBox function for MS Access Forms

    While it's not possible to change the behavior of the InputBox function, this article illustrates how to create your own Access form that includes a text box with its InputMask property set to Password, and then use that form instead of the one generated by the VBA InputBox function.

    Read the article

  • How can I prepopulate an AutoHotkey InputBox prompt?

    - by Ryan
    I'm running AutoHotkey 1.0.48.05 on Windows 7. I have this script: ::sw:: InputBox, providedString, SVN Switch, Switch the current directory to where? if NOT ErrorLevel { Send svn switch %providedString%{Enter} } Return So I if type sw{Enter} in PowerShell (or anywhere), I'll be prompted by a text box. Currently that text box is blank. How can I prepopulate it with a particular string?

    Read the article

  • How to break from loop by the cancel button in inputbox

    - by yael
    The following VB script check the valid IP by Test function if we get OK from the test function then We break from loop ValidIP=OK If not the inputBox ask the question until ValidIP=OK But sometimes I want to exit from loop by cancel button How to break loop by the cancel button (in order to set the ValidIP as OK) Do Until ValidIP=OK IPrange=InputBox("Enter IP address range",,"172.17.202.1-10,192.9.200.1-100") Test IPrange, strPattern Loop

    Read the article

  • Aren't passwords written in inputbox vulnerable through a stack trace ?

    - by loursonwinny
    Hello, I am not a guru of the stack tracing, at all. I even don't know how to get some. Anyway, I am wondering if entering a password entered in an inputbox is safe. Can't it be retrieved by getting a stack trace ? A password entered that way will be found in many places : Caption property of the TEdit Result of the function which creates the inputbox probably, a variable that stores the Result of the InputBox Command etc... If the answer is "yes, it is a vulnerability", then my world collapses :p. What can be done to avoid that vulnerability hole ? NOTE : The InputBox is an example but it can be with a "homebrewed" login prompt. InputBox is a Delphi command but I haven't tagged the question with the Delphi tag because I suppose that the question concerns any language. Thanks for reading

    Read the article

  • when text changed inputbox automatically updates next 6 text boxes

    - by James123
    I have 7 textboxes. If Top 1 textbox(Volume All Years) text changed, text need to be updated in next 6 inputboxes(Latest 2009 Volume to Latest 2014 Volume). I need javascript or Jquery for this. I will write Js textchanged() or focuschange() for top 1 textbox. So what should I write in focuschage() or textchanged methods() <tr id="row12_136" class="RegText"> <td style="width:420px;Padding-right:20px;">Volume All Years</td> <td style="width:420px;Padding-left:0px;"> <input name="12_136" type="text" maxlength="255" id="12_136" tabindex="61" title="Volume All Years" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> </td> </tr><tr id="row12_60" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2009 Volume*</td> <td style="width:420px;Padding-left:0px;"> <input name="12_60" type="text" maxlength="255" id="12_60" tabindex="62" title="Latest 2009 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> <span controltovalidate="12_60" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl47" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span> </td> </tr><tr id="row12_61" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2010 Volume*</td> <td style="width:420px;Padding-left:0px;"> <input name="12_61" type="text" maxlength="255" id="12_61" tabindex="63" title="Latest 2010 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> <span controltovalidate="12_61" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl48" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span> </td> </tr><tr id="row12_62" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2011 Volume*</td> <td style="width:420px;Padding-left:0px;"> <input name="12_62" type="text" maxlength="255" id="12_62" tabindex="64" title="Latest 2011 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> <span controltovalidate="12_62" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl49" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span> </td> </tr><tr id="row12_63" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2012 Volume*</td> <td style="width:420px;Padding-left:0px;"> <input name="12_63" type="text" maxlength="255" id="12_63" tabindex="65" title="Latest 2012 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> <span controltovalidate="12_63" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl50" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span> </td> </tr><tr id="row12_64" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2013 Volume*</td> <td style="width:420px;Padding-left:0px;"> <input name="12_64" type="text" maxlength="255" id="12_64" tabindex="66" title="Latest 2013 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> <span controltovalidate="12_64" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl51" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span> </td> </tr><tr id="row12_65" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2014 Volume*</td> <td style="width:420px;Padding-left:0px;"> <input name="12_65" type="text" maxlength="255" id="12_65" tabindex="67" title="Latest 2014 Volume" class="textbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> <span controltovalidate="12_65" errormessage="* Required!" display="Dynamic" validationGroup="ValidateInsert" id="_ctl52" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">* Required!</span> </td>

    Read the article

  • Input boxes with transparent background are not clickable in IE8

    - by Viliam
    I have an absolutely positioned input box in a form. The input box has transparent background: .form-page input[type="text"] { border: none; background-color: transparent; /* Other stuff: font-weight, font-size */ } Surprisingly, I cannot select this input box by clicking on it in IE8. It works perfectly in Firefox however. The same happens for background: none. When I change the background color: background-color: red; It works fine, so this is issue associated with transparent background. Setting a border makes the input box selectable by clicking on its border only. Is there a workaround to have clickable input box with transparent background working in IE8? Update: Example. Uncomment background-color and the inputbox is selectable. You can also click on the select box, and focus the input box by pressing Shift+Tab. <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head></head><body> <style type="text/css"> input[type="text"] { border: none; background: transparent; /*background-color: blue;*/ } #elem528 { position:absolute; left:155px; top:164px; width:60px; height:20px; } #elem529 { position:absolute; left:218px; top:164px; width:40px; height:20px; } </style> <img src="xxx.png" alt="" width="1000" height="1000"> <input id="elem528" maxlength="7" type="text"> <select id="elem529"></select> </body></html>

    Read the article

  • Sorting an arraylist in Java language

    - by Computeristic
    Hi, I have an arraylist set up. I have input instuctions set up too, so that the user can enter one string, then one integer, then one string (the first name, the age, and the last name). I need to sort the arraylist by the last name. The code I have entered so far is all under the main method:- public static void main(String[] args) { Name Name[] = new Name[50]; int count = 0; for (int i=0; i<50; i++) NewName[i] = new Name(); //ADD NEW TO ARRAYLIST NAME String FName = JOptionPane.showInputDialog("first name"); int age = Integer.parseInt(JOptionPane.showInputDialog("age")); String LName = JOptionPane.showInputDialog("last name"); NewName[count] = new Name(FName, age, LName); count = count++; } //ITEMS SORT BY LAST NAME //CODE FOR SORT GOES HERE

    Read the article

  • when text changed inputbox automatically updates next text boxes?

    - by James123
    Extension to my previous question http://bit.ly/c5yiVM I have 7 textboxes. If Top 1 textbox(Volume All Years) text changed, text need to be updated in next 6 inputboxes(Latest 2009 Volume to Latest 2014 Volume). I need javascript or Jquery for this. I will write Js textchanged() or focuschange() for top 1 textbox. So what should I write in focuschage() or textchanged methods(). I changed little bit in code. Now Html will like below. These textboxes have common CssClass. volumetextbox. Can we use this class and change text in all textboxes those have same CssClass. <tr id="row12_136" class="RegText"> <td style="width:420px;Padding-right:20px;">Volume All Years</td> <td style="width:420px;Padding-left:0px;"> <input name="12_136" type="text" maxlength="255" id="12_136" tabindex="61" title="Volume All Years" class="volumetextbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> </td> <tr id="row12_60" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2009 Volume</td> <td style="width:420px;Padding-left:0px;"> <input name="12_136" type="text" maxlength="255" id="12_60" tabindex="56" title="Volume All Years" class="volumetextbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> </td> <tr id="row12_61" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2010 Volume</td> <td style="width:420px;Padding-left:0px;"> <input name="12_136" type="text" maxlength="255" id="12_61" tabindex="57" title="Volume All Years" class="volumetextbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> </td> <tr id="row12_62" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2011 Volume</td> <td style="width:420px;Padding-left:0px;"> <input name="12_136" type="text" maxlength="255" id="12_62" tabindex="58" title="Volume All Years" class="volumetextbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> </td> <tr id="row12_63" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2012 Volume</td> <td style="width:420px;Padding-left:0px;"> <input name="12_136" type="text" maxlength="255" id="12_63" tabindex="59" title="Volume All Years" class="volumetextbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> </td> <tr id="row12_64" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2013 Volume</td> <td style="width:420px;Padding-left:0px;"> <input name="12_136" type="text" maxlength="255" id="12_64" tabindex="60" title="Volume All Years" class="volumetextbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> </td> <tr id="row12_65" class="RegText"> <td style="width:420px;Padding-right:20px;">Latest 2014 Volume</td> <td style="width:420px;Padding-left:0px;"> <input name="12_136" type="text" maxlength="255" id="12_65" tabindex="61" title="Volume All Years" class="volumetextbox" OnKeyPress="javascript:FocusChange();" style="width:300px;" /> </td>

    Read the article

  • VB.NET Inputbox - How to identify when the Cancel Button is pressed?

    - by The Sasquatch
    I have a simple windows application that pops up an input box for users to enter in a date to do searches. How do I identify if the user clicked on the Cancel button, or merely pressed OK without entering any data as both appear to return the same value? I have found some examples of handling this in VB 6 but none of them really function in the .NET world. Ideally I would like to know how to handle the empty OK and the Cancel seperately, but I would be totally ok with just a good way to handle the cancel.

    Read the article

  • javascript - document.activeElement

    - by Fernando SBS
    Hello, I have a few inputTextBoxes and I'm using document.activeElement to handle value changes of those inputboxes called by "change()" function of inputBox element. the problem is when I change the value of one of the inputboxes and then click in another inputbox... the function will get the document.activeElement of the new inputbox and will not work... how to make the function "know" that the one that changed was the previous one?

    Read the article

  • RegExpValidator never matches

    - by babyangel86
    Hi, I've got a class that's meant to validate input fields to make sure the value is always a decimal. I've tested the regex here: http://livedocs.adobe.com/flex/3/html/help.html?content=validators_7.html, and it looks like it does the right thing, but in my app, I can't seem to get it to match to a number format. Class Definition: public class DecimalValidator { //------------------------------- ATTRIBUTES public var isDecimalValidator:RegExpValidator; //------------------------------- CONSTRUCTORS public function DecimalValidator() { isDecimalValidator = new RegExpValidator(); isDecimalValidator.expression = "^-?(\d+\.\d*|\.\d+)$"; isDecimalValidator.flags = "g"; isDecimalValidator.required = true; isDecimalValidator.property = "text"; isDecimalValidator.triggerEvent = FocusEvent.FOCUS_OUT; isDecimalValidator.noMatchError = "Float Expected"; } } Setting the source here: public function registerDecimalInputValidator(inputBox:TextInput, valArr:Array):void { // Add Validators var dValidator:DecimalValidator = new DecimalValidator(); dValidator.isDecimalValidator.source = inputBox; dValidator.isDecimalValidator.trigger = inputBox; inputBox.restrict = "[0-9].\\.\\-"; inputBox.maxChars = 10; valArr.push(dValidator.isDecimalValidator); } And Calling it here: registerDecimalInputValidator(textInput, validatorArr); Where textInput is an input box created earlier. Clearly I'm missing something simple yet important, but I'm not entirely sure what! Any help would be much appreciated.

    Read the article

  • Display all the options if nothing is selected

    - by Levani
    I have four level connected dropdown boxes. I can choose something from second dropdown only after I select something from the first one. The third dropdown is also depended on second one and so on. I need to make selection available in second, third and fourth dropdown, even if there isn't selected anything in previous dropdown, but if the selection is made behave as it behaves now. Am I clear? Here is the code: <table width="100%" border="0" cellspacing="1" cellpadding="4"> <!-- *********************** Countries *********************** --> <tr> <td style="width:150px"><?php if($eaconf->ea_loc_srchtype==0) echo "<b>".JText::_('EA_SRCH_STEP')."</b> 1: ";?><?php echo JText::_('EA_OBJ_COUNTRY'); ?></td> <td > <?php $countrylist[] = JHTML::_('select.option', 'no', JText::_('EA_NOT_SELECTED')); $x=0; foreach($countries as $c){ $countrylist[] = JHTML::_('select.option', $c ,JText::_($countrynames[$x])); $x++; } if($eaconf->ea_loc_srchtype==0){ $countrys['src_country'] = JHTML::_('select.genericlist', $countrylist,'src_country',' class="inputbox" style="width:140px" onChange="setStates(this.selectedIndex-1)"', 'value', 'text','0' ); }else{ $countrys['src_country'] = JHTML::_('select.genericlist', $countrylist,'src_country',' class="inputbox" style="width:140px" ', 'value', 'text','0' ); } ?> <?php echo $countrys['src_country'];?> </td> </tr> <!-- *********************** States *********************** --> <tr> <td ><?php if($eaconf->ea_loc_srchtype==0) echo "<b>".JText::_('EA_SRCH_STEP')."</b> 2: ";?><?php echo JText::_('EA_OBJ_STATE'); ?></td> <td > <?php $statelist[] = JHTML::_('select.option', 'no', JText::_('EA_NOT_SELECTED')); foreach($stateslist as $s){ $statelist[] = JHTML::_('select.option', $s ,JText::_($s)); } if($eaconf->ea_loc_srchtype==0){ $thestates['src_state'] = JHTML::_('select.genericlist', $statelist,'src_state',' class="inputbox" style="width:140px" onChange="setDistricts(this.selectedIndex-1)"', 'value', 'text','0' ); }else{ $thestates['src_state'] = JHTML::_('select.genericlist', $statelist,'src_state',' class="inputbox" style="width:140px" ', 'value', 'text','0' ); } ?> <?php echo $thestates['src_state'];?> </td> </tr> <!-- *********************** Districts ******************** --> <tr> <td > <?php if($eaconf->ea_loc_srchtype==0) echo "<b>".JText::_('EA_SRCH_STEP')."</b> 3: ";?><?php echo JText::_('EA_OBJ_DISTRICT'); ?> </td> <td > <?php $districtlist[] = JHTML::_('select.option', 'no',JText::_('EA_NOT_SELECTED')); foreach($districtslist as $dist){ $districtlist[] = JHTML::_('select.option', $dist ,JText::_($dist)); } if($eaconf->ea_loc_srchtype==0){ $thedistrict['src_district'] = JHTML::_('select.genericlist', $districtlist,'src_district',' class="inputbox" style="width:140px" onChange="setTowns(this.selectedIndex-1)"', 'value', 'text','0' ); }else{ $thedistrict['src_district'] = JHTML::_('select.genericlist', $districtlist,'src_district',' class="inputbox" style="width:140px" ', 'value', 'text','0' ); } ?> <?php echo $thedistrict['src_district'];?> </td> </tr> <!-- *********************** Towns ************************* --> <tr> <td ><?php if($eaconf->ea_loc_srchtype==0) echo "<b>".JText::_('EA_SRCH_STEP')."</b> 4: ";?><?php echo JText::_('EA_OBJ_TOWN'); ?></td> <td > <?php $townlist[] = JHTML::_('select.option', 'no',JText::_('EA_NOT_SELECTED')); foreach($townslist as $town){ $townlist[] = JHTML::_('select.option', $town ,JText::_($town)); } if($eaconf->ea_loc_srchtype==0){ $towns['src_town'] = JHTML::_('select.genericlist', $townlist,'src_town',' class="inputbox" style="width:140px" ', 'value', 'text','0' ); }else{ $towns['src_town'] = JHTML::_('select.genericlist', $townlist,'src_town',' class="inputbox" style="width:140px" ', 'value', 'text','0' ); } ?> <?php echo $towns['src_town'];?> </td> </tr> </table> And the javascript: function setStates(scountry) { sel_state = document.easearch.elements["src_state"]; sel_town = document.easearch.elements["src_town"]; sel_district = document.easearch.elements["src_district"]; empty("src_state"); if(scountry=='no') { new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_state.options.length; sel_state.options[new_opt] = new_entry; sel_state.options[new_opt].value = "no"; sel_state.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; empty("src_district"); new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_district.options.length; sel_district.options[new_opt] = new_entry; sel_district.options[new_opt].value = "no"; sel_district.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; empty("src_town"); new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_town.options.length; sel_town.options[new_opt] = new_entry; sel_town.options[new_opt].value = "no"; sel_town.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; } else{ new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_state.options.length; sel_state.options[new_opt] = new_entry; sel_state.options[new_opt].value = "no"; sel_state.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; for (x=0;x<States[scountry].length;x++ ){ new_entry = new Option(States[scountry][x]); new_opt = sel_state.options.length; sel_state.options[new_opt] = new_entry; sel_state.options[new_opt].value = x; sel_state.options[new_opt].text = States[scountry][x]; } empty("src_district"); new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_district.options.length; sel_district.options[new_opt] = new_entry; sel_district.options[new_opt].value = "no"; sel_district.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; empty("src_town"); new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_town.options.length; sel_town.options[new_opt] = new_entry; sel_town.options[new_opt].value = "no"; sel_town.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; } } function setDistricts(sstate) { scountry = document.easearch.src_country.selectedIndex-1; // sstate = document.easearch.src_state.value; sel_district = document.easearch.elements["src_district"]; empty("src_district"); if(sstate=='no') { new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_district.options.length; sel_district.options[new_opt] = new_entry; sel_district.options[new_opt].value = "no"; sel_district.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; empty("src_town"); new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_town.options.length; sel_town.options[new_opt] = new_entry; sel_town.options[new_opt].value = "no"; sel_town.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; } else{ new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_district.options.length; sel_district.options[new_opt] = new_entry; sel_district.options[new_opt].value = "no"; sel_district.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; for (x=0;x<Districts[scountry][sstate].length;x++ ){ new_entry = new Option(Districts[scountry][sstate][x]); new_opt = sel_district.options.length; sel_district.options[new_opt] = new_entry; sel_district.options[new_opt].value = x; sel_district.options[new_opt].text = Districts[scountry][sstate][x]; } empty("src_town"); new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_town.options.length; sel_town.options[new_opt] = new_entry; sel_town.options[new_opt].value = "no"; sel_town.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; } } function setTowns(sdistrict) { scountry = document.easearch.src_country.selectedIndex-1; sstate = document.easearch.src_state.value; sel_town = document.easearch.elements["src_town"]; sel_district = document.easearch.elements["src_district"]; empty("src_town"); if(sdistrict=='no') { new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_town.options.length; sel_town.options[new_opt] = new_entry; sel_town.options[new_opt].value = "no"; sel_town.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; empty("src_district"); new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_district.options.length; sel_district.options[new_opt] = new_entry; sel_district.options[new_opt].value = "no"; sel_district.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; } else{ new_entry = new Option("<?php echo JText::_('EA_NOT_SELECTED');?>"); new_opt = sel_town.options.length; sel_town.options[new_opt] = new_entry; sel_town.options[new_opt].value = "no"; sel_town.options[new_opt].text = "<?php echo JText::_('EA_NOT_SELECTED');?>"; for (x=0;x<Towns[scountry][sstate][sdistrict].length;x++ ){ new_entry = new Option(Towns[scountry][sstate][sdistrict][x]); new_opt = sel_town.options.length; sel_town.options[new_opt] = new_entry; sel_town.options[new_opt].value = x; sel_town.options[new_opt].text = Towns[scountry][sstate][sdistrict][x]; } } } function empty(field) { document.easearch.elements[field].options.length = 0; }

    Read the article

  • wxPython: How to handle event binding and Show() properly.

    - by Gopal
    Hi all, I'm just starting out with wxPython and this is what I would like to do: a) Show a Frame (with Panel inside it) and a button on that panel. b) When I press the button, a dialog box pops up (where I can select from a choice). c) When I press ok on dialog box, the dialog box should disappear (destroyed), but the original Frame+Panel+button are still there. d) If I press that button again, the dialog box will reappear. My code is given below. Unfortunately, I get the reverse effect. That is, a) The Selection-Dialog box shows up first (i.e., without clicking on any button since the TopLevelframe+button is never shown). b) When I click ok on dialog box, then the frame with button appears. c) Clicking on button again has no effect (i.e., dialog box does not show up again). What am I doing wrong ? It seems that as soon as the frame is initialized (even before the .Show() is called), the dialog box is initialized and shown automatically. I am doing this using Eclipse+Pydev on WindowsXP with Python 2.6 ============File:MainFile.py=============== import wx import MyDialog #This is implemented in another file: MyDialog.py class TopLevelFrame(wx.Frame): def __init__(self,parent,id): wx.Frame.__init__(self,parent,id,"Test",size=(300,200)) panel=wx.Panel(self) button=wx.Button(panel, label='Show Dialog', pos=(130,20), size=(60,20)) # Bind EVENTS --> HANDLERS. button.Bind(wx.EVT_BUTTON, MyDialog.start(self)) # Run the main loop to start program. if __name__=='__main__': app=wx.PySimpleApp() TopLevelFrame(parent=None, id=-1).Show() app.MainLoop() ============File:MyDialog.py=============== import wx def start(parent): inputbox = wx.SingleChoiceDialog(None,'Choose Fruit', 'Selection Title', ['apple','banana','orange','papaya']) if inputbox.ShowModal()==wx.ID_OK: answer = inputbox.GetStringSelection() inputbox.Destroy()

    Read the article

  • WinForms Dynamic Label

    - by tolga
    I am creating dynamic labels and letting users change attributes of the labes like backcolor and so by sending unicode. However I don't know how to check if the label exists therefore I can't manipulate the dynamicly created label. below is my code: if ((InputBox.Text.StartsWith("p")) && (InputBox.Text.EndsWith("}")))// only process if the message starts with p and ends with } { string Message = InputBox.Text; InputBox.Text = "";// Clear the box when done. // Butt1 message line if (Message.StartsWith("plabelt1")) { if (Message.StartsWith("plabelt1_BackColor")) { Message = Message.Substring(19); //labelt1.BackColor = System.Drawing.Color.FromName(Message.Replace("}", "")); } } private void ImageBox_DragDrop(object sender, DragEventArgs e) { //Graphics g = ImageBox.CreateGraphics(); //g.DrawImage((Image)e.Data.GetData(DataFormats.Bitmap), //new Point(e.X - this.Left, e.Y - this.Top - 150)); Point p2 = PointToClient(Cursor.Position); Label buttlbl_ = new Label(); labelCount++; buttlbl_.Name = "labelt" + labelCount.ToString(); buttlbl_.Location = new Point(p2.X, p2.Y); buttlbl_.Size = new System.Drawing.Size(37, 37); buttlbl_.BackColor = System.Drawing.Color.DarkGray; this.Controls.Add(buttlbl_); buttlbl_.BringToFront(); ImageBox.Invalidate(); } } Any suggestions?

    Read the article

  • how to create a 2 column to seperate label and input element in a form

    - by Blankman
    My form looks like: ** <p><label>first name</label><input type=text name=fn /></p> <p><label>last name</label><input type=text name=ln /></p> </div> <div id="rightform"> <p><label>state</label><input type=text name=state /></p> <p><label>city</label><input type=text name=city /></p> </div> ** I want the layout so all the labels line up on the left (with the label text right-aligned), and the input box all lined up, floating to the left. So the form should look like: asdf-label INPUTBOX 123-label INPUTBOX yet-another-label INPUTBOX There will be another form on the right side of the above form (with the id=#rightform) Really confused how to do this properly...

    Read the article

  • How to store double using SharedPrefrences?

    - by user3924167
    I am having trouble storing a double in the phone's memory. What are my other options if this isnt possible. Basically what the code is aiming to do using sharedprefrences is take the stored value of "Alcohol" spending and then add whatever the input is in the editText to it and then store that new value for the next time. Running total of spending on alcohol **Can someone please help with this issue and be detailed where x y & z should go in the project. The user selects from a spinner, which works. public void addInput(){ double dblCostInput = Double.valueOf(inputBox.getText().toString()); String strCategories= spinnerCategories.getSelectedItem().toString(); if(strCategories.equals("Alcohol")) { alcoholSpend = alcoholSpend + dblCostInput; inputBox.setText(""); nextInput(); inputBox.setText("Your Spending on"+strCategories+" is: " +d.format(alcoholSpend)); }

    Read the article

  • problem with ajax post

    - by zurna
    For some weird reason, the codes below are first working, then website is redirecting to the url. I used this code many times before without any problems, please please advise! Test page: http://www.refinethetaste.com/FLPM/?Section=myaccount&SubSection=signup <script type="text/javascript"> $(document).ready(function() { $("[name='submit']").click(function() { $.ajax({ type: "POST", data: $(".form-signup").serialize(), url: "http://www.refinethetaste.com/FLPM/content/myaccount/signup.cs.asp?Process=Add2Member", success: function(output) { $('.form-signup').html(output) }, error: function(output) { $('.form-signup').html(output); } }); }); }); </script> <form method="post" action="http://www.refinethetaste.com/FLPM/content/myaccount/signup.cs.asp?Process=Add2Member" class="form-signup"> <div class="clearfix"> <label for="MembersFullName">Full Name *:</label> <div class="username form-height"> <input id="modlgn_username" type="text" name="MembersFullName" value="" class="inputbox" size="18" /> </div> <label for="MembersEmailAddress">Email Address *:</label> <div class="username form-height"> <input id="modlgn_username" type="text" name="MembersEmailAddress" value="" class="inputbox" size="18" /> </div> <label for="MembersPassword">Password *:</label> <div class="password form-height"> <input id="modlgn_passwd" type="password" name="MembersPassword" class="inputbox" size="18" /> </div> <label for="MembersPasswordc">Password (confirm) *:</label> <div class="password form-height"> <input id="modlgn_passwd" type="password" name="MembersPasswordc" class="inputbox" size="18" /> </div> <div id="inputs"> <input type="checkbox" name="agree" class="checkbox" value="1" /> <label for="agree" class="agree">I agree to User Agreement and Privacy Policy.</label> </div> <div class="clear"> <input type="submit" name="submit" class="button-login png" value="Sign Up" /> </div> </div> <div id="form-login-remember"> <div class="form-indent-top"> <span class="login-text-1">Already Have Account?</span> <a href="?Section=myaccount&SubSection=signin"> Sign In</a> </div> </div> </form>

    Read the article

  • An AuthLogic form is giving me incorrect validation errors -- why?

    - by sscirrus
    Hi everyone, I set up AuthLogic for Rails according to the AuthLogic example: http://github.com/binarylogic/authlogic_example. I can log on successfully to the system, but when accessing users/new.html.erb to register a new user, the form returns the following validation errors: Email is too short (minimum is 6 characters) Email should look like an email address. Login is too short (minimum is 3 characters) Login should use only letters, numbers, spaces, and .-_@ please. Password is too short (minimum is 4 characters) Password confirmation is too short (minimum is 4 characters) None of these errors exist in the data I am entering. # new.html.erb <%= form.label :login, nil, :class => "label" %><br /> <%= form.text_field :login, :class => "inputBox", :name => "login", :type => "text" %><br /> <%= form.label :password, form.object.new_record? ? nil : "Change password", :class => "label" %><br /> <%= form.password_field :password, :class => "inputBox", :name => "password", :type => "text" %><br /> <%= form.label "Confirm password", nil, :class => "label" %><br /> <%= form.password_field :password_confirmation, :class => "inputBox", :name => "password_confirmation", :type => "text" %><br /> <%= form.label :email, nil, :class => "label" %><br /> <%= form.text_field :email, :class => "inputBox", :name => "email", :type => "text" %><br /> # Users controller def new @user = User.new render :layout => "forms" end I think the problem is that the data isn't being transferred somehow and therefore AuthLogic doesn't think the inputs are sufficient. Do you have any idea why AuthLogic is telling me the data doesn't satisfy its validation?

    Read the article

  • Attaching a Command to the WP7 Application Bar.

    - by mbcrump
    One of the biggest problems that I’ve seen with people creating WP7 applications is how do you bind the application bar to a Relay Command. If your using MVVM then this is particular important. Let’s examine the code that one might add to start with.  <phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True"> <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/icons/appbar.questionmark.rest.png" Text="About"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding DisplayAbout, Mode=OneWay}" /> </i:EventTrigger> </i:Interaction.Triggers> </shell:ApplicationBarIconButton> <shell:ApplicationBar.MenuItems> <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"></shell:ApplicationBarMenuItem> <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"></shell:ApplicationBarMenuItem> </shell:ApplicationBar.MenuItems> </shell:ApplicationBar> </phone:PhoneApplicationPage.ApplicationBar> Everything looks right. But we quickly notice that we have a squiggly line under our Interaction.Triggers. The problem is that the object is not a FrameworkObject. This same code would have worked perfect if this were a normal button. OK. Point has been proved. Let’s make the ApplicationBar support Commands. So, go ahead and create a new project using MVVM Light. If you want to check out the source and work along side this tutorial then click here.  7 Easy Steps to have binding on the Application Bar using MVVM Light (I might add that you don’t have to use MVVM Light to get this functionality, I just prefer it.) 1) Download MVVM Light if you don’t already have it and install the project templates. It is available at http://mvvmlight.codeplex.com/. 2) Click File-New Project and navigate to Silverlight for Windows Phone. Make sure you use the MVVM Light (WP7) Template. 3) Now that we have our project setup and ready to go let’s download a wrapper created by Nicolas Humann here, it is called Phone7.Fx. After you download it then extract it somewhere that you can find it. This wrapper will make our application bar/menu item bindable. 4) Right click References inside your WP7 project and add the .dll file to your project. 5) In your MainPage.xaml you will need to add the proper namespace to it. Don’t forget to build your project afterwards. xmlns:Preview="clr-namespace:Phone7.Fx.Preview;assembly=Phone7.Fx.Preview" 6) Now you can add the BindableAppBar to your MainPage.xaml with a few lines of code.  <Preview:BindableApplicationBar x:Name="AppBar" BarOpacity="1.0" > <Preview:BindableApplicationBarIconButton Command="{Binding DisplayAbout}" IconUri="/icons/appbar.questionmark.rest.png" Text="About" /> <Preview:BindableApplicationBar.MenuItems> <Preview:BindableApplicationBarMenuItem Text="Settings" Command="{Binding InputBox}" /> </Preview:BindableApplicationBar.MenuItems> </Preview:BindableApplicationBar> So your final MainPage.xaml will look similar to this: NOTE: The AppBar will be located inside of the Grid using this wrapper.   <!--LayoutRoot contains the root grid where all other page content is placed--> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <!--TitlePanel contains the name of the application and page title--> <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12"> <TextBlock x:Name="ApplicationTitle" Text="{Binding ApplicationTitle}" Style="{StaticResource PhoneTextNormalStyle}" /> <TextBlock x:Name="PageTitle" Text="{Binding PageName}" Margin="-3,-8,0,0" Style="{StaticResource PhoneTextTitle1Style}" /> </StackPanel> <!--ContentPanel - place additional content here--> <Grid x:Name="ContentGrid" Grid.Row="1"> <TextBlock Text="{Binding Welcome}" Style="{StaticResource PhoneTextNormalStyle}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="40" /> </Grid> <Preview:BindableApplicationBar x:Name="AppBar" BarOpacity="1.0" > <Preview:BindableApplicationBarIconButton Command="{Binding DisplayAbout}" IconUri="/icons/appbar.questionmark.rest.png" Text="About" /> <Preview:BindableApplicationBar.MenuItems> <Preview:BindableApplicationBarMenuItem Text="Settings" Command="{Binding InputBox}" /> </Preview:BindableApplicationBar.MenuItems> </Preview:BindableApplicationBar> </Grid> 7) Let’s go ahead and create the RelayCommands and write them up to a MessageBox by editing our MainViewModel.cs file. public class MainViewModel : ViewModelBase { public string ApplicationTitle { get { return "MVVM LIGHT"; } } public string PageName { get { return "My page:"; } } public string Welcome { get { return "Welcome to MVVM Light"; } } public RelayCommand DisplayAbout { get; private set; } public RelayCommand InputBox { get; private set; } /// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel() { if (IsInDesignMode) { // Code runs in Blend --> create design time data. } else { DisplayAbout = new RelayCommand(() => { MessageBox.Show("About box called!"); }); InputBox = new RelayCommand(() => { MessageBox.Show("settings button called"); }); } } If you run the project now you should get something similar to this (notice the AppBar at the bottom):  Now if you hit the question mark then you will get the following MessageBox: The MenuItem works as well so for Settings: As you can see, its pretty easy to add a Command to the ApplicationBar/MenuItem. If you want to look through the full source code then click here.   Subscribe to my feed

    Read the article

  • How to loop AHK by user input?

    - by AHKFan
    is there a way to loop a certain script using user input per INPUTBOX? The script below runs only once when i klick the button for it. Is there any way for the script to popup something where it asks for a number for it to loop? Lets say something pops up and i give in "10". Then the script is executed 10 times. I hope it's clear enough to understand what the question is guys :-) myscript: sleep 100 InputBox, testvariable, Enter your Input here,,,350, 120 send 100 send {Tab} sleep 100 send %testvarable% return Thanks for your help in advance.

    Read the article

  • Trying to rename a computer via the netdom command and force a reboot

    - by user57020
    Why doesn't this work? it looks like it will but nothing happens. Option Explicit Dim wshNetwork Dim wshShell Dim PCname Dim Newname Set wshNetwork = WScript.CreateObject("WScript.Network") Set wshShell = WScript.CreateObject("WScript.Shell") PCname = InputBox("Type in the name of the pc you want to rename") Newname = InputBox("Type in the name of the new pc name") wshShell.run("netdom renamecomputer " &PCname& " /NewName:"&Newname& " /reboot:00 " ) 'MsgBox("netdom renamecomputer " &PCname& " /NewName:"&Newname& " /reboot:00 /y")

    Read the article

  • Why does the following Javascript/form not work?

    - by joshim5
    <form> <input type="text" id="inputbox" value="hello"/> <input type="submit" value="Convert" onClick="convert(document.getElementById("inputbox"))"/> </form> <script type="text/javascript"> function convert (text) { alert(text); return text; </script> This also does not work when I change alert to document.write. I obviously have more HTML to go along with this. Thanks!

    Read the article

  • What is the coolest thing you can do in <10 lines of simple code? Help me inspire beginners!

    - by Tom Ritter
    I'm looking for the coolest thing you can do in a few lines of simple code. I'm sure you can write a Mandelbrot set in Haskell in 15 lines but it's difficult to follow. My goal is to inspire students that programming is cool. We know that programming is cool because you can create anything you imagine - it's the ultimate creative outlet. I want to inspire these beginners and get them over as many early-learning humps as I can. Now, my reasons are selfish. I'm teaching an Intro to Computing course to a group of 60 half-engineering, half business majors; all freshmen. They are the students who came from underprivileged High schools. From my past experience, the group is generally split as follows: a few rock-stars, some who try very hard and kind of get it, the few who try very hard and barely get it, and the few who don't care. I want to reach as many of these groups as effectively as I can. Here's an example of how I'd use a computer program to teach: Here's an example of what I'm looking for: a 1-line VBS script to get your computer to talk to you: CreateObject("sapi.spvoice").Speak InputBox("Enter your text","Talk it") I could use this to demonstrate order of operations. I'd show the code, let them play with it, then explain that There's a lot going on in that line, but the computer can make sense of it, because it knows the rules. Then I'd show them something like this: 4(5*5) / 10 + 9(.25 + .75) And you can see that first I need to do is (5*5). Then I can multiply for 4. And now I've created the Object. Dividing by 10 is the same as calling Speak - I can't Speak before I have an object, and I can't divide before I have 100. Then on the other side I first create an InputBox with some instructions for how to display it. When I hit enter on the input box it evaluates or "returns" whatever I entered. (Hint: 'oooooo' makes a funny sound) So when I say Speak, the right side is what to Speak. And I get that from the InputBox. So when you do several things on a line, like: x = 14 + y; You need to be aware of the order of things. First we add 14 and y. Then we put the result (what it evaluates to, or returns) into x. That's my goal, to have a bunch of these cool examples to demonstrate and teach the class while they have fun. I tried this example on my roommate and while I may not use this as the first lesson, she liked it and learned something. Some cool mathematica programs that make beautiful graphs or shapes that are easy to understand would be good ideas and I'm going to look into those. Here are some complicated actionscript examples but that's a bit too advanced and I can't teach flash. What other ideas do you have?

    Read the article

1 2 3  | Next Page >