15,120 Topics
| |
$("#testing").change(function() { var id = $(this).val(); $.ajax({ url:'Servlet', type:"get", dataType: "json", async: false, cache: false, processData: false, data: id, sucess: function(result) { alert(result); }, error: function(req, err) { console.log('my message' + err); } }); return false; }); | |
So I've given RequireJS a try this weekend, and although it appears to work pretty smooth, I can't figure out one thing: How do I combine PHP and Javascript while using RequireJS? See, RequireJS can only work with .js files, meaning that it cannot "require" .php files. In many files, … | |
<html> <head> <title>Entitled Document</title> <script language="JavaScript"> function getCount(){ var cn = new ActiveXObject("ADODB.Connection"); var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = F:\PhoneGap\bloodGroupDataBase.accdb;Persist Security Info=False"; //is there any wrong in this connection string cn.Open(strConn); var rs = new ActiveXObject("ADODB.Recordset"); var SQL = "select count(*) from sheet1"; rs.Open(SQL, cn); alert(rs(0)); rs.Close(); cn.Close(); } </script> … | |
I have a text item in which date return from calender in formate like dd/mm/yyyy now i want to convert this formate to dd-mon-yyyy in javascript...How i can do this.? | |
Im trying to bebug some javascript in firefox and I keep getting this error. SyntaxError: syntax error data: {action: addtocart, id: <br /> the javascript is this: <script type="text/javascript"> jQuery(document).ready(function($){ $('#button').on('click', function(e){ $.ajax({ url: 'shopping2/includes/functions.php', type: 'POST', data: {action: addtocart, id: <?php echo $pid; ?> }, cache: false, success: function(data){ … | |
<html> <head> <title>Entitled Document</title> <script language="JavaScript"> function getCount(){ var cn = new ActiveXObject("ADODB.Connection"); var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = F:\PhoneGap\bloodGroupDataBase.accdb;Persist Security Info=False"; //is there any wrong in this connection string cn.Open(strConn); var rs = new ActiveXObject("ADODB.Recordset"); var SQL = "select count(*) from sheet1"; rs.Open(SQL, cn); alert(rs(0)); rs.Close(); cn.Close(); } </script> … | |
Hi, My website is hosted within Hostgator servers, how can I render LaTeX mathematical formulae in HTML pages without using WordPress? | |
Hi I have a requestdispatcher in my doGet and a ajax get method in my jsp, I could System.out.println get my data from my ajax get method and is trying to populate this data to my 2nd dropdown. Help needed, thanks. RequestDispatcher requestDispatcher = request.getRequestDispatcher("/account.jsp"); requestDispatcher.forward(request, response); | |
I am loading shortcodes using ajax in my webpage. I am able to load shortcodes ( which essentially consists of a slider wherein when we hover over a slider, a different image comes) but the "on-hover" functionality is not working on the new sliders loaded. When i move my mouse … | |
Hello, I am looking for a script to add items to a database that can be found in the my account section, The table in the database is structured: id | user_id | slug I want to use the ajax to update and remove it later on down the road … | |
Hi guys, Can anyone please help me with this simple error. Jquery is not my strongest suite but I feel like this is something small that I'm missing. With the code below I get the error 'undefined'. html: `<a href='#' ><img src= "./images/1.jpg" width= '200px' id="2" rel="arm1" onclick = 'test()' … | |
I've got a form, that sometimes needs to have a button allowing people to authorize with stripe. To save their data I'm submitting the form to a php file, that compiles the auth URL and saves their data. This javascript function is run when the button is clicked: function stripeAuth(){ … | |
Convert string arraylist to string array ArrayList categoryList; // data is [Apple, Orange] How do you convert to string array with the same data in the arraylist | |
//jsp $("#year1").change(function(){ var dataString = $(this).val(); $.ajax({ type: "POST", url:"Servlet", dataType: "json", data: { year :JSON.stringify(dataString) }, success: function(result) { console.log(result); $('#category1').multipleSelect({ filter: true, selectAll: false }); } }); return false; }); //servlet response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); String[] year = request.getParameterValues("year1"); //error //Hi now my code is based on … | |
$("#form1").submit(function(e){ e.preventDefault(); }); $("#submit").click(function(e){ dataString = $("#form1").serialize(); var new = $("input#new").val(); dataString = "new=" + new; $.ajax({ type: "POST", url: "Servlet", data: dataString, dataType: "json", success: function( data, textStatus, jqXHR) { //our country code was correct so we have some information to display if(data.success){ $("#ajaxResponse").html(""); $("#ajaxResponse").append("<b>Country Code:</b> " + data.countryInfo.code … | |
Hi. so i have a div/form like this: ![957d3e17b3579941c6bf92e594745d43](/attachments/large/4/957d3e17b3579941c6bf92e594745d43.jpg "957d3e17b3579941c6bf92e594745d43") depending on the drop down value chosen that number of forms will appear like if value 2 chosen then 2 forms will appear if 4 then 4. the code is this: $("select[name=children]").on("change", function(){ var num_forms = $(this).val(); var form = … | |
How to validate Jquery UI auto complete filed. Im using [bootstrapvalidator](http://bootstrapvalidator.com/) to validate filed.I tried with this code its not working. $('#f_flying_from') .change(function (e) { $('#flights-tab-form').bootstrapValidator('revalidateField', 'f_flying_from'); }); | |
Hi guys, Was wondering if you could help me please. So I have a list of menu elements from which I can drag elements into a div tag. This all works fine. But I'm struggling to replace the elements with each other. So say for instance I already have an … | |
$scope.works = [ { wproperties:'<span>text #1</span><span>text #2</span><span>text #2</span><span>text #3</span>' } ] <span ng-bind-html="work.wproperties"></span> span is printing as null, who can help me? controllers and ng-app working so ng-bind-html not working.. | |
The ajaxForm function is not working well. It returns an error. Here is my code: Html: <form class="t1-form" action="ajax/upload.php" method="post" accept-charset="UTF-8" id="form" enctype="multipart/form-data"> <textarea class="txtbox" placeholder="" role="textbox" title="" name="post"></textarea> <div class="photo-selector"><button type="button" class="btn btn-default" title="attach image"><i class="fa fa-camera fa-fw"></i> Upload</button><div class="image-selector"><input type="hidden" name="photoId" value="" id="photoId" class="file-data" autocomplete="off"><label class="t1-label"><span class="visuallyhidden">Add photo</span> <input … | |
Hi, I'm trying to get the value from a javascript: `window.locaiton.href = "db/create_eoi.php?refNum=" + rNum;`. <?php if(isset($_GET["rNum"])){ $refNum = trim($_GET["rNum"]); } ?> the problem is that where ever I use `$refNum` I get an error saying Undefined Variable. To be more clear: what im doing is getting a value from … | |
I am currently developing a Simon says type game using jquery and javascript. I have linked a fully copy of the game on github Github download and unzip to see the game fully https://github.com/Jamiex304/Simon_Says_Game_Demo And I have reached a problem I want to add a timer that the player can … | |
Hi I have a problem in which an HTML/JavaScript page, using the excellent AblePlayer Audio Player, which runs perfectly on my Home server (Latest version of Wamp), but will not run when it is uploaded to our 1and1 shared server space. The code for this page is shown below, and … | |
I want to show a specific color based on the value i get from the Json response. i.e. if the temp = any number between 1 and 15 it will show a blue box below and... if the temp = any number between 16 and 25 it will show a … | |
I have a known good web page that works without (known) errors when it loads. However, when I try to load it using a very laggy connection (more than 6-10 seconds to load the page - when all works well, it can load in under 500 ms), my hosting provider … | |
Hello, I'm having some problems with my jQuery script. It works correctly except it doesn't wait for the internal AJAX request to return before adding the variable data 'daa' to the HTML table variable. I debugged it a bit using 'alert' and I think it's adding the 'daa' data to … | |
Hello I am trying to learn the differences from Java and JavaScript so I am trying to take a working simple program in Java and make it work in JavaScript. I keep getting undefined. Here is the JavaScript I am trying: <script type="text/javascript"> function _(x) { return document.getElementById(x); } function … | |
Hi All, I have a application , which onclick of submit takes content in textarea and do some back end stuff and finally opens a .html in a iframe. My problem is, the .html in iframe should change on each submit button in coresponding to the content in the textarea.... … | |
Hi, Say I have a 2 page website each have their own script, how can I make a page get a data form the other page? for example I have an int 1-10, page 1 took int 5; how can i make it so page 2 can't select int 5 … | |
I have a form that has two parameters amenities and attributes. The amenities parameter has a dropdown menu that whose value gets populated from a separate table. The second parameter is attribute whose value will be entered by the user and will get saved in a database. View of database … |
The End.