Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #105008
    bobgarrett
    Participant

    Hi, I hope you can help.
    I am using a plugin (form-maker) for a form which requires some javascript to be executed onload. This is not working it appears because the code is having <p> inserted by the theme.
    For example:
    <p> if(window.before_load)
    {
    before_load();
    }
    }</p>
    <p> jQuery(window).load(function () {
    formOnload24();
    });</p>

    Is it possible to change a setting so the script is not interrupted by this?

    #105012
    Mahesh
    Keymaster

    @bobgarretthomenetworks-co-uk: Where have you actually put these codes? I recommend you to create a child theme and then enqueue the script in child theme’s functions.php. You can find more details on creating child theme HERE.

    Regards,
    Mahesh

    #105015
    bobgarrett
    Participant

    The form-maker plug includes the option to specify javascript for such inclusion. You can see the actual page: http://www.ccrc.co.uk/temp/
    If a child theme is needed I will look at this but I don’t think it should be necessary. Also, I am not sure whether I would then need a range of child themes for different forms. Whereas if the script was executed as it is it would be easy.

    #105041
    bobgarrett
    Participant

    Problem is solved I think. It was my error in implementation.

    #105187
    Mahesh
    Keymaster

    @bobgarretthomenetworks-co-uk: Glad to know you’ve solved the issue by yourself. Have a nice day!

    Regards,
    Mahesh

    #105207
    bobgarrett
    Participant

    Apologies for confusion over this and thanks for your assistance but the problem is not completely solved.
    Although am now feeding the text through to the field it is clearly not as content but more as a hint. I had expected a visitor to be able to edit the text; instead, clicking in the field makes the text disappear. Can it be made editable as content?

    #105211
    Mahesh
    Keymaster

    @bobgarretthomenetworks-co-uk: Sorry, this is not possible.

    Regards,
    Mahesh

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Javascript being excluded by’ is closed to new replies.