Search Results

Search found 8271 results on 331 pages for 'ajax beginform'.

Page 68/331 | < Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >

  • open source flash or ajax sketchpad?

    - by Fh
    For a non-profit (charity) site I need a simple sketchpad (drawing) component. It should be able to: Let the user draw a simple black on white sketch. Save to server the full drawing steps. Save to server the final image. Re-play the drawing steps to future users. http://www.sketchswap.com/ has a similar component. Do you know where I could find an open source component to use in this project? Thanks,

    Read the article

  • Ajax: Partial refresh of a parent page (update a div) from "lightbox" window

    - by superUntitled
    Is there a way to update information in a div of a parent page from a pop-up/"lightbox" window. I would like to create a pop up window that contains a form that updates a database (currently i am using php/mysql with prototype). In other words... I would like a user to be able to use a form in a popup window to update the database, and the changes that are made to be shown on the parent page without that parent page being refreshed. Thanks.

    Read the article

  • AJAX filter MySQL results using checkboxes

    - by keepitnang
    I'm attempting to get to grips with displaying filterable MySQL data within a PHP page based on user checkbox selections. I have a database of domain names and the dates on which these will require renewal as per Nominet DAC information and I can get unfiltered data to display, but filtering results by domain extensions is proving tricky for me to accomplish. I should point out at this stage that I am a serious newcomer to many of the ideas I am trying to learn to work with here, so please be gentle. I have tried following some other articles on here also, but no dice. I have the following so far: HTML <input type="checkbox" class="extensions" name="extensions" value=".co.uk">.co.uk</input> <input type="checkbox" class="extensions" name="extensions" value=".org.uk">.org.uk</input> Script $('.extensions').live('click', function() { var all_boxes = $('.extensions'); var all_boxes_values = []; var i = 0; for (var i; i < all_boxes.length; i++) { if (all_boxes[i].checked) { all_boxes_values.push(all_boxes[i].value) } } var all_boxes_values_clean = all_boxes_values.join(", "); console.log(all_boxes_values_clean); $.get("sql-test.php", {q: all_boxes_values_clean}, function(result) { $("div#output").html(result); } )}); PHP $g = $_GET['q']; $extensionsql=""; $extension=1; if(isset($g)) { $extension=1; $param = "" . str_replace(",", "','", $_GET['q']) . ""; } And that's as far as I have gotten with my limited ability. What I would like to do next is search the column domainName for a string match and return the appropriate results to the user. Something to mimic something like the following but I'm not sure how to achieve it. Any help would be much appreciated: SELECT * FROM `refresh` WHERE `domainName` LIKE '%.co.uk%' AND renewalDate LIKE '%2012-06-30%' ORDER BY `domainName` ASC Thanks

    Read the article

  • Put specific tds from a table row into edit using jQuery (then update w/ ajax)

    - by bbqsauced
    I'm somewhat new to jQuery, so I could use some help here. This is my issue: I have a php script outputting a dynamic table. Each row has an "edit" button, plus some other fields. Only 3 of those need to be turned into an input box. The edit button should only put that specific row into "edit mode." I got as far as assigning each row a unique class by adding a number to the end of it. I have been able to use jQuery to change all of the rows into edit mode, but I need it to be specific to a row. An example row would have classes like name0, price0, and desc0. The next row would go on to classes name1, price1, and desc1 (for the fields that need changed). How can I reference these values and pass them to jQuery so it processes an event on just those elements?

    Read the article

  • optimized search using ajax and keypress

    - by ooo
    i have the following code as i want to search a database as a user is typing into a textbox. This code below works fine but it seems a little inefficient as if a user is typing really fast, i am potentially doing many more searches than necessary. So if a user is typing in "sailing" i am searching on "sail", "saili", "sailin", and "sailing" i wanted to see if there was a way to detect any particular time between keypresses so only search if user stops typing for 500 milliseconds or something like this. is there a best practices for something like this? $('#searchString').keypress(function(e) { if (e.keyCode == 13) { var url = '/Tracker/Search/' + $("#searchString").val(); $.get(url, function(data) { $('div#results').html(data); $('#results').show(); }); } else { var existingString = $("#searchString").val(); if (existingString.length > 2) { var url = '/Tracker/Search/' + existingString; $.get(url, function(data) { $('div#results').html(data); $('#results').show(); }); } }

    Read the article

  • Ajax, not sending querystring data

    - by Tom Gullen
    var http = false; // Creates xmlhttp object if (navigator.appName == "Microsoft Internet Explorer") { http = new ActiveXObject("Microsoft.XMLHTTP"); } else { http = new XMLHttpRequest(); } http.onreadystatechange = function() { if (http.readyState == 4) { alert(http.responseText); } } // Functions to calculate optimum layout etc. function compute() { var statusSpan = document.getElementById("cwStatus"); document.getElementById("fader").style.display = ""; document.getElementById("computingWait").style.display = ""; statusSpan.innerHTML = "<b>Status:</b> Realigning sattelites" http.open("GET", "alg.aspx?cr=8&cc=7&sq=3,3", true); http.send(null); } This code sort of works, but the querystring data isn't being passed through. It keeps returning an ASPX error page which only happens when there is no querystring data. Thanks for any help

    Read the article

  • Why does this php/ajax query fail?

    - by Ashley Brown
    I'm ajaxing over to this php file. $a = 'old'; $b = 'new'; if ($_POST['info-type'] == $a || $b) { $info = $_POST['info-type']; $query = "SELECT * FROM `tld` WHERE type = '".$var."'"; } $query = "SELECT * FROM `tld` "; $result = mysqli_query($link,$query); while($row = mysqli_fetch_assoc($result)) { echo '<div>'.$row['something'].'</div>'; } The data posted is either 'all' 'new' or 'old'. If i send the data as either new or old, the script works and outputs as expected. If the posted data is neither new or old but all instead, it fails and don't show any errors or respond anything back. (I've monitored via dev tools aswell) So, I tried this if ($_POST['info-type'] == $a || $b) { $info = $_POST['info-type']; $var = "SELECT * FROM `tld` WHERE type = '".$var."'"; } elseif ($_POST['info-type'] == 'all'){ $query = "SELECT * FROM `tld` "; } But the script still fails. If i fully remove the IF statements and use the query without the WHERE clause like it is after the elseif, it works?

    Read the article

  • Problem loading js content with ajax

    - by Justin Goodman
    I have a page that loads content into a single div via a script in the page. It works fine but the problem is that I have a lightbox in one of the dynamically loaded pages that only works the first time you navigate to it (the script I got for the page loading is found here). Once you navigate to another area, then back again, the lightbox fails to work and instead just loads the plain image. It's been suggested that the easiest way to fix this would be to have a script unload the js and css that is loaded in with the page, then reload it when you go back to the gallery section. I'm a designer, not a developer though, so I don't know if this is true or not. Any help is really appreciated. The page can be found here: justgooddesign.net/graduation/

    Read the article

  • jQuery ajax response not operating correctly

    - by mmarceau
    Ok this is frustrating... The code below works "correctly" as far as sending the email address to the SaveEmail URL and it gets saved correctly each time I change the drop down. However it only outputs the "Successful" message once, no matter how many times I change the value in the drop down. The "data" that is returned is "Successful". I would like to show the message for a couple seconds, then fade it out. It works correctly the first time I change the drop down, after that the change happens and the value gets saved, but the "Successful" message doesn't display. jQuery code: $('#AgentEmails').change(function() { var NewAddress = $('#AgentEmails').val(); $.post('SaveEmail.aspx', { email: NewAddress }, function(data) { $('#SelectMsg').html("<b>" + data + "</b>").fadeOut(); }); }); HTML code: <select ID='AgentEmails' runat='server'> <option value="[email protected]">TEST</option> </select><span id='SelectMsg'></span> What needs to be changed in my code to make this operate correctly? Thanks for the help.

    Read the article

  • browser instant updates with ajax/jquery

    - by wcpro
    I'm trying to reverse engineer how facebook handles their notifications, where when you get a message you get instantly notified via the browser. I've fiddled with it for a little bit and realized that there is always a pending GET request "listening" if you will to some sort of update from the server. This appears to be some sort of observer pattern. I was just wondering if this pattern was documented somewhere.

    Read the article

  • facebook comments ajax

    - by Shunsho
    I have a function that load a jquery ui accordion (differents accordions based on different id) When I click on the tab titled "Facebook Comments" I do: $("#myaccordion").bind('accordionchange', function(event, ui) { id = $("#myaccordion").data('id'); switch (ui.newHeader.text()) { case "Facebook Comments": displayFb(id); break; } }); The "displayFB" function is: function displayFb(id){ $.get('/fbcomments/' + id, function(data) { $("#facecomm").append(data); }); } Where www.myweb.com/fbcomments/id is: <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/es_ES/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-comments" data-href="<?php echo '/fbcomments/'.$id ?>" data-num-posts="10" data-width="220"></div> When I load the homepage, then choose an accordion, then open a Facebook Comments, it works perfect. If I reload the page and choose another accordion, work perfect again. The problem is when I choose another accordion or the same again without reload the whole page. The accordions loads very well, all the data on them (some tabs of images, text, videos, etc), but the facebook comments don't appear. I tried: loading the #fb-root and facebook comment <script> on the main layout....doesn't work. adding FB.XFBML.parse(); into displayFB function....doesn't work adding FB.XFBML.parse(); into a $(document).ready(function(){} ...doesn't work. Thank you for reading and try to help!!

    Read the article

  • jquery: How to deal with 'this' in ajax callbacks

    - by Svish
    I currently have code similar to this for a form: $('#some-form') .submit(function() { // Make sure we are not already busy if($(this).data('busy')) return false; $(this).data('busy', true); // Do post $.post("some/url", $(this).serialize(), function(data) { if(data.success) // Success is a boolean I set in the result on the server { // Deal with data } else { // Display error } $('#some-form') .removeData('busy'); }); return false; }); My issue is that I would like to somehow remove the need for knowing the form id in the post callback. In the end where I remove the busy data from the form, I'd like to somehow not have that hard coded. Is there any way I can do this? Is there a way I can hand whatever is in this to the post callback function? Since I know the id right now, I can get around it by doing what I have done, but I'd like to know how to not be dependant on knowing the id, since often I don't have an id. (For example if I have a link in each row in a table and all the rows have the same click handler.

    Read the article

  • Pass data via ajax to dialog Jquery

    - by user342391
    I am trying to post data from my form to a jquery dialog that loads external content. I am serializing the form data which works (appears in the url) but the dialog won't open: $("#wavajax button").click(function() { $.post({url: 'player/index.php', data: $("#wavajax").serialize(), success: function (data) { $("#recordingdialog").load("player/index.php", [], function(){ $("#recordingdialog").dialog("open"); } }); return false; }); What am I doing wrong, am I going about it the right way???

    Read the article

  • Stop then restart submit() after ajax check

    - by jeerose
    I asked a question [here] recently and it's just not providing me with an answer. Here's what I want to do and you can see my first attempt at the link above: User submits form Stop default submit action check to see if a similar entry exists in database If it does, display a notice asking them if they want to submit anyway and give an option to let them submit anyway (enable default action and submit it). If it does not, enable the default action on the form and let it submit I'm at a loss. Any help is appreciated. Thanks gang.

    Read the article

  • Ajax using Rails

    - by Steve
    Hi, I have a favourite and un-favourite functionality in my application and I am using jQuery. This functionality works partially. The page gets loaded, and when I click the 'favourite' button(it is inside add_favourite_div element), it sends a XHR request and the post is set as favourite. Then a new div called "remove_favourite_div" replaces its place.Now when I click the remove favourite(which is part of remove_favourite_div), it sends a normal http request inside of xhr. The structure when the page gets loaded first time <div id="favourite"> <div id="add_favourite_div"> <form method="post" id="add_favourite" action="/viewpost/add_favourite"> <div style="margin: 0pt; padding: 0pt; display: inline;"> <input type="hidden" value="w873BgYHLxQmadUalzMRUC+1ql4AtP3U7f78dT8x9ho=" name="authenticity_token"> </div> <input type="hidden" value="3" name="Favourite[post_id]" id="Favourite_place_id"> <input type="hidden" value="2" name="Favourite[user_id]" id="Favourite_user_id"> <input type="submit" value="Favourite" name="commit"><br> </form> </div> </div> DOM after clicking on the unfavourite button <div id="favourite"> <div id="remove_favourite_div"> <form method="post" id="remove_favourite" action="/viewpost/remove_favourite"> <div style="margin: 0pt; padding: 0pt; display: inline;"> <input type="hidden" value="w873BgYHLxQmadUalzMRUC+1ql4AtP3U7f78dT8x9ho=" name="authenticity_token"> </div> <input type="hidden" value="3" name="Favourite[post_id]" id="Favourite_place_id"> <input type="hidden" value="2" name="Favourite[user_id]" id="Favourite_user_id"> <input type="submit" value="UnFavourite" name="commit"><br> </form> </div> </div> In my application.js, I have two functions to trigger the xhr request $("#add_favourite").submit(function(){ alert("add favourite"); action = $(this).attr("action") $.post(action,$(this).serialize(),null,"script"); return false; }); $("#remove_favourite").submit(function(){ alert("remove favourite"); action = $(this).attr("action"); $.post(action,$(this).serialize(),null,"script"); return false; }); Here, when the post is initially not a favourite, favourite button is displayed and when i clicked on the button, $("#add_favourite").submit gets called and unfavourite form is displayed correctly, but now when I click on the un-favourite button, $("#remove_favourite").submit does not get called. The whole scenario is true in both ways, I mean favourite-Unfavourite and Unfavourite-favourite Can someone please help me to solve this Thanks

    Read the article

  • ajax security ?

    - by Tony
    When I look back my codes that written earlier time, I found something terribly bad. Whenever I want to delete a record in the database, I did like this : $.post("deleteAction.do",{recordId:10}); I cannot prevent a malicious user visit my database operation url directly : deleteAction.do?recordId=10 What's the solution for this kind of problem ?

    Read the article

  • Mapping restful ajax requests to spring

    - by Diones
    I have this piece of code: @RequestMapping(value = "/test.json", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public @ResponseBody Object[] generateFile(@RequestParam String tipo) { Object[] variaveis = Variavel.getListVariavelByTipo(tipo); return variaveis; } As far as I know it should take a request to test.json?tipo=H and return the JSON representation of Variavel[], however when I make such request I get: HTTP Status 406 - type Status report message descriptionThe resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers () By using the following function I can get the expected json: @RequestMapping(value = "/teste.json") public void testeJson(Model model, @RequestParam String tipo) { model.addAttribute("data", Variavel.getListVariavelByTipo("H")); } What I'm doing wrong?

    Read the article

  • A brief question about JS or AJAX

    - by Luke
    I have been finding ways around this for a long time but think it's time I addressed it. If I have a page that has a dropdown menu, is there anyway I can select a value which will subsequently load other values further down. Can this be done without a page reload? I will give you an example. Say I was making some tools for an admin panel, but first of all they needed to select a member to work with. They would select the member and then below, the fields about that member would be populated based on what was selected in the first menu. As I have already asked, can this be done without a page reload? Thanks for reading.

    Read the article

  • how to submit using link with my current code(php+jquery+ajax)

    - by ruslyrossi
    My current Code : <script type="text/javascript"> $(document).ready(function() { $('#form').ajaxForm( { target: '#preview', success: function() { $('#success_box').addClass('success') setTimeout(function() { $('#success_box').fadeOut('slow'); }, 3100); // <-- time in milliseconds } }); }); </script> <form action="controller/product_edit_update.php" method="post" id="form" name="form" > bla..bla.. <input type="submit" value="Save" /></form> but now i want to add submit link with <a href="" id="submit_with_link" >Save</a>

    Read the article

  • cakephp droplist/form - xml and ajax

    - by gudinne
    Hello- I'm complete noob in Cakephp - here goes... I have a website set up with Cakephp framework. I have been tasked with creating two dropdown forms to compare/show data. When the user selects an item from the dropdown from either one of the forms it is to show the content below on website. I was thinking this data would need to be stored in an xml file. How do I create and sync two dropdown forms with xml data within Cakephp? The page the form is on is the view(.ctp) file. Thanks

    Read the article

  • ajax + freewebhostingarea body tag replacement

    - by mandnd
    im using freewebhostingarea and he searches for the body tag and add a banner the problem is im using ipb shoutbox (3.0.x) and everytime there a tbody tag he keeps putting that banner so the shoutbox is full of banners heres the code http://pastebin.com/d4KZJqu9

    Read the article

  • How to get final destination URL from AJAX?

    - by Maurice Lam
    When I do an XMLHttpRequest, I always get redirected automatically to the URL (presumably by the headers of the response). For example, if I query "http://www.stackoverflow.com" I will be redirected to "http://stackoverflow.com". How can I get that final URL? (http://stackoverflow.com/ in the example) I checked in the response headers but I cannot seem to find it. (I just used the GET/POST method not HEAD).

    Read the article

< Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >