We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to add custom javascrip to a new page | Forum

Kevin Apr 4 '17
Created a new page (visible only to members), and would like to paste custom javascript code into the body.  Editing with manage page does not keep the code.

I can not put it in the custom tail section or it would apply to all pages.

Is there a way to to add the javascript to only a specific page?


Code would be similar to:

<script type="text/javascript" language="javascript" src="http://www.xyz.com/widget-585678?target=_top&mouseover=Y"></script>

The Forum post is edited by Kevin Apr 4 '17
  PageContent.JPG (22Kb)
Kevin Apr 5 '17
Well Found the following, at http://www.wikihow.com/...r-Website-Using-HTML

<html><head><script language="javascript">alert("Hi there, and welcome.") </script></head><body></body></html>

The above works, but when you go back to edit the html, it is empty. Seems like it must be a setting in Oxwall relating to custom html code...

Scam Detector
Scam Detector Apr 5 '17
Disable the plugin CKEditor and try again.
Kevin Apr 5 '17
Have tried that. Disabled both front and rear editor. Still a no go.
The Forum post is edited by Kevin Apr 5 '17
Scam Detector
Scam Detector Apr 5 '17
Tested on a fresh install, it works. I can add the code and edit the code. If it is not the ckeditor, my best guess is it may be a conflict with another plugin.
Kevin Apr 6 '17
Ok thanks- will try to identify what plugin has conflict.
Kevin Apr 17 '17
Finally had time to go back and test. After disabling the plugin CKEditor the following test adding javascrip to page content works:

===test ======
<html><head><script language="javascript">alert("Hi there, and welcome.")</script></head><body></body></html>


However I am trying to incorporate some affiliate code in the Page Content like the following:


<script type="text/javascript" language="javascript" src="http://www.lduhtrp.net/...lank&mouseover=Y"></script>


The code is able to be saved now, but content does NOT show up on the new test page :(


Any ideas?

The Forum post is edited by Kevin Apr 17 '17
Kevin Apr 28 '17
The code works in a html test site: http://htmledit.squarefree.com/

What setting in Oxwall would be stopping the display?

Is it a .htaccess setting issue:


The Forum post is edited by Kevin Apr 28 '17