Implementing javascript in a wordpress page

1 replies
Hi guys, i bought a javascript USA map to use on one of my WP websites, but can't get it to work...

This is how the map should look like (change hxxp to http, i can't post images or links yet...)
hxxp://artbookaddicts.com/NCPics/usamap1.png

And here's an overview of the included files:
hxxp://artbookaddicts.com/NCPics/usamap2.png


I want to implement the map on a wordpress page, but something goes wrong, here's how i tried to do it:
  1. Upload the css file and the javascript file to my wordpress directory with FileZilla
  2. Change the location of the above 2 files in the index.html code
  3. Copy the edited index.html code into a new wordpress page (note that i paste this in the HTML view, not the visual view)

When i go to the newly created page, the code is visible and the map is not showing (only the borders of where it should be are visible) ... not exactly what i'm trying to achieve...

I assume the problem is that you can only put html in the Page HTML box, and as far as my coding knowledge goes, there's some css in it too. Is there a way to put the index.html file in the theme directory and bring it up on a page with a HTML shortcode?

Any help would be very much appreciated. I can post the code if you want, just ask...
#implementing #javascript #page #wordpress
  • Profile picture of the author Guigo
    You should change the root directory in every file where it's present. For example, if a CSS file has reference to image in a folder, make sure the CSS file points to right location of it on your server.

    Also about WordPress implementing - are you using an Iframe code on a page where you want your map? (page or theme file).

    I guess it has something to do with links - the ones where map gets published and ones where script of map thinks it is published

    Finally - if you bought a script, you should be able to contact with its developer and ask for help, provided you explain the problem better than here on forum, it's hard to understand from what you wrote here
    Signature

    Please do not use affiliate links in signatures. That includes affiliate coupons.

    {{ DiscussionBoard.errors[3324989].message }}

Trending Topics