WordPress.org

Ready to get started?Download WordPress

Forums

Using a Javascript correctly?? (1 post)

  1. timediva
    Member
    Posted 8 years ago #

    Hi

    I'm trying to get a javascript to work... the script needs to be in the body.

    This scripts is an aweber personalization script... when somebody fills out the subscription form the thank you page displays their name...

    I've put this script in the header under the body tag... right about the form...at the end of the form... I put in the footer above the body tag...

    It's won't work (script works on non-wordpress sites)

    I read this

    In the spot where you wish to use the Javascript, set the call for the Javascript. For example, you are using a Javascript that sets a link for users to "email this page" to a friend and you want it to be under the post title. It might look like this:

    <h3 class="storytitle">
    " rel="bookmark">
    <?php the_title(); ?>
    </h3>
    <div class="emailpage">
    <script type="text/javascript">
    <!--
    emailpage();
    //--></script>
    </div>

    I'm not quite sure what they mean... I took the script and saved it as a aweber.js uploaded to the template directory and the main wordpress directory...

    I then changed the above to
    <script type="text/javascript">
    <!--
    aweber();
    //--></script>
    and still nothing...

    What the correct way to create, uploaded the script so wordpress will call it... I'm not a programmer.

    Thanks

    Time Diva

Topic Closed

This topic has been closed to new replies.

About this Topic