Support » Plugins » insert javascript and php into a wp-page

  • Hi im trying to make a script that get info like pagerank and alexa rank work in my wordpress..

    i need to insert this a new page created in WP.. its a ajax script.. the other folders and files are already in server


    <script language=”javascript” type=”text/javascript” src=”./js/main.js”></script>
    <form method=”post” action=”./” onsubmit=”getResults(this.url.value); return false;”>
    <input type=”text” name=”url” value=”<?php echo ($_GET[‘url’]) ? htmlspecialchars($_GET[‘url’]) : ‘’; ?>” size=”40″ />
    <input type=”submit” value=”Submit” />
    <div id=”results”>
    <div>Use the form above to check your PageRank and more!</div>
    <?php if ($_GET[‘url’]) { ?>
    <script language=”javascript” type=”text/javascript”>
    window.onload = function () {
    getResults(‘<?php echo $_GET[‘url’]; ?>’);
    <?php } ?>

  • The topic ‘insert javascript and php into a wp-page’ is closed to new replies.