Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2014
    Location
    southern Oregon
    Posts
    21
    Plugin Contributions
    0

    Default Need help adding a JSCRIPT file

    I just signed up for an email popup from Padiact. They gave me a javascript code that I am supposed to paste on each page. After reading through this forums I was able to figure out that I go to includes/template/mytemplate/jscript and create a new file and put the javascript into that file. This is what I did. I left permissions like all the other jscripts in that folder, 644, and I saved it as a .txt file. But I can't get it to validate on the padiact website and it doesn't seem to be working. Is there something that I missed?

    My website is
    http://nfbotanicals.com

    An email sign up should pop up after visiting at least 2 pages...incase someone would like to test it. I tested it but nothing pops up, but since I am the owner I am not sure if it will work for me.

    I am a new zencart owner and trying to understand php but don't have a good handle on it yet so please spell out any help as simple as possible...thank you!

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Need help adding a JSCRIPT file

    You need to save the file as jscript_something.js not .txt

  3. #3
    Join Date
    Feb 2014
    Location
    southern Oregon
    Posts
    21
    Plugin Contributions
    0

    Default Re: Need help adding a JSCRIPT file

    Quote Originally Posted by Design75 View Post
    You need to save the file as jscript_something.js not .txt
    I saved it as jscript_padiact.js but in the cpanel when creating a file, right below the box for putting the new name there is a drop box that is defaulted at "text document". The other choices are HTML Document, PERL script, SHELL script. I left the default there and clicked "create"...thats what I meant by making it a txt document.

  4. #4
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Need help adding a JSCRIPT file

    Quote Originally Posted by kelly60 View Post
    I saved it as jscript_padiact.js but in the cpanel when creating a file, right below the box for putting the new name there is a drop box that is defaulted at "text document". The other choices are HTML Document, PERL script, SHELL script. I left the default there and clicked "create"...thats what I meant by making it a txt document.
    I see a script error in jscript_padlact.js file..
    you should not have any html tags in a js file, remove them and it should work.
    Code:
    <!-- PadiAct Code --> 
    <script type="text/javascript">
    code section...
    </script>
    Dave
    Always forward thinking... Lost my mind!

  5. #5
    Join Date
    Feb 2014
    Location
    southern Oregon
    Posts
    21
    Plugin Contributions
    0

    Default Re: Need help adding a JSCRIPT file

    Yaaay! Thank you so much, Davewest...that did the trick!

 

 

Similar Threads

  1. including jscript*.php file in category description
    By shocker in forum General Questions
    Replies: 14
    Last Post: 24 Sep 2009, 07:36 PM
  2. I need to insert 'Right Click Disable' JScript
    By Twbeebe in forum General Questions
    Replies: 6
    Last Post: 29 Nov 2008, 12:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg