• Resolved SquarePeg61

    (@squarepeg61)


    I am trying to set up an eGiving form on my church’s website. The company we contacted about setting up the form recommended inserting the following JavaScript into the <BODY> of the webpage:

    <script id="r-embed-script"></script><script type="text/javascript">document.getElementById('r-embed-script').src = 'https://onrealm.org/Assets/Embed/giving-embed.js?v=' + Date.now();</script>

    The company further recommended putting the following link after the above JavaScript:

    https://onrealm.org/StAlbansEpiscopal30655/give/budgethttps://onrealm.org/StAlbansEpiscopal30655/give/budget

    Since the theme we are using doesn’t allow access to the editor, I downloaded and installed Insert Headers and Footers to handle the JavaScript insertion. I inserted the above JavaScript into the <BODY> portion of Insert Headers and Footers and included the link above. According to the company we contacted about setting up the form, including all of this on a page is supposed to generate an inline form. However, when I created the page and reviewed it, all I saw was JavaScript and a link, not an inline form. I have tried entering the necessary information using both Text and Visual Editor, to no avail.

    I had a conversation earlier today with the tech support of the company who sent us the JavaScript and they are stumped as to why it’s not working. They recommended I put the JavaScript into the </BODY> section of Insert Headers and Footers, but that didn’t help. Thanks for any suggestions!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • @squarepeg61

    It’s not the theme that is preventing you from editing the files, its the permissions on the theme folder and files. You can fix that in FTP, or login to your Control Panel.

    Changing File Permissions

    I don’t like that plugin you mentioned, that’s my personal preference. Anything that says “insert into header” I tend to avoid!
    In reality, its don’t really matter where you place your js – as long as you have your <script> </script> tags, it should fire.
    However, the js you have been provided does not make sense to me.
    Unless you had already provided a page for the form to live on – that’s why this part is there re: getElementByID

    The element itself is r-embed-script

    You could just use a different approach until you get this one sorted – like this :
    https://gowildcats.ca/monroe/

    Thread Starter SquarePeg61

    (@squarepeg61)

    Thanks for your response! So, should I add the script by logging into the Control Panel of my website and add it there somewhere? If so, where? Is there a different plugin that might be better suited to doing this than the one I previously used?

    Regarding getElementByID, should I replace r-embed-script with the location onto which I want to place the form? Also, clicking on the link in the above original post brings up the giving form, so do I really need to add the JavaScript? OneRealm recommends it, but I’m a JavaScript novice and I’d like to make adding the form as simple as possible.

    Sorry if I’m misunderstanding something. Thanks!

    @squarepeg61

    You can certainly try to implemented using your control panel.
    But this inside the <head> :
    <script id="r-embed-script"></script><script type="text/javascript">document.getElementById('r-embed-script').src = 'https://onrealm.org/Assets/Embed/giving-embed.js?v=' + Date.now();</script>

    and put this just after the closing of the the <body> tag :
    <div id="r-embed-script"></div>

    > getElementByID, should I replace r-embed-script with the location onto which I want to place the form

    No. The getElementByID is simply *looking* in the body of the HTML for that id (or maybe class), you could try this as well :
    <div class="r-embed-script"></div>

    You could impelement like this :
    https://gowildcats.ca/monroe/
    or just simply put it in an iframe.

    Thread Starter SquarePeg61

    (@squarepeg61)

    Thanks for your help! Much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Inserting an Item Into the of a Web Page Doesn’t Produce Desired Results’ is closed to new replies.