How to make an ajax call that reverses a string ?
How to make an ajax call that reverses a string ? it does not do the ajax call, but goes straight into the controller reversethestring... i am getting a null reference exception ...string array is empty */ $.ajax({ type: "GET", url: './ReverseTheString', data: { input: 'abc'}, dataType: "json", async: true, success: function (result) { $("#result2").html(result);
Make a radio button selected when an item select from the list
I have the following code. I have the country field in the list and the currency field in the radio button. what I want is, when I will select a country, it will automatically select the currency from the radio button. I have 3 currencies US, EUR & GBP, for EU it will be EUR, for UK it will be GBP & for the rest it will be US. how can I do this using jquery. please help me.... <!DOCTYPE html> <html> <head> <title>Radio button and List Check</title></head> <body> <form class="form-horizontal" action=""
jQuery licensen
I have some questions regarding jQuery and what rules one must follow when using jQuery. I would much appreciate if my questions were answer as I have difficulty finding the answers online. Firstly, if I want to use jQuery in a commercial project what rules must I be considerate of? Secondly, if a part of my code is based on examples from jQuery, what are the rules then? Lastly, if I want to write a plugin for jQuery, what licensens must I abide by and why?
Split jQuery in multiple files
Hi, I'm pretty new to jQuery and hope you can help me with my problem. I need jQuery in smaller packets to transfer it. I wondered if it is possible to split the jQuery library file into several parts. For example, if I download a jQuery file with a size of 200KB: Could it be splitted into 10 times 20 KB files? Is there a common way to do this? Thanks for your help.
How does Jquery work?
As part of Javascript, non-Ajax jquery code doesn't write into database (like persist), then how does all the function gets stored? in the browser? I am asking this because I am having problem with the form on my website. I am using the same source form html code for both the page that user can view the form and the page that user can edit the form (I used edit model to edit the form), thus the html and jquery code for the form of both view and edit are the same. However, jquery code for persisting
toggle slide: from hide to show and not from show to hide how to?
Hello all. I've take a look to the example at this url about toggle slide effect: http://jqueryui.com/toggle/ the example, when page has been loaded, show the div and so you click button to hide the div. I would like instead, that when the page has been loaded, the div is hide, and when i click, the div shown. So i've try many stupid things, but nothing work. Thank you.
Jquery animation for data save response
Hi, everyone, hope everyone is fine. My query is, when i submit a form using ajax, after the data saved in database successfully then i want to show 'data saved' text in front of the form and disappear after e few seconds. How can i do that? Like, in this forum, when i publish my question, it shows a div saying, my question published successfully and disappear after few seconds. Thank you.
How to convert html table into a string
Hi, Following is my html code <table id="grdtable" cellspacing="0" style="vertical-align:top; border-collapse:collapse;">
<tr><td>No</td><td>Charge</td><td>Start.</td><td>End.</td><td>No</td><td>Total</td></tr>
<tr><td>1</td><td><asp:Label ID="lb1" runat="server">7</asp:Label></td><td><input type="text" style="width:30px" value=100 runat="server"/></td><td><input type="text" style="width:30px" value=200 " runat="server" /></td><td><input type="text" style="width:30px" value=100
code not working
why does my this code is not running? please help me $('#pmForm').submit(function(){$('input[type=submit]', this).attr('disabled', 'disabled');}); function sendPM ( ) { var pmSubject = $("#pmSubject"); var pmTextArea = $("#pmTextArea"); var sendername = $("#pm_sender_name"); var senderid = $("#pm_sender_id"); var recName = $("#pm_rec_name"); var recID = $("#pm_rec_id"); var pm_wipit = $("#pmWipit"); var url = "php_parsers/private_msg_parse.php"; if (pmSubject.val() == "") {
get last before value from array
hi all, i am pushing array elements as dynamically i need last before array value every time.. ex: var array=[1,2,3,4,5,6,7,8,9,10] i need 9 if i have 3 var array=[1,2,3] <=== this time i want 2 var array=[1,2] <===this time i want 1 i tried like this array=[1,2,3,4,5,6,7,8,9,10] console.log(array[array.length-1]) it is giving 10 if i put array.length-2 it is giving correctly..but i don't want manual entry..
New to js and jQuery -
Hello all: I think I have a simple problem, but instead of playing guess and test forever, I thought I would ask here. I have a button in my header that I have open the aside. Can't figure out how to get the button background off: See how the reminants of the button are still there? Also, if I wanted to use the alternate color scheme icon, how would I do that? Here is the relevant header code, but if you need to see more I will certainly post the whole thing. <header data-role="header" data-position="fixed"
hover with new tr at runtime
Hi All, I use the "hover" method for highlight the table rows when the mouse is over them. But if I add a new row with "appendTo" or "prependTo" the "hover" method doesn't work. here there is a code: http://liveweave.com/mishUe#&togetherjs=zLETGFbl4v I don't understand the reason because the "length" method return the correct number of table rows. Thank you in advance. D.
Modal Popup
Hi All I am trying to create a modal popup but I would like it to do the following 1. Load when the user enters the site, but only once not every time they navigate to a new page. 2. when they leave the site. again only when they leave the site not when they move from page to page. I am still busy on number 1 so I haven't started working on nr 2. I have got the popup part right but it loads every time the page is refreshed. I have been trying to play with cookies but then it doesn't load at all
jquery each
(This is my first post here) My array declaration is like below var json_array = []; I insert values in this array var keys = ['rowid', 'Leave', 'Family', 'Place', 'Country', 'fromdate', 'todate', 'Email', 'Phone', 'Remarks', 'leave_status']; $(this).find('td').each(function () { i++; var textval = $(this).text(); json_array[keys[i]] = textval; }); When i want to retrieve these values like below, i can't get any value? Whats
How to get difference in hours and minutes compared to current time.
Give the followin date: 2016/11/18 21:00 I want to know what is the difference between the above date and the current date and time . I need the difference in hours and minutes , so it will be .... what is the difference between the above date and time and the currently date and time in hours and minutes. I am somehow not able to get how to calculate this :( Thank you. Gautam.
Jquery each function doesnt work
This is my array. var json_array = []; I inserted values on this array like below $(this).find('td').each(function () { i++; var textval = $(this).text(); json_array[keys[i]] = textval; });Again , i want to get them trying jQuery.each( json_array , function (i) { console.log( json_array[keys[i]]) ; });But unfortunately i am not getting any value. Whats wrong with my code? *That is my first
input mask example
Hello, I'm new to jquery. this example from JSFiddle works on JSfiddle, but I'm unable to run the same on w3schools tryit editor. http://jsfiddle.net/SEXAj/4699/ can anyone help?
Saving JSON object in cookies and read it when page loaded...
Hi, I have a json object as below.. var a1 = {"nope":["Retail Stores","Retail Development","Service station","Stations","branded wholesale/wholesaler","brand equity","Retail outlets","Forecourt","Corner store","Conveinence store","backcourt"]}; var a = JSON.stringify(a1); and saving in cookies using document.cookie = "MyTopicCookie="+k+";expires=Thu, 18 Dec 2017 12:00:00 UTC"; when I am reading cookies in next reloading of page.. using following code ( Thoudh in first reload it show previous cookies...
access url iframe after change url
Hello,I want get last url iframe in cross domains, Detail : I load one link to my iframe (till this moment) can get url iframe, But if user click to another link in content iframe and iframe url changed,can not get last URL because error same-origin policy How i can resolve that ?
Will Jquery affect database?
Is Jquery only affect client's side or Jquery can actually write into database as well?
Multiple div with same class - mouseenter
Hi! I have a document with multiple div's with the same class. The div contains another div that I want to show/hide on mouseenter/mouseleave. Sample html: <div class="node"> <div> content </div> <div class="options"> <ul> <li>Option 1</li> <li>Option 2</li> </ul> </div> </div> <div class="node"> <div> content </div> <div class="options"> <ul>
ISBN SEARCH BOX
I have two main question. First, I have a business website are any of you guys able to make a isbn search bar that my customers can receive quotes of how much I will pay them for their books? Example it looks like a search bar except it says sell your book here. customers types in isbn number into the search bar a receives a instant quote. or will that be to complicated for this type of website. second question, can I set up untied postal service for the customers so they can print of the packaging
request.responseXML becomes null after making 15-20 requests
Hi, I have a text field and when user enters few characters in this textfield ,it creates an Ajax request and searches the data from db and populate a dropdown which is next field . This functionality is working fine but currently observed an issue that if user keeps entering the characters and back space in text field(say 15-20 times) eg: User enters 'a' and then back space and then enter 'ab' and then backspace and enter 'abc' and so on . For first 15 requests Ajax call is working fine and data
Positioning my JQuery Popup Box
I just learned jquery and I want to apply a very simple dialog or popup box into my application. I have the following codes in my HTML: <div id="GLD_dialogbox" title="WARNING!" style="font-size:14;color:bf0000"> <p>Please login as administrator ! </p> </div> Here is the JQuery: <script type="text/javascript"> $(function(){ $( "#GLD_dialogbox" ).dialog({position: [50,100],autoOpen: true,resize: function( event, ui ){$( this ).dialog( "option",
Jquery.length
Hi All, I'm a jquery newbie and I don't understand the solution for my problem. I have a simple table with 1 header and 4 rows in the body. I created a page with 1 table and 3 buttons ( 1 with "insertAfter" and 1 with "insertBefore" methods ) the third button has : $('#bDelRow').click( function() { alert( $('#celebs tbody tr').length ); }); Even if I insert a new row before or after in the tbody the alert show me always "4"! I found this "https://api.jquery.com/length/"
Reset default CSS values; need help with syntax.
Hi, I'm building a responsive website, which includes a 'View desktop version' button on smaller screen sizes. I know it's not necessary in the first place, but my client wants it. So I found a method for creating such a button on this site. After implementing the solution from the website mentioned above, I could switch to desktop view from mobile devices. However, I wanted to leave an option for going back to mobile view on the requested desktop version. I wanted this button to show up only on
Need to insert header information
Hi, I have been provided with wsdl and XSD, now I have to add header information and then again generate the wsdl and xsd.This has to be done using java script. Can some help me how to start this work. I know jquery for simple things but not something such kind of work. Thanks you very much for your support Regards Sandeep Shukla
Client side file size and type validation
Hello there, I have a simple web form with a file upload input type like this <input type="file" name="upload" /> Here is jQuery code where I'm checking for file size. For some reason, the control is not getting passed into this function. This should display alert if someone tries to upload file larger than 1 MB but I don't get alerts and can upload files larger than 1 MB. Can someone point out what mistake I'm making? I'm not getting any errors. <script type="text/javascript"> $(function () { $('#upload').click(function
appending divs and nesting spans
Hello once again! I'm working on this fizzbuzz drill. In the snippets below the div js-results gets a nested div named fizz-buzz-item, then fizz-buzz-item gets a class called fizzbuzz and finally the div fizz-buzz-item gets a span. I thought snippet 1 expressed the above but it didn't work instead snippet 2 worked. could you please tell me where the difference is...because to me they both should act the same. for(var i = 1; i <= numberEntered; i++) { //snippet 1 if ( i % 15 ===0) {
What is the different between these 2 snippets?
Need somebody to help me these 2 snippets for code produce different results. Particularly the highlighted part. $(function () { //Code Snippet 1 $('div.chapter a').attr({ 'rel':'external', 'title': 'Learn more about '+ $(this).text() + ' at Wikipedia' }) //Code snippet 2 $('div.chapter a').each(function (index){ $(this).attr({ 'rel': 'external', 'title': 'Learn more about ' + $(this).text() + ' at Wikipedia' }) }) }) I am running the above code snippets
addClass() does not add class
In my css i have the following classes: .orange { background-color: orange; } .coral { background-color: coral; } .brick { color: firebrick; } .indian { color: indianred; } .pinky { color: pink; } .purple { color: RGB(102, 51, 153); font-weight: bold; } when i use them like this, they work: $('h1').addClass('blue'); $('h2').addClass('red'); $('h3').addClass('yellow pinky'); $('h4').addClass('orange
DOM manipulation methods when to use html elements and when not to
In replicating the manipulation methods exercises, I noticed that sometimes html tags are used and sometimes they are not when adding a string. What is the best practice? Thank you in advance! Ingrid
Need to create an auto scroll
I have a project and was tasked to make data scroll. I can use a grid, HTML etc. Still unsure how I want to proceed. First I need to say I have never used JScript or JQuery but all the searches pointed me to using those tools. We have dynamic data (right now everything is server side). We also are using VS 2015, Telerik and Oracle. I need to show something like the following that will scroll (settings need to be able to be changed by the user) and once it hits the bottom, a data refresh will
Need help troubleshooting uncaught reference error: jquery not defined
Hi! Need help troubleshooting uncaught reference error: jquery not defined It is a wordpress site. I'm trying to help someone use the thrive plugin to build some landing pages, but apparently it has a conflict with the theme - diamond. This is the error that is coming up and what I'm sure is causing the issue. I've tried calling jquery in the functions.php file. I don't know. I'm still learning dev for wordpress. I can't seem to locate the offending code. It doesn't help that my time is limited
JQuery code not working??
I'm new to JQuery so i might be missing something really basic. I'm using JQuery 3.1.1 My code works fine with Chrome(Version 53.0.2785.143 m) and Firefox (44.0) but does not work with the IE 11 or Edge. code snippet included below. HTML: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>A Christmas Carol</title> <link rel="stylesheet" href="03.css" type="text/css" /> <script src="./scripts/jquery.js"></script> <script src="./scripts/Jq03.js"></script>
Understanding Javascript - Object Creation vs Lookup
I have ANOTHER question about some javascript/jQuery code. It's probably not necessary, but here's where the code is from. http://www.ryansouthgate.com/2016/03/15/adding-multiline-text-to-highcharts/ Why does this line create a chart... $('#container-speed').highcharts(Highcharts.merge(gaugeOptions,... And this one doesn't? var chart = $('#container-speed').highcharts(); Am I interpreting this correctly? If so, why? What are the rules?
Understanding Javascript Concepts
I am reviewing some javascript/jQuery code and having trouble understanding a few lines of the code. I'd like to ask about one here. It's probably not necessary, but here's where the code is from. http://www.ryansouthgate.com/2016/03/15/adding-multiline-text-to-highcharts/ I cannot understand this bit of the code. Let's call it the 'original form'. var textEl = chart.renderer.text(text)
// ensures our text is centered
.css({ 'text-anchor': 'middle'})
Display Magnific Popup using AJAX on Page Load
Dear Sir/Madam I found a solution to display an Image on pageload http://stackoverflow.com/questions/18726419/how-to-load-magnific-popup-on-page-load and used it successfully in following program http://www.prajaktasoftware.com/great/indexajaxmfp.php Code to display image on page load (function($) { $(window).load(function () { // retrieved this line of code from http://dimsemenov.com/plugins/magnific-popup/documentation.html#api $.magnificPopup.open({ items: {
I have a problem with JavaScript inputting 2 more fields
Guys, I am started in programing, Would you be kind to help with this: I have subscription script, and beside email I want to input 2 more fields where people will put their name and country, and all that to be submitted into subscription file. self.$container.on("click", ".ssCountdownSubscribeSelector", function(e){ if (e && e.preventDefault) { e.preventDefault(); } var $this = $(this), $form = $this.closest('form'), $emailAddress = $form.find("input[name='email_address']"), $errorContainer = $form.find(".ss-error-container");
Hide/show video player buttons .mouseenter() .mouseleave()
Hello, As I am new to jquery, does anyone have ideas how to show video player buttons when mouse enters the video container and hide buttons when mouse leaves the container? Only the progress bar should remain on the screen, when mouse leaves. Have tried it with CSS and javascript, but nothing seems to work. I have managed to get to hide/show buttons when mouse is directly at them or leaves, but not when mouse enters the video container. HTML: <div id="video_container"> <video id="video"> <source
Next Page