Search Results

Search found 59301 results on 2373 pages for 'asp net ajax'.

Page 117/2373 | < Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >

  • Is it redundant to say: "JavaScript + AJAX"?

    - by Oscar Reyes
    In a recent discussion I had, somebody told me that is incorrect to say that because Ajax is Javascript already. The contenxt: "How do I blablablabal in a webpage so it doesn't have to do a page refresh" My answer: "Use JavaScript + Ajax" EDIT Ok, it is, so... how should I say it? "Use AJAX"? or "Use Javascript"?

    Read the article

  • jQuery ajax request to php, how to return plain text only

    - by jyoseph
    I am making an ajax request to a php page and I cannot for the life of me get it to just return plain text. $.ajax({ type: 'GET', url: '/shipping/test.php', cache: false, dataType: 'text', data: myData, success: function(data){ console.log(data) } }); in test.php I am including this script to get UPS rates. I am then calling the function with $rate = ups($dest_zip,$service,$weight,$length,$width,$height); I am doing echo $rate; at the bottom of test.php. When viewed in a browser shows the rate, that's great. But when I request the page via ajax I get a bunch of XML. Pastie here: http://pastie.org/1416142 My question is, how do I get it so I can just return the plain text string from the ajax call, where the result data will be a number? Edit, here's what I see in Firebug- Response tab: HTML tab:

    Read the article

  • jQuery - Ajax post result in html displaying in wrong position

    - by Sev
    I have a site with user posted threads that get voted on (up or down), and a vote count is displayed next to each thread. The voting up and down process is being done through jQuery/Ajax, and using something like this: $.ajax({ url: 'vote.php', success: function(data) { $('.result').html(data); } }); the html of the vote count is being updated (.result being the class of the div that holds the vote count number) Also, the threads are being sorted first by vote count descending, and then alphabetically. I'm having a problem with the ajax updating the HTML vote count in real time, i have a hunch that the issue is due to the fact that the order of the threads are changing when the vote count is being updated, but I'm not certain. I know the database is being updated, and when I refresh the page, it's also being updated correctly, but I'm not seeing the real-time behavior that I expect from jQuery/Ajax. What might be the problem?

    Read the article

  • Securing an ajax request

    - by asdasdsa
    i have a website that uses session cookies for security. it works fine and all, but any ajax requests right now are not secure. example being lets say a user is on a page. they can only get to this page if they are logged in with a session - so far so good. but now the ajax request they ask for is ajaxpages/somepage.php?somevar=something&anothervar=something if any other user decides to just go to that link themselves (without a session) they still get the same ajax output that was meant for logged in people. so obviously im going to have to pass session data across when i send an ajax request. anyone have any tips for the best way of doing this? ive never done this before and would rather use trusted methods than make up my own.

    Read the article

  • Jquery Ajax + PHP

    - by Kris.Mitchell
    I am having problems with jQuery Ajax and PHP I have my php file set up to echo the data I am gathering from a mysql database. I have verified that the database is returning something and that the string at the end of the function actually contains data. What is happening though, is that it looks like the php echo is happening before the ajax call, causing the php data to be displayed at the top of the page, and not below in proper div. I think it might have something to do with timing of the ajax and the php call, but I am not sure. So, why is the data not getting caught by the .ajax and thrown into the div? Thanks for the help! jQuery $(document).ready(function() { $.ajax({ url: "../database_functions.php", type: "GET", data: "cat=jw&sub=pi&sort=no", cache: false, success: function (html) { alert("Success!"); $('#product-list').html(html); } }); }); PHP echo "Hello World";

    Read the article

  • ASP Repeater Evals mixed with HTML

    - by Bry4n
    I want to include HTML and Eval within a Repeater: <asp:Repeater ID="Rpt" runat="server" DataSourceID="DS"> <HeaderTemplate><div id="gallery"></HeaderTemplate> <ItemTemplate> <a href='<%# Eval("Url") %>' class="show"> <img src='<%# Eval("Image") %>' alt='<%# Eval("Title") %>' title="" runat="server" id="sb1" rel='<%# Eval("Title") %>'/></a> </ItemTemplate> <FooterTemplate></FooterTemplate> </asp:Repeater> I want the rel attribute Eval Title to have h3 tags wrapped around it. I've done this before, but I'm drawing a huge blank

    Read the article

  • using jquery into an ajax nested html file

    - by TrustWeb
    Hello, i am trying to solve this problem: i have a tab interface build with jquery.tools, more exactly i used the ajax tab to load external html files into div. you can see the example here: http://flowplayer.org/tools/demos/tabs/ajax.html i am trying to use jquery to animated the elements loaded by ajax, do you know if and how is it possible? i am trying both loading scripts outside, in the main page, or in the loaded page. thanks a lot

    Read the article

  • jQuery wait for ajax call to be over before continuing

    - by Flo
    Hi all, I have a problem with a jQuery ajax call. I need to wait for the call to be finished in order to return a value. However, the script seems to jump ahead and not wait for the call to be over. my function then returns "undefined". I have tried to use the .ajax() method and set the value of async to false, but this would not work either. I could I get my function to return the value that I could through the ajax call? Thank you! Here is the code: function get_rsrce_name(){ jQuery.post( '<?php echo admin_url( 'admin-ajax.php' ); ?>', { action :'my_action', option_rsrce : 'option_rsrce' }, function( data ) { output = data.option_name; }, "json" ); return output; }

    Read the article

  • Create web application with ajax from the begining or add ajax later?

    - by klew
    I'm working on my first Ruby on Rails aplication and it's quite big (at least for me ;) - database has about 25 tables). I'm still learning Ruby and Rails and I never wrote anything in Javascript nor Ajax. Should I add Ajax to my application from the begining? Or maybe it will be better to add it latter? Or in the other words: is it (relatively) easy to add ajax to existing web application?

    Read the article

  • Ajax div can't access address bar variable

    - by Elaine Adams
    Can someone please advise me on how my Ajax div can get an address bar variable. The usual way just doesn't work. My address bar currently looks like this: http://localhost/social3/browse/?locationName=Cambridge Usually, I would use a little php and do this: $searchResult = $_POST['locationName']; echo $searchResult; But because I'm in an Ajax div, I can't seem to get to the variable. Do I need to add some JavaScript wizardry to my Ajax coding? (I have little knowledge of this) My Ajax: <script> window.onload = function () { var everyone = document.getElementById('everyone'), searching = document.getElementById('searching'), searchingSubmit = document.getElementById('searchingSubmit'); everyone.onclick = function() { loadXMLDoc('indexEveryone'); everyone.className = 'filterOptionActive'; searching.className = 'filterOption'; } searching.onclick = function() { loadXMLDoc('indexSearching'); searching.className = 'filterOptionActive'; everyone.className = 'filterOption'; } searchingSubmit.onclick = function() { loadXMLDoc('indexSearchingSubmit'); } function loadXMLDoc(pageName) { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("leftCont").innerHTML=xmlhttp.responseText; } } function get_query(){ var url = location.href; var qs = url.substring(url.indexOf('?') + 1).split('&'); for(var i = 0, result = {}; i < qs.length; i++){ qs[i] = qs[i].split('='); result[qs[i][0]] = decodeURIComponent(qs[i][1]); } return result; } xmlhttp.open("GET","../browse/" + pageName + ".php?user=" + get_query()['user'],true); xmlhttp.send(); } } </script> <!-- ends ajax script -->

    Read the article

  • Wordpress ajax conflicts

    - by Phil
    I have problems with wordpress and ajax. The ajax request via jQuery just dont work. Jquery noconflict is enabled and the effects work but the ajax requst dont. Where could be the problem? Thank you!

    Read the article

  • symfony2.4 ajax call update or set session issues

    - by user3797283
    i have an issue with symfony2 when i use ajax to set session, hope u pro guys can help me. here is my controller code: //show month event list public function indexAction() { if ($this->getRequest()->isXmlHttpRequest()) { $paging = $this->getRequest()->get("nom"); $session = $this->getRequest()->getSession(); if ($paging) { //if $paging is set, then that's a click pager ajax event //(not 1st time load) $year = $paging; $session->set('year', $year); } else { //$paging is null, it's the first time page load $year = (new \DateTime())->format("Y"); $session->set('year', $year); } $repository = $this ->getDoctrine() ->getManager() ->getRepository('HycAccountBundle:MonthEvent'); $annuallist = $repository->monthListByYear($year); $jsonlist = json_encode($annuallist); return new Response($jsonlist); } //this part is to return entity to twig for using after $em = $this->getDoctrine()->getManager(); $allimages = $em->getRepository('HycAccountBundle:TypeImage') ->findAll(); return $this->render('HycAccountBundle:Account:index.html.twig', array('allimages' => $allimages)); } here is my twig code: <script type="text/javascript"> $(function() { $(document).ready(function (){ jQuery.ajax({ type: 'GET', cache: false, url: "{{ path('hyc_account_homepage') }}", success: function(data, textStatus, jqXHR) { alert({{app.session.get('year')}}); //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //!!!!!!!!! here i can get year 2014 !!!!!!!!!!!!!! //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! }, error:function (){ alert('error!'); } }); return false; }); }); </script> but when i click pager part, for example, i click year 2013, then ajax call will return a number (data: 'nom=' + num) to controller, but there i reset session value to num normally, but i cant get alert correct session (it's always 2014 as the 1st time) here is the code ajax, almost same as above: <script type="text/javascript"> $(document).ready(function(){ //after paging, reload month $('#page-selection').bootpag({ total: 3000, page: 2014, maxVisible: 5 }).on('page', function(event, num){ jQuery.ajax({ type: 'GET', url: "{{ path('hyc_account_homepage') }}", data: 'nom=' + num, success: function(data, textStatus, jqXHR) { alert({{app.session.get('year')}}); //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //here is the problem, it's always 2014, not set again !!!!!!!! //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! }, error:function (){ alert('error!'); } }); return false; }); }); </script> hope u guys help me, thanks in advance, i've tried for almost 1 day and looked for almost all in google but find nothing = =

    Read the article

  • Handling a Long Running jsp request on the server using Ajax and threads

    - by John Blue
    I am trying to implement a solution for a long running process on the server where it is taking about 10 min to process a pdf generation request. The browser bored/timesout at the 5 mins. I was thinking to deal with this using a Ajax and threads. I am using regular javascript for ajax. But I am stuck with it. I have reached till the point where it sends the request to the servlet and the servlet starts the thread.Please see the below code public class HelloServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("POST request!!"); LongProcess longProcess = new LongProcess(); longProcess.setDaemon(true); longProcess.start(); request.getSession().setAttribute("longProcess", longProcess); request.getRequestDispatcher("index.jsp").forward(request, response); } } class LongProcess extends Thread { public void run() { System.out.println("Thread Started!!"); while (progress < 10) { try { sleep(2000); } catch (InterruptedException ignore) {} progress++; } } } Here is my AJax call <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>My Title</title> <script language="JavaScript" > function getXMLObject() //XML OBJECT { var xmlHttp = false; xmlHttp = new XMLHttpRequest(); //For Mozilla, Opera Browsers return xmlHttp; // Mandatory Statement returning the ajax object created } var xmlhttp = new getXMLObject(); //xmlhttp holds the ajax object function ajaxFunction() { xmlhttp.open("GET","HelloServlet" ,true); xmlhttp.onreadystatechange = handleServerResponse; xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send(null); } function handleServerResponse() { if (xmlhttp.readyState == 4) { if(xmlhttp.status == 200) { document.forms[0].myDiv.value = xmlhttp.responseText; setTimeout(ajaxFunction(), 2000); } else { alert("Error during AJAX call. Please try again"); } } } function openPDF() { document.forms[0].method = "POST"; document.forms[0].action = "HelloServlet"; document.forms[0].submit(); } function stopAjax(){ clearInterval(intervalID); } </script> </head> <body><form name="myForm"> <table><tr><td> <INPUT TYPE="BUTTON" NAME="Download" VALUE="Download Queue ( PDF )" onclick="openPDF();"> </td></tr> <tr><td> Current status: <div id="myDiv"></div>% </td></tr></table> </form></body></html> But I dont know how to proceed further like how will the thread communicate the browser that the process has complete and how should the ajax call me made and check the status of the request. Please let me know if I am missing some pieces. Any suggestion if helpful.

    Read the article

  • ASP.NET Custom Control - Default Template?

    - by Bob Fincheimer
    I know this is really picky, but can I have one template inside a user control: <uc:MyUserControl runat="server" ID="test"> <div><b>Test</b></div> <asp:PlaceHolder runat="server" id="pH" /> </uc:MyUserControl> Instead of what I have now which requires me to: <uc:MyUserControl runat="server" ID="test"> <Content> <div><b>Test</b></div> <asp:PlaceHolder runat="server" id="pH" /> </Content> </uc:MyUserControl> Basically I want my control to have only one ITemplate inside of it.

    Read the article

  • Running javascript in AJAX loaded DIV

    - by WiseDonkey
    I have page loading, via AJAX a PHP page into a div. In turn, this loaded page has it's own javascript and AJAX loaded div. Reason is to allow user to select data alter data within loaded data. I'm trying to do this without the help of JSON or such to communicate between JS and PHP. I'm guessing the parent calling page has already loaded the javascript, and the AJAX loaded content can't access that? (I've tried running the JS into the AJAX loaded content as well) If so, is there anyway to access that?

    Read the article

  • asp:QueryStringParameter and empty query string parameter

    - by abatishchev
    I haveasp:GridView displaying client requests using asp:SqlDataSource. I want to limit displayed information by client: View.aspx has to display everything, View.aspx?client=1 has to display only requests from client ID #1. So I'm using <asp:QueryStringParameter Name="client" QueryStringField="client" /> for query "EXEC getRequests @client". Everything works properly when some client is specified. But don't - if not. I tested my SP using SSMS - it works properly in both cases - when parameter is specified and when it isn't (NULL passed explicitly). What have I do?

    Read the article

  • Ajax function not called when included

    - by Sev
    I have an ajax function that is not run when the ajax script is included in my HTML page like so: <script type='text/javascript' src='ajax.js'></script> However, if I place the exact same script in the head portion of the HTML page, then it does run. Why does this occur, and how can I fix it?

    Read the article

  • send datas to php with ajax - Internal Server Error(500)

    - by user1277467
    i try to send my datas to php with ajax but there's strange mistake. this is my ajax script, function deleteData2() { var artistIds = new Array(); $(".p16 input:checked").each(function(){ artistIds.push($(this).attr('id')); }); $.post('/json/crewonly/deleteDataAjax2', { json: JSON.stringify({'artistIds': artistIds}) }, function(response){ alert(response); }); } i think this works correctly but in php side, i face 500 internal server error(500). public function deleteDataAjax2() { $json = $_POST['json']; $data = json_decode($json); $artistIds = $data['artistIds']; $this->sendJSONResponse($artistIds); } Above code is my php. For example, when i try to send $data to ajax, i print my ids in json mode: However, when i try to send $artistIds to ajax side, i gives 500 error why?

    Read the article

  • Loading jQuery gallery after the Ajax call

    - by TiiMoo
    I am trying to put a jQuery gallery after the Ajax call. On my main site, I create a div which wrap the main content (e.g site_content). When users click on one of the hyperlink on the main page, the "site_content" will get updated and display other content which is saved at other HTML file and I am using AJAX to avoid the whole page refresh. However I having a problem of running the JavaScript/jQuery gallery because the JavaScript won't work after the AJAX call. I understand that because the browser does not know there will be some functions to call after the content (from the other HTML file) is successfully displayed. I tried to use the jQuery getScript method but it is still not working. Could anyone give me some ideas how can I run the javaScript/jQuery gallery after the AJAX call? Thanks

    Read the article

  • ajax not working in codeigniter

    - by user1800797
    I'm trying to send a post request using the ajax jquery function and return some data into a window asynchronously. Here's what I have so far. It doesn't seem to be working. in the view: $.ajax({ url: '/dashboard/presskits/media/get_video_link/', type: 'POST', dataType: 'json', data: { encoded_link : encoded_link }, cache: false, success: function(output_string){ // $('#edit_video_info').append(output_string); alert(output_string.url_data); } // End of success function of ajax form }); // End of ajax call }); in the controller: public function get_video_link() { $temp_url = $this->input->post('encoded_link'); $output_string = json_encode(array('url_data' => $temp_url)); return $output_string; }

    Read the article

  • Using AJAX to POST data to PHP database, then refresh

    - by cb74656
    Currently I have a button: <ul> <li><button onclick="display('1')">1</button></li> <li><button onclick="display('2')">2</button></li> <li><button onclick="display('3')">3</button></li> </ul> That when pressed, calls a javascript function, and displays PHP based on which button is pressed using AJAX. I figured this out all on my own. The AJAX gets a PHP file with a postgres query that outputs a table of data to a div. Now I want to be able to add, via form, new data and have it refresh (without reloading the page, yannknow?). I've tried a couple of things, and have hit roadblocks every time. My initial idea was to have the form submit the data using a javascript function and AJAX, then call my "display()" function after the query to reload the content. I just can't figure it out using GoogleFu. Based on my current idea, I'd like help with the following: How do I pass the form data to a javascript function. How do I use POST to pass that data to PHP using AJAX? I'm super new to javascript and AJAX. I've looked into jquery as it seems like that's the way to go, but I can't figure it out. If there's a better way to do this, I'm open to suggestions. Please forgive any misuse of nomenclature. EDIT: Once I solve this problem..., I'll have all the tools needed to finish the project preliminarily.

    Read the article

  • Would you re-design completely under .Net?

    - by dboarman
    A very extensive application began as an Access-based system (for database storage). Forms were written in VB5 and/or VB6. As .Net became a fixture in the development community, certain modules have been rewritten. This seems very awkward and potentially costly just to maintain because of the cross-technologies and extra work to keep the two technologies happy with each other. Of course, the application uses a mix of ODBC OleDb and MySql. Would you think spending the time and resources to completely re-develop the application under .Net would be more cost effective? In an effort to develop a more stable application, wouldn't it make sense to use .Net? Or continue chasing Access bugs, adding new features in .Net (which may or may not create new bugs between .Net and Access), and rewriting old Access modules into .Net modules under time constraints that prevent proper design and development? Update The application uses OleDb and MySql - I corrected my previous statement. Also, to lend further support to rewriting: I have since found out that when the "porting" to .Net began, the VBA/VB6 code that existed was basically translated to the .Net equivalent. From my understanding, nothing was done to improve performance, or take advantage of new libraries or technologies. In my opinion, this creates a very fragile and unstable application. With every new update, this becomes more and more visible. As a help desk technician, I have noticed an increase in problems reported. The customers using the software have noticed an increase in problems and are commenting on it.

    Read the article

< Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >