Search Results

Search found 2 results on 1 pages for 'werm'.

Page 1/1 | 1 

  • jQuery append value to html input depending on other input

    - by werm
    Ok, the title is a bit confusing, but here's my predicament. I've made a web app to track UPS packages internally at work. Currently, you input the tracking number and then select the city it was shipped from. All tracking numbers from an account start with the same X amount of numbers. So if someone entered "1Z8473..." into one input, "Houston, TX" would automatically be entered into the next input. Is this a difficult thing to pull off? Where would I begin?

    Read the article

  • jQuery ajax delete script not actually deleting.

    - by werm
    I have a little personal webapp that I'm working on. I have a link that, when clicked, is supposed to make an ajax call to a php that is supposed to delete that info from a database. For some unknown reason, it won't actually delete the row from the database. I've tried everything I know, but still nothing. I'm sure it's something incredibly easy... Here are the scripts involved. Database output: $sql = "SELECT * FROM bookmark_app"; foreach ($dbh->query($sql) as $row) { echo '<div class="box" id="',$row['id'],'"><img src="images/avatar.jpg" width="75" height="75" border="0" class="avatar"/> <div class="text"><a href="',$row['url'],'">',$row['title'],'</a><br/> </div> /*** Click to delete ***/ <a href="?delete=',$row['id'],'" class="delete">x</a></div> <div class="clear"></div>'; } $dbh = null; Ajax script: $(document).ready(function() { $("a.delete").click(function(){ var element = $(this); var noteid = element.attr("id"); var info = 'id=' + noteid; $.ajax({ type: "GET", url: "includes/delete.php", data: info, success: function(){ element.parent().eq(0).fadeOut("slow"); } }); return false; }); }); Delete code: include('connect.php'); //delete.php?id=IdOfPost if($_GET['id']){ $id = $_GET['id']; //Delete the record of the post $delete = mysql_query("DELETE FROM `db` WHERE `id` = '$id'"); //Redirect the user header("Location:xxxx.php"); }

    Read the article

1