Some HTML files associated with Dreamweaver template (.dwt) not recognizing jquery/javascript - javascript

I have been tasked with updating the navigation on a site that is using a Dreamweaver template (DWT) as the base file. The navigation was originally built using jQuery navigation UI, however this did not address all of our needs and I have updated it with another version of an accordion.
The .dwt file only is only controlling the navigation and the head of the site.
I have integrated the new xhtml structure and added/removed javascript/jquery into the .dwt file. I saved the file, therefore updating all of the relevant .html files, and verified that the accordion works.
However - the accordion does not work for all of the xhtml files. Some files, seemingly at random, are not pulling in the javascript.
When opening the relevant .html files, I can verify that they have all been updated with the new xhtml and the correct javasctipt. However, when viewing the .html files that are not displaying correctly with FireBug, I can see that none of the jquery/javascript is being applied to the navigation (classes are missing that are injected into the xhtml, but the structure and css is correct).
I've done some research and the only issues I've been able to find are related to .xhtml files not being updated with the correct code, but in my case all of the affected files have the correct xhtml and scripts in the head.
Does anyone have any light to shed on this subject? I am quite puzzled.

Are you absolutely certain that the updated files and new versions have been correctly loaded to the live server? Even if Dreamweaver updates the child files from the .dwt you need to make sure everything is uploaded.

Related

Debugging iframe in Readymag

I want to embed an interactive diagram in my Readymag page via iframe, but the diagram won't show up. I performed a test in JSFiddle: https://jsfiddle.net/TheFelipeGarcia/2p3aguck/, and it works there.
First, I exported my infographic as HTML + JavaScript from Adobe Animate. Then, I used Readymag's Widget Code to add the code to my page. A side note: originally the HTML had a link to the JS file
<script src="infographic.js?1578942235513"></script>
but I pasted the JS inline (it's very long so I won't repaste here).
Does anyone have experience with Readymag or a similar issue of embedding iframes, that might have ideas what I could be doing wrong?

Resolve URL Contents Into HTML Head As Text

I created a plugin for some web software that doesn't natively support plugins. I found that I could inject code into the head of the plugin webpage through their GUI. Currently, users have to paste a huge block of code into the head which contains the plugin HTML, CSS, and JS all minified into one block. I'd like to instead serve this over a CDN so users could simply subscribe and receive all updates without having to repaste. It also would keep them from having to paste a large chunk of code into the tool and instead it would be a nice link.
I tried:
<link rel="import" href="~my_CDN_link~">
but it seemed to only partially work. I didn't really understand the issue, but I saw that import is deprecated so this seems like it would only be a temporary patch.
At the end of the CDN link is a text file which contains:
HTML
<script>~my_scripts~</script>
<style>~my_styles~</style>
I was hoping there is some way to just resolve this link into the text which it contains and "paste" it into the head of the document. Maybe this isn't even the approach I should be taking? Should I instead provide two links? One for the stylesheet and one from the JavaScript? The JavaScript could then make a call to get the required markup and append it to the document. I'd love to keep it as one link if at all possible.

How to embed HTML5/CSS + js music player on single wordpress page?

I have an html 5, css, and javascript audio player that I'm trying to add to one page on my wordpress site.
I tried to paste the html into my page's text editor, while installing the JS and CSS folders for the player in my child theme's folder, which didn't work.
I tried placing the CSS for the player styling in my child themes CSS file, and that didn't work. I also tried linking to the style sheets and js scripts from the header.php file, which wasn't working for me.
My first thoughts are that because the html is showing up as it should, the css and JS files aren't being called. So I just need to figure out the path structure of how wordpress creates pages? Yet I know wordpress does something with a database to display the pages?
I saw some documentation about using I think it was either php or JS functions to call scripts or something and I don't understand enough of those languages to be able to make sense of it yet.
I'm still working with my developer, but he's 7 hours ahead of me and asleep. I just want to put the hardcoded version of the player and a few songs on my site for now so I can do some testing/see how it looks.
I hope that this question meets the SO req's. I tried to search on my own and I know the answer is out there, I just don't know enough to understand it yet. Trying to get a head start
The path to your Child theme's folder should be '/wp-content/themes/name-of-theme/'. You can use that in your header to call the files from wherever you might have placed them in your Child theme's folder.
To hard code the HTML, pasting it in the WordPress page editor should work fine unless there is another JS call or some weird iFraming going on.. if that's the case, you can simply create a Page Template (https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/#creating-custom-page-templates-for-global-use) and paste the code there. You'll likely want to just copy an existing page template from your Theme, take out the inner loop, and replace it with your video code.
Adding the links to your 'header.php' file would be considered bad practice. You would want to create a 'functions.php' file inside your Child theme and call the JS/CSS from there. You can also find this within the WordPress codex (they literally give examples you can copy/paste and change your file names).

Embedding large portions of CSS and JS into <head> without links

So... Just so you have less reasons to call me an idiot, here's why I need this:
I'm currently working on an offline project that uses jruby. So, to generate reports on the fly, it was decided (by my superiors) to use JavaFX's WebView component - so, HTML, CSS and JS.
But here's the catch: no using file system. All the content is drawn from DB and generated on the fly. No internet either. So all the content to be loaded into the WebView is to be in a single file, however enormous.
I have an HTML page and two huge files - one js, one css. When I use <link> tag for css and <script src="..."> for js - all works. Both in a browser and if I artificially load the page into a WebView. But if should I copy-paste the files into corresponding <style> and <script> tags (as it, probably, will be handled in the program), half the things do not work. Is there a special way for doing it right?
Here are the html, css and JS I'm working with (html is filled with sample data so it can be seen if everything works):
html filecss filejavascript file
You could try and merge them. Read more about this here.

VS2010 WebApp .js+.css able to be embedded fully within HTML code?

So I'm looking to take HTML code for a slideshow and insert it into an HTML box for an app.
However, obviously the .js and .css dependencies need to go with it, or else it won't function properly.
Is there a way/program that allows me in VS to take those classes and insert them within the HTML file so that they are all read at once, and the slideshow works? Ideas?
Thanks,
D.
Use external files to allow the browser to cache them. Put the reference to the external files in your master page.

Categories

Resources