Javascript iframe

bluenadas's picture
bluenadas
Wed, 05/11/2016 - 14:37
#1
Javascript iframe

I'm trying to add a javascript iframe to our AWEContent page but neither the HTML object, nor the iframe object render the item properly. Here is the script I am attempting to add. I've removed the details but can provide the actual link if you need it.

Can you fill me in on how to embed this on our page? It is the open positions for our company as provided through a vendor.

<script type="text/javascript" src="//AAAAA.AAAAAAA.com/career/iframe.action?clientId=1111111111111"></script>

phuonght's picture
phuonght
Wed, 05/11/2016 - 22:45

Hi,

When you use object html in awecontent, it will be added to body section of page.
So if you would like to add to tag head of page, you need to add following code to function md_avendor_preprocess_html in file md_avendor/theme_setting/front/html.preprocess.inc 

drupal_add_js('//newton.newtonsoftware.com/career/iframe.action?clientId=8a788267548eb16c01549cb8224a0432', array(
'type' => 'external',
'scope' => 'header',
'group' => JS_THEME,
'every_page' => TRUE,
'weight' => -1,
));

bluenadas's picture
bluenadas
Thu, 05/12/2016 - 10:54

Does adding it in to there place it within the body of all pages? Or can you add it within a page where ever you'd like?

phuonght's picture
phuonght
Thu, 05/12/2016 - 22:33

When using Awecontent, your sciprt code is added to place where you add object and only in a page. However, if you add code as my comment #3, it will be added to all header tags in all pages. 

bluenadas's picture
bluenadas
Wed, 05/18/2016 - 09:23

I've attempted to add the script code into an AweContent object (html & iframe) and neither of them render?

phuonght's picture
phuonght
Thu, 05/19/2016 - 23:12

They render, of course. You can view page source, search url of your own frame then will see it. 

bluenadas's picture
bluenadas
Fri, 05/20/2016 - 07:06

I can see the details in the page source, but the actual data does not appear on the page as it should?

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.