14
ace48
8y

Why the fuck should I echo javascript?
Why in fucks name you do not deal with JSON responses?

Plugin devs are either lazy, or simply stupid as fuck!

Ps: Or I'm actually crazy

Comments
  • 1
    There is exactly one place where echoing JS is acceptable, that is with cross site requests. Besides that it serves no purpose other than showing the developer is an idiot.
  • 0
    Happily we have stack overflow to teach us how to echo Javascript
  • 0
    Sorry, what is JavaScript echoing?
  • 1
    @purpletoxicrain Javascript echoing is to echo Javascript code from php which will be executed by the client side Javascript engine.
    Example:
    <?php
    $var = "John Doe";
    echo "<script>alert('This is from Javascript echoed by PHP, $var') ;</script>"
    ?>
    Will output in an alertbox:
    This is from Javascript echoed by PHP, John Doe.
  • 1
    @saarloos ugh. It's seems so wrong...
  • 1
    @Letmecode no actually, not wordpress.. I'm working on building a new CMS with laravel and I've been getting the hang of building API's with adequate response codes and messages... And then comes this plugin that requires me to echo javascript as a response so it can continue the process.

    @purpletoxicrain it's not only wrong, its ugly and makes no sense whatsoever.
Add Comment