Jump to content

phppup

Members
  • Posts

    852
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by phppup

  1. That's a little deeper than I'm currently capable, and I don't really have the time to do the homework.
  2. Eureka!! I got it working. I set up a SELECT statement in PHP to echo a table when the script is called. The page never refreshed when using the form in AJAX, but when I refresh the page, it displays all entries made to the form by PHP. I suppose my only lingering question is, within this standard AJAX context jQuery.ajax({ url : "myPHPcode.php", data : 'userName=' + $("#userName").val() + '&userEmail=' + $("#userEmail").val() + '&subject=' + $("#subject").val() + '&content=' + $(content).val(), type : "POST", success : function(data) { ... do stuff where the final action is "success," is there a way to get confirmation of success of the PHP code? In other words, it seems that "success" will blow confetti simply because the JS got that far (regardless of PHP issues), but would it still trigger "success" if the PHP file failed? If the PHP was designed to INSERT into a database, and the connection could not be made (therefore triggering an error in PHP/SQL), can a notification of the failure be given? From what I've experienced, I don't like the one-way street of this Asynchronous method *humor* PS: what is the correct way to change my "data" section to a serialized method? I saw it mentioned, and it seems to offer more flexibility with less keystrokes, but I haven't been able to implement it. Thanks to everyone for helping.
  3. Changed the PHP to if(isset($_POST['userName'])){ echo "success"; } else { echo "failed"; } but still no obvious response.
  4. I suppose I'm used to having the webpage reload/advance when a submit button is clicked. I'm a bit lost in how my PHP is accessed when the data is submitted. My "nerve center" of AJAX is jQuery.ajax({ url : "myPHPcode.php", data : 'userName=' + $("#userName").val() + '&userEmail=' + $("#userEmail").val() + '&subject=' + $("#subject").val() + '&content=' + $(content).val(), type : "POST", success : function(data) { ... do stuff Is anything missing? Does it call the PHP file every time the submit button active (with all field valid)? Since the page doesn't reload, I'm not able to receive a PHP coded response. My PHP if(isset($_POST['submit'])){ echo "success"; } else { echo "failed"; } failed on load and never changes.
  5. @requinix A confirmation (that will be removed from the script) that tells me that everything in development is working as expected to this this point. An assurance that if a problem occurs, I can essentially eliminate troubleshooting back to the form bc I'll have confirmed that the data is being sent and therefore development can move forward with confidence. Then, if, for instance, a table isn't being populated, I can limit my review to the PHP and SQL for bugs.
  6. I am trying to use a form that I found online. It is AMAZINGLY stylish (LOL) and presumably uses an AJAX implementation to integrate its jQuery features. Now that I've finally gotten most of the features to meet my liking, I want to confirm the transfer of data upon submitting. I read through the previous post jquery / javascript function return by Digger and realize the asynchronous impossibility of the task. So am I forced to go on faith now? Is there no way to confirm (from a PHP standpoint) that the data is being sent? Is the only way of verifying my progress to create and insert into a table, and then select the data for a viable confirmation? I was expecting to just run a var_dump to confirm.
  7. Thanks for the info, but I may have gotten a better handle on this (versus my unconventional description of the effect I'm trying to duplicate). It seems that the CSS collapse effect make be more in line with my goal. I'm going to compare the different sample codes for slide, collapse, and JavaScript to find a solution that gives me a form that kinda unravels down/up over the existing page text via a toggle click.
  8. It's not really a problem as I think a slightly different effect. CSS seems to slide the entire form into place like moving a cracker from behind a box, and JQuery seems to 'unravel' like a paper towel roll that falls from a table. If necessary, I will try to post code when time permits.
  9. In playing with a contact form that will "slide down" from a given point in the webpage, and I've found two attractive methods. CSS seems to accomplish the affect with an animation that carries the contents of my form up and down depending on a toggle button. I found a similar effect using JQuery's slideDown("slow") or slideUp("slow"). The JQuery seems like a smoother effect as it appears to 'unravel' but I am less comfortable with JQuery and connecting to outside libraries. Can this effect be duplicated more readily with CSS? Is there a simplified JQuery (or a plain JavaScript) method that I haven't found?
  10. phppup

    Gradient border

    I've considered and toyed with the second container idea, but the issue there is that the gradient ellipse is NOT distributed evenly on the "borders" of my vertically shaped div box (and this ALSO makes formatting text more challenging). The best alternative (similar effect) that I can compare to (and may be forced to use) would be a CSS button with a glow effect. The difference is that I want that trickling off effect to be contained within a specified boundary (a frame) rather than bleeding into the webpage. Ultimately, I would (hypothetically) have 2 rows of 3 divs each showing different products that are available (ie: ice cream pops, cups, cones, sundaes, cakes, weekly special). THANKS for helping.
  11. I am trying to achieve a BORDER that will have a gradient effect in itself. border: 24px radial-gradient(red 5%, green 15%, blue 60%); This isn't working. The colors are for testing, but ideally,I would have an effect running from a light blue to a darker blue (similar to the lever that adjust the cool temperature in an air conditioner) and they would outline a div box. A button with an edged border could work too The key is that I want the gradient to eminate from the center to the outside of the object, not along the border (think of a water droplet in a pond) PS: the radial gradient in a div with rounded corners just isn't aligning the way it's like it.
  12. @kicken Am I able to do this with .addEventListener ? I've tried several alterations of the following with no success. var inputs = document.getElementsByTagName('input'); for(var i = 0; i < inputs.length; i++) { if(inputs[i].type == 'submit') { inputs.addEventListener("click", alert(inputs[i].value); } }
  13. I have TWO buttons inside a form. <form onsubmit="return myFunc()"> myFunc displays a confirmation box after a button is clicked. The message would be different depending on which button is clicked, but when I use alert(event.srcElement.id); I am getting a result that indicates that the FORM has been clicked, not which button has been clicked. How can I get the button result in order to create an IF statement for comparisons?
  14. I'm trying to upload images to a directory, but it seems that no matter how small the file sizes, the largest quantity uploaded is 20. I vaguely recall mention of a 20 MB maximum, but for test purposes, most of these files are only a few KB each. Any insight on this? On a related note, I had written code to reduce file sizes, but since this affects the array of images selected, are they being counted at the original size or the smaller size that results as each file in the array passes through the size-reduction process?
  15. @Nolan81 Your two word response gives no indication as to what EXACTLY you feel is a poor approach with regard to my question. Further, you failed to elaborate or provide an alternative solution to any of the previous posts that were informative and appreciated. If you read my post, you will see that it concluded by saying Therefore, you should realize how worthless and idiotic your words were to me and this thread.
  16. I am assembling a website that utilizes PHP/MySQLi for sign up and access. The thought had occurred regarding what would be involved to augment this for usability as an app. I've only begin to scratch the surface, but any helpful advice would be appreciated.
  17. I've used PHP's mail function previously and I'm thinking of using it again. At one point, I recall getting success messages when the mail function completed, but discovered that certain emails were never received by recipients. After much troubleshooting, I discovered that the shared hosting server that I was using included quota limits on outboard emails. Essentially (if my understanding is correct), the PHP confirmation was accurate, but the actual messages (after hitting the quota) were never dispatched. How can I get confirmation that the intended email actually left the server? Further, can I determine that it wasn't filtered by the recipient's email provider or tagged as spam?
  18. I tried the link also, but got nowhere because I do not have a Google account. One thought: if the file is too large, can you move it in batches (maybe 1000 rows at a time)?
  19. @requinix Yes, I believe I tried that initially. It may have worked; but then it didn't. After hours of futile efforts, I decided to post here and wait for a reply. However, it was a Sunday afternoon and ALL my sports teams were losing. *another season of tears* LOL My tenacity got the better of me and deeper down the rabbit hole I went. I haven't come up with an adequate solution (and may never do so) since this was supposed to be just a 15- minute cosmetic effect. However, I wanted to do my part as a contributor to the forum and share what I discovered: It appears, per a variety of resources that There seem to be several JavaScript/jQuery work-arounds or some CSS tricks to enable a smooth usefulness on every instance of an event-type. For now, I think I've taken it as far as I am willing to go. But the next person should be aware that events and CSS animations are not necessarily completely compatible under the current rules that govern them.
  20. I'll skip the boring details and get to it. This CSS code runs an animation for an INFINITE period. I want it to ONLY run "on mouse over" or the equivalent. I've changed the duration without issue, but cannot get it to run when desired .obj { height: 90vmin; position: relative; width: 90vmin; > div { animation: growAndFade 3s infinite ease-out; /* lots of settings */ } } I've tried different variations of using .obj :hover{ height: 90vmin; position: relative; width: 90vmin; > div :hover{ animation: growAndFade 3s infinite ease-out; /* lots of settings */ } } but seem to be missing the correct implementation. Helpful responses, please.
  21. @kicken I thought I'd share this interesting revelation. While beginning to alter my code to implement your suggested approach I //commented out// some areas of code. That's when I noticed that the color designations on my editing tool were inconsistent. Long story short, it seems my code was stalling because ////var array = <?php echo json_encode($business); ?>; did NOT remove the code, COMPLETELY and in fact created a hiccup until I tried ////var array = <?php /** echo json_encode($business); **/ ?>; Thankfully, now my code is working. PS: had to post on this fashion as the editor would not display the leading backslashes
  22. After unsuccessful efforts at trying to obtain my GPS location from a self-written PHP script, I moved to a more local JavaScript code. When opened on my Android phone with a Chrome browser, I received an error Y0ZkNV. Is there a way to resolve this without changing my hosting to an HTTPS platform? My goal is to be able to access my current location on my phone's browser.
  23. @maxxdNot really sure what you mean, but the same code worked fine when run separately with my PHP array. It only displayed a problem when I incorporated it into my form.
  24. @kicken Not sure what you mean or how to approach this Why? Me neither, but I realized that this cause was JSON, and wasn't sure if I had missed an aspect of "special handling" that might be required to neutralize any effects (other than hashtags to remove it... LOL)
  25. Hello all. I had hardcoded if(document.getElementById("Item_01").checked == true){ document.getElementById("Set_01").style.display = "block"; } else { document.getElementById("Set_01").style.display = "none"; } This referenced items in a form that corresponded to values in a PHP array and all seemed to work well. But when I realized that expanding to multiple items in the array would mean manually re-writing these same lines for every item, it occurred to me that writing a single piece of code to engage the array with a FOR LOOP would be more effective (and reduce code). I searched the web and discovered that this could be the answer to incorporate into my function: var array = <?php echo json_encode($business); ?>; I tested at each step to avoid issues, but noticed that while things seemed to work well, they stalled when I refreshed my webpage. Is there a specific way to exit the JSON or disable it so that the page works properly every time (as it does WITHOUT this variable? Should I be using a different approach to connect JavaScript to a PHP array?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.