Search Results

Search found 10381 results on 416 pages for 'delegate and events'.

Page 93/416 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • Get values of textareas generated dynamically

    - by Hulk
    In the below code,the textaraes are generated dynamically ,now how to get these values for validations in valid() function.. <script> function valid() { //get all textarea vales for validation } function add(col_det) { var row = '<tr>'; row += '<td>'; row += '<textarea rows = "8" cols = "8" class = "input" WRAP id="row_details'+r_count+'" name ="row_details'+r_count+'"></textarea>'; row += '</td>'; for (var i=0;i<col_det.length;i++) { row += '<td> <div id = "div_content_bold"> <textarea rows = "2" cols = "8" class = "input" id="c_details'+c_count+'" name="col_details'+l_count+'" WRAP ></textarea> </div> </td>'; } row += '<td></td>'; row += '</tr>'; return row; } $(document).ready(function() { var cnt = '<input type="text" name="title" id="title" ><br><br>'; cnt += '<table cellspacing="0" cellpadding="0" border="1" width="100%" id="l_table">'; cnt += '<tr>'; cnt += '<th width="30%">Category</th>'; cnt += headers(col_data); cnt += '<th width="10%">Grade obtained</th>'; cnt += '</tr>'; for(var i=0;i<criteria;i++) { cnt += add(col_data,i); } cnt += '</table>'; $('#content').append(cnt); }); </script> <form action="create/" method="post" name="aa"> <div id="content"></div> <table> <tr><td> <input type="submit" value="Save" id="Save" onclick="javascript:var ret=validate(row_c,c_count);return ret;"/></td></tr> Thanks....

    Read the article

  • How to execute a program on PostBuild event in parallel?

    - by John
    I managed to set the compiler to execute another program when the project is built/ran with the following directive in project options: call program.exe param1 param2 The problem is that the compiler executes "program.exe" and waits for it to terminate and THEN the project executable is ran. What I ask: How to set the compiler to run both executables in paralel without waiting for the one in PostBuild event to terminate? Thanks in advance

    Read the article

  • add remove field in java script

    - by rajanikant
    Hi every body. i want to add and remove some html input in javascript i have done for add function . it work properly. but unable to remove. my code is following fields = 1; function addInput() { if (fields != 10) { document.getElementById('text').innerHTML += "<tr><td width='15%' align='left' valign='top' class='subheading'><input type='text' name='date[]' id='date[]' /></td><td width='15%' align='left' valign='top' class='subheading'><input type='text' name='time[]' id='time[]' /></td><td width='20%' align='left' valign='top' class='subheading'><input type='text' name='module[]' id='module[]' /></td><td width='15%' align='left' valign='top' class='subheading'><input type='text' name='organisation[]' id='organisation[]' /></td><td width='20%' align='left' valign='top' class='subheading' nowrap='nowrap'><input type='text' name='category[]' id='category[]' /></td><td width='20%' align='left' valign='top' class='text' nowrap='nowrap'>Add | Remove </td></tr>"; fields += 1; } else { document.getElementById('text').innerHTML += "<br />Only 10 upload fields allowed."; document.form.add.disabled=true; } } fields1=10 function removeInput() { if (fields1 !=1) { document.getElementById('text').innerHTML += ""; fields -= 1; } } and my php function is function addSession() {?> <table cellpadding="5" cellspacing="0" width="100%"> <tr> <td width="10%" align="left" valign="top" colspan="6" bgcolor="#993333" class="heading">Add Session </span></td> </tr><tr class="bgrow"> <td width="10%" align="left" valign="top" class="subheading">Datum </span></td> <td width="20%" align="left" valign="top" class="subheading">Tijd</td> <td width="35%" align="left" valign="top" class="subheading">Module</td> <td width="15%" align="left" valign="top" class="subheading">Organisatie</td> <td width="20%" align="left" valign="top" class="subheading" nowrap="nowrap">Category</td> <td width="20%" align="left" valign="top" class="subheading" nowrap="nowrap">Action</td> </tr> <tr > <td width="15%" align="left" valign="top" class="subheading"><input type="text" name="date_0" id="date_0" /></td> <td width="15%" align="left" valign="top" class="subheading"><input type="text" name="time_0" id="time_0" /></td> <td width="20%" align="left" valign="top" class="subheading"><input type="text" name="module_0" id="module_0" /></td> <td width="15%" align="left" valign="top" class="subheading"><input type="text" name="organisation_o" id="organisation_o" /></td> <td width="20%" align="left" valign="top" class="subheading" nowrap="nowrap"><input type="text" name="cat_0" id="cat_0" /></td> <td width="20%" align="left" valign="top" class="text" nowrap="nowrap"><span onclick="addInput()" class="link">Add</span> | <span onclick="removeInput()" class="link">Remove </span></td> </tr> <tbody id="text"> </tbody> <?php } ?> can any one give me solution?

    Read the article

  • Shortest way of attaching multiple DOM elements to one event handler using Jquery?

    - by Camsoft
    I need to attach a single event handler to multiple DOM elements using jQuery. I'm currently achieving this using jQuery's each() method. See below: $([elm1, elm2, elm3]).each(function() { this.click(eventHandler); }); I was wondering if there is a way to do this without using the each method and closure. I thought I would be able to do something like: $(elm1, elm2, elm3).click(eventHandler); This kind of statement works using Prototype.js but not in jQuery.The reason I ask the question is because after using both Prototype.js and jQuery I have found that jQuery requires simpler statements to achieve the same tasks in almost every area so I assume there must be a better way of doing this?

    Read the article

  • How to execute a program using MSBuild?

    - by John
    Hello, My main problem is the lack of documentation for the Post/Pre-Build in Delphi 2009.The goal is to execute another program on the Pre-build event of my project. Example I tried this,but it fails: Exec "E:\somepath\some.exe". Where is the problem,how do I execute another executable on Pre-Build using MSBuild?

    Read the article

  • IE8 (compatibility mode) won't load my Ajax content

    - by Jens Roland
    Hi all - I am working on a jQuery script on http://www.qxl.dk/ and I can't seem to get IE7 (or more accurately, IE8 in IE7 compatibility mode) to load my content. The sidebar box on the right named "QXL Aktuelt" loads its HTML content from an external file using Ajax load(), then triggers a custom jQuery event ("aktuelt_loaded") that starts a carousel script (like a scrolling newsticker). Several other content sections on the same page are loaded through Ajax and they work just fine, so I'm wondering what's going wrong. Everything works as expected in Firefox 3.6 and IE8, but not in IE8's compatibility mode. The script that loads the Ajax content is (inline on the page): <div id="qxlaktueltHolder"></div> <script type="text/javascript"> $("#qxlaktueltHolder").load("/contents/dk/modul/qxlaktuelt/qxlaktuelt.htm", function() { $("#qxlaktueltHolder").trigger("qxlaktuelt_loaded", []); }); </script> <script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/jcarousellite_1.0.1.min.js'></script> <script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/qxlaktuelt_liveload.js'></script> The external script that responds to the event is in the following file: http://www.qxl.dk/contents/dk/js/qxlaktuelt_liveload.js All ideas are very welcome.

    Read the article

  • JQuery, bind same function to 3 different textbox's keyup event

    - by Miral
    I have 3 textboxes and on the keyup event for all the 3 I want to call the same function? In the below code, I am tring to bind 'keyup' event to 'CalculateTotalOnKeyUpEvent' function to textbox named 'compensation', but it doesn't work $("#compensation") .bind("keyup",CalculateTotalOnKeyUpEvent(keyupEvent)); function CalculateTotalOnKeyUpEvent(keyupEvent) { var keyCode = keyupEvent.keyCode; if (KeyStrokeAllowdToCalculateRefund(keyCode)) { CalculateTotalRefund(); } }; Thanks..

    Read the article

  • detect focus on browser address bar?

    - by jedierikb
    Is there a way to detect when focus has been put onto the address-bar or the browser-search-bar? I ask because I am trying to keep focus on one element in my document, but adding a blur() listener to that element works too well in safari mac -- you can't put focus on the address-bar!

    Read the article

  • javascript textbox call event when value changes

    - by Senica Gonzalez
    I have a textbox, and whenever the value of the box changes, I want to check and see if 20 digits have been entered. I thought that I would use the onChange event, but this seems to be interpreted as the onBlur event on IE. So then I thought I would use onKeyDown, but the problem comes in if the user wants to paste a value into the field, then the function never gets called. There are no other form boxes so I can't rely on onBlur or expect that they will change focus ever. How do I do this? I just want to evaluate the value of the textbox everytime the value of the textbox changes. <input type="text" onKeyDown="myfunction()">

    Read the article

  • Calling javascript class within other Js

    - by harigm
    I have Aptana plugin in eclipse, I have a javascript (one.js) and i have included one more Javscript(two.js) within one.js. I click on any functions within one.js and if those functions exists in the same one.js, the control is going to the respective function. Suppose if the function exists in two.js, the control is not going to two.js Can any one help me with this?

    Read the article

  • Buttons OnClick Event not firing when it causes a textboxes onChange event to fire first

    - by user48408
    I have a few textboxes and button to save their values on a webpage. The onchange event of the textboxes fires some js which adds the changed text to a js array. The ok button when clicked flushes this to the database via a webservice. This works fine except when the onchange event is caused by clicking the ok button. In this scenario the onchange of the textboxes still fires but the onClick event of the button does not. Any ideas? textboxes look something like <input name="ctrlJPView$tbcTabContainer$Details$JP_Details_Address2Text" type="text" value="test" id="ctrlJPView_tbcTabContainer_Details_JP_Details_Address2Text" onchange="addSaveDetails('Jobs###' + document.getElementById('ctrlJPView_tbcTabContainer_Details_JP_Details_Address2Text').value + ');" style="font-size:8pt;Left:110px;Top:29px;Width:420px;Height:13px;Position:absolute;" /> My save button <input type="button" name="ctrlJPView$btnOk" value="OK" onclick="saveAmendments();refreshJobGrids();return false;__doPostBack('ctrlJPView$btnOk','')" id="ctrlJPView_btnOk" class="ControlText" style="width:60px;" /> UPDATE: I guess this comes down to one of two things. 1) Something is happening before the onClick of the button gets called to surpress that call such as an inadvertent return false; or 2) the onClick event isn't firing at all. Now I've rem'd out everything actually inside the functions that are being called beforehand but the problem persists. But if i remove the call altogether it works (???)

    Read the article

  • JavaScript: input validation in the keydown event

    - by c411
    Hi, I'm attempting to do info validation against user text input in the process of keydown event. The reason that I am trying to validate in the keydown event is because I do not want to display the characters those that are considered to be illegal in the input box at the beginning. The validation I am writing is like this, function validateUserInput(){ var code = this.event.keyCode; if ((code<48||code>57) // numerical &&code!==46 //delete &&code!==8 //back space &&code!==37 // <- arrow &&code!==39) // -> arrow { this.event.preventDefault(); } } I can keep going like this, however I am seeing drawbacks on this implmentation. Those are, for example, Conditional statement become longer and longer when I put more conditions to be examined. keyCodes can be different by browsers. I have to not only check what is not legal but also have to check what are exceptionals. In above examples, delete,backspace, and arrow keys are exceptionals. But the feature that I don't want to lose is having not to display the input in the textarea unless it passes the validation. (In case the user try to put illegal characters in the textarea, nothing should appear at all) That is why I am not doing validation upon keyup event. So my question is, Are there better ways to validate input in keydown event than checking keyCode by keyCode? Are there other ways to capture the user inputs other than keydown event before browser displays it? And a way to put the validation on it? Thanks for the help in advance.

    Read the article

  • event.clientX is readonly?

    - by Duracell
    Working in IE 8, mostly, but trying to write a portable solution for modern browsers. Using telerik controls. I'm catching the 'Showing' client-side event of the RadContextMenu and trying to adjust it's coordinates. The clientX, clientY and x,y members of the DOM event cannot be assigned a new value. Visual Studio breaks with a "htmlfile: Member not found" error. My goal is to get a RadContextMenu to show inside a RadEditor when the user clicks in it (under certain conditions, this is a requirement from management). So I capture the onclick event for the RadEditor's content area (radEditor.get_document().body;). I then call show(evt) on the context menu, where 'evt' is the event object corresponding to the click event. Because the RadEditor's content is in an IFRAME, you have to adjust the position of the click event before the context menu displays. This is done in the "Showing" event. However, I cannot assign a value to the members .clientX and friends. It's as if javascript has temporarily forgotten about integer + and += operators. Is it possible that these members have become readonly/const at some point? var evt = args.get_domEvent(); while (node) { evt.clientX += node.offsetLeft; //'Member not found' here. evt.clientY += node.offsetTop; node = node.offsetParent; } evt.clientY += sender.get_element().clientHeight;

    Read the article

  • Checking if iframe is ready to be written to

    - by Bilal Aslam
    A 3rd party script on my web page creates an iframe. I need to know when this iframe is ready, so I can manipulate its DOM. I can think of a hacky approach: repeatedly try to modify the iFrame's DOM, and return success when a change we make sticks between two attempts. For this to work, I would prefer a property I can check on the iframe repeatedly. Is there an alternative, cross-browser evented approach to knowing that the iframe is ready? E.g. can we redefine the onLoad function to call into our code (but I don't know if I can do this, since I didn't create the iframe).

    Read the article

  • Javascript onfocus event

    - by tazim
    I have textbox whose value if entered needs to be validated using some regularexpression I need to validate the value as user is entering the data. Which is suitable event can be used for this ? some sample example of using onfocus event on textbox will be helpful

    Read the article

  • Change event on <select>

    - by adivasile
    If i attach a change event listener on a<select> how do i acces the option that was selected (not just the value, the actual element). $('select').addEvent('change',function(event) { //?? }); Note: i'm using Mootools

    Read the article

  • Flash AS 3.0 building a message console approach

    - by vasion
    I am having trouble figuring out how to build a console for my application so i can send msgs to it from any class in the package. i tried to send a generic Event, but I cannot find a way send a msg together with the event, or at least a reference to the object which is dispatching the event. what approach would you suggest?

    Read the article

  • C# / Winforms - Visually remove button click event

    - by Wayne Koorts
    .NET newbie alert Using Visual C# 2008 Express Edition I have accidentally created a click event for a button. I then deleted the automatically-created method code, which resulted in an error saying that the function, which had now been referenced in the form loading code, could no longer be found. Deleting the following line from the Form1.Designer.cs file's InitializeComponent() function... this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click); ... seems to do the trick, however, it makes me feel very dirty because of the following warning at the beginning of the #region: /// Required method for Designer support - do not modify /// the contents of this method with the code editor. I haven't been able to find a way to do this using the form designer, which I assume is the means implied by this warning. What is the correct way to do this?

    Read the article

  • jquery .submit live click runs more than once

    - by fxuser
    I use the following code to run my form ajax requests but when i use the live selector on a button i can see the ajax response fire 1 time, then if i re-try it 2 times, 3 times, 4 times and so on... I use .live because i also have a feature to add a post and that appears instantly so the user can remove it without refreshing the page... Then this leads to the above problem... using .click could solve this but it's not the ideal solution i'm looking for... jQuery.fn.postAjax = function(success_callback, show_confirm) { this.submit(function(e) { e.preventDefault(); if (show_confirm == true) { if (confirm('Are you sure you want to delete this item? You can\'t undo this.')) { $.post(this.action, $(this).serialize(), $.proxy(success_callback, this)); } } else { $.post(this.action, $(this).serialize(), $.proxy(success_callback, this)); } return false; }) return this; }; $(document).ready(function() { $(".delete_button").live('click', function() { $(this).parent().postAjax(function(data) { if (data.error == true) { } else { } }, true); }); });? EDIT: temporary solution is to change this.submit(function(e) { to this.unbind('submit').bind('submit',function(e) { the problem is how can i protect it for real because people who know how to use Firebug or the same tool on other browsers can easily alter my Javascript code and re-create the problem

    Read the article

  • Can mouseenter be made to not fire in IE on DOMready?

    - by mrclay
    jQuery emulates IE's mouseenter event on non-IE browsers. In IE, however, mouseenter is being triggered when the page loads (maybe due to jQuery's use of doScroll in the $.ready implementation), even if the mouse is not moved at all. This doesn't happen in other browsers and definitely doesn't follow Microsoft's own spec, which says (emphasis mine): The event fires only if the mouse pointer is outside the boundaries of the object and the user moves the mouse pointer inside the boundaries of the object. If the mouse pointer is currently inside the boundaries of the object, for the event to fire, the user must move the mouse pointer outside the boundaries of the object and then back inside the boundaries of the object. This only becomes an issue of usability if hover (or the hoverIntent plugin) is applied to a navigational item to display a drop down or "mega-menu": In IE, mouseenter will fire immediately after $.ready, obscuring the content with the menu. I've put together a demonstration of both the mouseenter inconsistency and the usability issue it creates.

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >