Jump to content

Q695

Members
  • Posts

    783
  • Joined

  • Last visited

Everything posted by Q695

  1. It's dying after the first run. Here's my jquery linking if that could cause the issue: <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  2. Why does this source file seem to cause the ajax to crash after the first call to the function? function swapContent(href, url_data, target) { $.ajax({ type: 'GET', cache: false, url: href+'?' + url_data, //add a variable to the URL that will carry the value in your i counter through to the PHP page so it know's if this is new or additional data success: function (data) { // this param name was confusing, I have changed it to the "normal" name to make it clear that it contains the data returned from the request //load more data to "target" value div target.innerHTML = (data); // as above, data holds the result of the request, so all the data returned from your results.php file are in this param but please see below } }) }
  3. What do I put in the head? What do I put in the body? I understand I need to use a <textarea>, but beyond that I'm stuck. I've also tried the jquery text editor, but it doesn't seem to latch on for some reason.
  4. How do you turn off view src capability?
  5. I still can't seem to figure out the form submitter, can you please rewrite the form submitter to help me just "plop" it into engine.js?
  6. I saw a speech on Laravel, and wasn't impressed, because he didn't show anything on the "micro" platform, and PHP technically is its own CMS, you just need to know how to write it out. Exactly, modules without the CMS that a designer can plug in if they understand basic HTML/server language. You're not coding from scratch, you're coding from "plugs" through code view. I found a job that was looking for a "dangerous" developer, like: http://careers.stackoverflow.com/jobs/44895/wanted-dangerous-php-developer-network-merchants-llc Some developers need to know how to code things up from scratch, and those people are going away with all the CMSes
  7. Why do designers want people to think they're also developers? If too many people move out of development there will be a lot of problems, some want to stay in my cozy development hole, until they either move up, or for the rest of their career, because they think the CMS/framework people are WRONG.
  8. The console.log error is: Uncaught SyntaxError: Unexpected token ILLEGAL It's currently on my testing server, so NO, you can't see it, but I can tell you it's in the engine.js .
  9. Working from this code: https://github.com/FREE-FROM-CMS/form/blob/master/Handler/engine.js function process_form(page_in, page_out){ $("form#register").submit(function() { var mydata = $("form#register").serialize(); alert(mydata); // it's only for test $.ajax({ type: "POST", url: page_in, data: mydata, success: function(response, textStatus, xhr) { alert(page_out); }, error: function(xhr, textStatus, errorThrown) { alert("error"); } }); return false; }); } How do I pass all the data to my generic data receiver at page_in taken from: https://github.com/FREE-FROM-CMS/form/blob/master/Handler/register.html <script type="text/javascript" src="forms\engine.js"></script> <form id='register'> User ID:<br> <input type='text' name='user' placeholder='User ID'><br> E-mail Address:<br> <input type='email' name='email' placeholder='E-mail Adress'><br> Password:<br> <input type='password' name='pw1' placeholder='Password'><br> Password Verification:<br> <input type='password' name='pw2' placeholder='Password Verification'><br> <input type='button' value='Register' onclick='process_form(\"testing/data_passing.php\", \"forms/login.php\")'> </form> No data seems to be sent to the server, and it doesn't seem to ge triggering a generic receiver also as shown here: https://github.com/FREE-FROM-CMS/form/blob/master/Handler/php/data_passing.php <?php ob_start();// start creating data object to be inserted to client echo"GET:"; print_r($_GET); echo" <p>POST:"; print_r($_POST); $output = ob_get_contents();//sets data output for database ob_end_clean(); require_once"../secure/db_conn.php"; $sql="INSERT INTO `database`.`test` (`data`) VALUES (:data);"; $q = $conn->prepare($sql); $q->execute(array(':data'=>$output)); When I just load the page part 3 does work generically, or with data.
  10. I'm designing the snippets for quickly plugging code into someone's website for quick development, not for someone who is looking for a CMS to have a lot of pre built stuff to bring up the level of those trying to make their apps feel like an SPA without actually building an SPA from scratch if all the pieces are used. I HATE THINGS LIKE WORDPRESS, LARAVEL, ET AL.
  11. I'm building a repository on github similar to a CMS kernel that can do a lot of stuff regardless of server side language, or client side programming ability (beyond HTML). Call me a rebel, but I'm tired of all the complex tools people develop that feel too bulky for you to use. What do you think of this: https://github.com/FREE-FROM-CMS/ What else needs to be added?
  12. I'm using jquery for a lot of "constants". The PHP file is an html "compiler" of randomly populated data based upon the users desire of what goes there in HTML. Initial HTML is also generated from results.php.
  13. I have an "engine.js" as follows: var i=1; //incrementer for FRESH new data function yHandler(){ // Watch video for line by line explanation of the code // http://www.youtube.com/watch?v=eziREnZPml4 var wrap = document.getElementById('wrap'); var contentHeight = wrap.offsetHeight; var yOffset = window.pageYOffset; var y = yOffset + window.innerHeight; if(y >= contentHeight-200){//how soon before the bottom would you like to add the data? i++;//add one to the incrementer for more data // Ajax call to get more dynamic data goes here from result.php // https://www.youtube.com/watch?v=fEYx8dQr_cQ /* struggle here $.ajax({ type: 'GET', url: 'load_more/results.php', success: function(wrap){ //load more data to "wrap" div // wrap.innerHTML =+ ("load_more/results.php"); console.log('success'+i); } }) */ } //test data var status = document.getElementById('status'); status.innerHTML = i+" | "+contentHeight+" | "+y; } window.onscroll = yHandler; and an "index.*" as follows: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script type="text/javascript" src="load_more/engine.js"></script> <link rel="stylesheet" type="text/css" href="load_more/more.css"/> <div id="status">0 | 0</div> <div id="wrap"><?php require_once "results.php"; ?></div> The bug is somewhere in the block broken apart. What do I need to request/display the HTML sent from the server?
  14. Without wrapping it in a function it works, but when I do it breaks the function.
  15. I tried it outside of the function, which worked, now I'm building the function finder function around it. Should I switch to mysqli to try to solve it that way?
  16. Usse tinyMCE for your text editor. t's a very easy to plug in javascript app.
  17. DON'T use mysql_* either use PDO, or mysqli
  18. I'm giving my function permission to go out, and grab the variable $conn, and take it home right? specific line is: $q = $conn->query($sql);
  19. for some reason I'm getting this error heavily: "Fatal error: Call to a member function query() on a non-object in..." All the function does is: function grab_function($functionName, $language){ global $conn; $sql = "SELECT * FROM `functions` WHERE `language` = '$language' AND `name` = '$functionName' LIMIT 1"; $q = $conn->query($sql); $q->setFetchMode(PDO::FETCH_ASSOC); $result = $q->fetch(); $source = $result['source']; eval($source); } Where's the bug at?
  20. for developers also using the stored functions.
  21. I'm trying to build a generic data receiving checker. Here is what I have, but it's not working as you would to verify the variable was passed properly by the client: function setter($verify, $pass_value){ if (isset($verify) && $verify!=''){ $pass_value=$verify; echo $pass_value; return $pass_value; } } $_POST['testing'] = "this works"; $verify = '$_POST[\'testing\']'; $pass_value = "\$outputed"; setter($verify, $pass_value);
  22. How do I process PHP that I'm storing in a database (think eventually functions, and pages)? example of stored code: echo "it works here"; I'm working on designing an open source development community for nonprofits to work with volunteer developers.
×
×
  • 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.