Search Results

Search found 435 results on 18 pages for 'onchange'.

Page 10/18 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Trigger the change event of a textbox in jQuery

    - by Danny Chen
    I have an asp:TextBox with asp:RegularExpressionValidator to validate if it's a number. Obviously an onchange event will be attached to this textbox while rendering. Also I add a change event at $(document).ready to make some calculation when the value is changed. <asp:TextBox id="myText" runat="server" /> <asp:regularexpressionvalidator id="myRev" ControlToValidate="myText" runat="server">*</asp:regularexpressionvalidator> $(document).ready(function(){ $('[id$=myText]').bind('change',function(){ //do something }).change(); //force the change event at the very beginning }); My function will be executed later than the .net generated js because of the register time. But the .net js throws an error. I traced in the js: function ValidatorOnChange(event) { ... } and found that all of event.fromElement,event.toElement,event.srcElement are null which causes the exception. Did I do something wrong? Any solutions? Thanks.

    Read the article

  • Clever "add tag" javascript help needed

    - by Camran
    I have this function for adding options to a Select list: function addOption(selectbox, value, text, cl ) { var optn = document.createElement("OPTION"); optn.text = text; optn.value = value; if (cl==1){ optn.className = "nav_option_main"; } selectbox.options.add(optn); } I have just discovered the "optgroup" tag, but I don't know how to implement it to the drop list. The function above is called on another selectboxes "OnChange" event, to fill sub-select-box with the desired options. I don't think it should be too difficult to add the "optgroup" tag into this, or is it? Thanks and if you need more input let me know...

    Read the article

  • RadioGroup getValue does not return correct slected value

    - by vagabond
    I'm running into a small issue with RadioGroup. My RadioGroup has possible values, true and false. The Radio types I have in my radiogroup use a Model that stores true or false. On an ajax onchange event I want to do some handling, and to do so I need to know the selected radio in my radiogroup and another identical radiogroup. The problem is getValue() only returns the initial value from my Pojo. Whenver I click on a radio button to change the selected Radio getValue() still returns the initial value. When I save my changes, my Pojo gets the correct value. I am finding this bizarre and have spent hours trying to figure our what I'm missing.

    Read the article

  • what is the error in this script?

    - by coderex
    <html> <body> <script language="javascript"> document.getElementById('myfileId').onchange = function(e) { alert('change'); } </script> <form action="" > <input type="file" id="myfileId" name="myfile"> </form> </body> </html> How can I call the JavaScript function after a file selection.

    Read the article

  • Show up value of select option in IE

    - by Pete
    Hello, I have a problem with a html select object and its options in IE. My html <select id="Select1" onchange="closeMenu1(this.value)"> <option></option> <option>1</option> <option>2</option> And the javascript function closeMenu1 (x) { var show = document.getElementById("divID"); show.innerHTML = x; } Now, in every browser except the IEs the divID will show up the value which I selected in the select object. But IE doesn’t. Can somebody please tell me a way around that? Thanks.

    Read the article

  • How can I fill in the blanks to display just my image?

    - by Ignacio
    <h:inputText id="email" value="#{user.user.email}" title="Email" onchange="this.form.submit()" required="true" requiredMessage="_____"> <f:validator validatorId="checkvalidemail"/> </h:inputText> <h:message for="email" styleClass="error"/> validation: String enteredEmail = (String)object; Pattern p = Pattern.compile(".+@.+\\.[a-z]+"); Matcher m = p.matcher(enteredEmail); boolean matchFound = m.matches(); if (!matchFound) { FacesMessage message = new FacesMessage(); message.setSummary("____"); throw new ValidatorException(message); and css .error { background-image: url('includes/style/delete2.png'); text-align: left; font-size: 36px; } Thank you very much Best Regards Ignacio

    Read the article

  • Ajax JQuery responses order problem....

    - by Parhs
    Hello !!! I am searching 3 hours and didnt find anything.... i have this code which is called at an onChange event of an function group_changed(obj) { $.ajaxSetup({async:false}); $.post("/medilab/personnel/groups/getGroupRightsAjax",{ 'group.id': obj.options[obj.selectedIndex].value }, function(data){ $("#div_rights").html(data); }); } This works fine but if i set async:true sometimes the result doesnt match the selection... I guess that this is happening because some requests are lost or that the responses dont come in order..... Any idea what to do to keep it asynchronous?

    Read the article

  • JQuery Two colour slider control automatic move

    - by Geetha
    Hi All, I creating a slider control with two colours for media player streaming. Working: i can drag/ move the slider. Needs: I want to move the slider automatically.(1. Once the control is ready and 2. After changing the position of the slider, from that position it has to move automatically) Code: var slider1 = new Control.Slider('handle1', 'track1', { animate: true, range: $R(0, 10), max: 10, min: 0, sliderValue: 5, startSpan: 'span1', onChange: function(v) { handleSliderChange(v); } }); Plugins: <script src="js/prototype.js" type="text/javascript"></script> <script src="js/slider.js" type="text/javascript"></script> Geetha.

    Read the article

  • Cascading Dropdown List

    - by user333831
    I am working on a web app and trying to code a form with two dropdown lists. The list in the second dropdown will be dependent on the selection from the first one. The task itself isn’t too complicated except that once the first selection is made, I need to make a database call to pull the data for the second dropdown. This is where I am having difficulty. Both lists are in fact populated from a database. I am working on this in a python script and have been trying to do this w/ an onChange javascript function. The web app is built in Zope and page templates may be an option along w/ the python scripts.

    Read the article

  • Jquery loads only after F5 in IE

    - by khushi
    I am using Jcrop jQuery to crop image in MVC3 application. following is my javacript function: jQuery(function ($) { $('#imgLab').Jcrop( { onChange: showCoords, onSelect: coordsSelected, onRelease: clearCoords } ); }); Image ID is 'imgLab'. Image src path is coming from database. Now this work fine in FF,Safari and Chrome. but in IE it only works after I press F5. Can anyone tell me what is wrong in code? Thanks in Advance. Khushbu

    Read the article

  • jQuery UI Element vs Dojo (Dijit) Form Element

    - by Muers
    Dojo seems to have a useful feature in that it can setup event handlers and default options, etc for Dijit.form elements as it is inserting it into the DOM. For example, Dojo: var slider = new dijit.form.HorizontalSlider({ name: sliderContainerId+'_slider', value: sliderValue, minimum: sliderMax, maximum: sliderMin, onChange: function(value){ // some event handling logic } }, sliderContainerId); However, the jQuery UI Slider traditionally is applied to DOM elements that already exist: $( sliderContainerId ).slider({ value:100, min: 0, max: 500, step: 50, slide: function( event, ui ) { $( "#amount" ).val( "$" + ui.value ); } }); I need to be able to 'programmatically' create new Sliders (and other form elements), but I'm not sure how that could be achieved with the way jQuery is structured? Maybe I'm missing something obvious here.... MTIA

    Read the article

  • passing text_field values in ajx on rails

    - by user163352
    I'm using <%= text_field 'person', 'one',:id => 'test', :onchange=>remote_function(:url=>{:action=>"update"}, :update=>"test") %> <div id="test"></div> Now I just want to send the value of text_field with :action i.e :url=>{:action=>"update(value_of_text_field_entered"} Don't want to use params[:person][:one]. Any suggestions?or how can I use <%= observe_field % to send the value with action?

    Read the article

  • Dropdown selection navigation to different page with dropdown values; Asp.Net + Javascript

    - by fzshah76
    I want to access drop down menu's variable in java script on change event, here is my code <asp:DropDownList ID="DropDownList1" runat="server" onchange="document.location.href = url_Lookbook;" > <asp:ListItem Value="0">hello</asp:ListItem> <asp:ListItem Value="1">world</asp:ListItem> </asp:DropDownList> here is the script coding: <script type="text/javascript"> var url_Lookbook = "http://microsoft.com"; </script> My question is how do I pass down value=0 or value = 1 to different page, any help is appreciated.

    Read the article

  • Creating a menu to switch languages on site

    - by user342391
    I have a dropdown menu on my site that I want to use to switch between the different languages: <select onChange="if(this.selectedIndex!=0) self.location=this.options[this.selectedIndex].value" name="userLanguage" id="userLanguage"> <option value="http://demo.com/?lang=en"> English (International)</option> <option value="http://demo.com/?lang=es"> Español (European)</option> </select> How can I get the above menu to display which language is currently showing. Is there someway of showing an active state. Site is using php. Thanks in advance.

    Read the article

  • Workflowing an InfoPath form

    - by Donaldinio
    I have an InfoPath form that requires workflow. The form is build from a cXML schema in BizTalk,then dropped into a forms library for workflow. The user opens the infopath form, reviews and picks one of several options: re-submit, archive, escalate, etc. My question is how best to workflow this? Do you have the buttons on the form update a status/action field, and have the workflow listen for an onChange event? Can you update a property on the library, that is not a field on the form? for example, if status is not part of the form schema, but is a column on the document library. How do ye typically do this? thanks.

    Read the article

  • c# passing something from child form to parent

    - by Alan Bennett
    hi guys. so i have this form and on it is a combo box populated from a database via a SQL method. and i have another form which allows us to maintain the database table etc. so i make a new instance of the second form doing: Form1 frm = new Form2; frm.show(); once i have done what ever i wanted to do on the second form and i close it, i need to somehow trigger an event or something which will refresh the combo box and the code behind it. i was thinking of some onchange or focus event for the whole form, the problem is i have 5 of these combo boxes and running all the SQL again. i also thought of passing somesort of variable thro but then i would still need an event for that. any ideals would be awesome

    Read the article

  • HTML Input on change of value

    - by arik-so
    Hello, I have an input tag. This tag does not have the autocomplete feature turned off, thus, one does not necessarily need to release a key to change the value of this field and focus anotehr one. My question is: how can I detect ANY value changes of this particular field, like e. g. <input onvaluechange="//do following..." /> The JavaScritp attribute onchange does not fire on change of value, only on changes like blur, focus, etc... Thanks in advance!

    Read the article

  • MSAccess Change Date Value Before Validation

    - by sisdog
    In a grid I have a date/time field where I would like the user to be able to type in short-hand formats for dates and times. For example, if they type in "435p" and then focus off of the cell they get the message "The value you entered isn't valid for this field.". Instead, I want to trap a pre-validationevent and change it to "4:35pm" for them. What event can I use? I've tried: LostFocus & BeforeUpdate: too late (validation fires before event) Dirty & OnChange: too early (they haven't left the cell yet) Or is there a way to turn off the native validation rule that is checking for date formats?

    Read the article

  • how can I display controller's variable (which is on a loop) on .html.erb page? ruby on rails

    - by rrz
    I have the following code listed below in my controller: struc = {'en' => 'english', 'es' => 'espaniol', 'de' => 'germany', 'fr' => 'french', 'it' => 'italy'} struc.each_pair do |key, value| @key=key @value=value end on my application.html.erb I have the following <select name="Language" onchange="location=this.options[this.selectedIndex].value;"> <option value="/<% @key %>/<%= @rem %>"><%= @value %></option> </select> Now how can i make the value of '@key' and '@value' appear recursively display on (application.html.erb)? Thanks in advance

    Read the article

  • Alert is showing two times. how to restrict?

    - by Dev
    function test(myObject, flag) { if ( (flag) || ((event.keyCode == 59) || (event.which == 59)) || ((event.keyCode == 44) || (event.which == 44))) {alert(myObject.value);} } function closeWin() {self.close();} --foaram name='test' --textaarea name='textareaName' cols='44' rows='3' onChange='test(this, true);' --onKeyPress='test(this);' onBlur='test(this, true);' ---inpaut type='text' name='textName' --inpaut type='button' name='buttonName' onclick='closeWin();' value='Cancel' --/foarm I have a problem: when input value(e.g: test;) into textareaName field, the test function is always run more one time. Please show me the way can run this only one time.

    Read the article

  • passing something from child form to parent

    - by Alan Bennett
    so i have this form and on it is a combo box populated from a database via a SQL method. and i have another form which allows us to maintain the database table etc. so i make a new instance of the second form doing: Form1 frm = new Form2; frm.show(); once i have done what ever i wanted to do on the second form and i close it, i need to somehow trigger an event or something which will refresh the combo box and the code behind it. i was thinking of some onchange or focus event for the whole form, the problem is i have 5 of these combo boxes and running all the SQL again. i also thought of passing somesort of variable thro but then i would still need an event for that. any ideals would be awesome

    Read the article

  • jquery - How do i call the same function with different div ids?

    - by Nahom
    Hi, I have two divs with different ids (#washing,#bleaching). How can i use a function for different id's. I have tried adding both the ids together $("#washing, #bleaching"), but the function is not working correctly on the divs. Can anyone please help me... Here is the code $(function() { $("#washing").paginate({ count: 10, start: 1, display: 7, border: true, border_color: '#fff', onChange: function(page) { $('._current', '#paginationdemo').removeClass('_current').hide(); $('#p' + page).addClass('_current').show(); } }); });

    Read the article

  • Checkbox - in Javascript

    - by smiley
    I am working on Edit screen where I am pulling out value from db to check if the checkbox is checked or not. If it is unchecked, it should deselect the checkbox and other controls of this checkbox. In my case the js works perfectly fine. That is if my previous screen has checkbox unchecked, edit screen disables all the values for this checkbox. But it still shows the checkbox is checked in UI(though it is actually checked). Something is wrong with my html code. Can someone please let me know where /how should i modify to display if my checkbox is unchecked? <%chkStatus=list.getCheckbox(); if (chkStatus == null) { chkStatus = ""; } %> <input id="chkbox" type="checkbox" name="chkbox" checked="<%=chkStatus%>" onchange="javascript:enableDisableTextBox();">

    Read the article

  • Update a collection_select with user made field

    - by Flexo
    I have a collection_select that i want user to add custom fields to. I have a jQuery script that detects if the row "Custom" is chosen and adds a textfield to the page so the user can enter a custom name. How can i store that custom made name in the db and update the collection_select? <%= f.collection_select :kind_id, Kind.find(:all, :order => "created_at DESC"), :id, :name, {:prompt => "Select a Type" }, {:id => "selector", :onchange => "type_change(this)"} %>

    Read the article

  • What to use instead of if(isset($_POST['submit'])) for this.form.submit()?

    - by paracaudex
    I want to run a particular block of PHP if the user submits a form. It works if I use a submit button with name="submit" and: <?php if(isset($_POST['submit'])) { code to run } ?> I don't know anything about javascript, and I want the code to run if the user changes a dropdown menu. If I make the first line of the dropdown <select name="dropdownname" onchange="this.form.submit()"> the form appears (I haven't tested it) to submit if the user changes the dropdown choice. However, if I do this, the if(isset($_POST['submit'])) PHP code doesn't run. Is there a PHP if statement I can write that will respond to the form being submitted even though it's being submitted by a change in the dropdown and not a submit button?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >