Forgot your password? Forgot your username? Create an account

 
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Calling javascript code from a aicontact page

Calling javascript code from a aicontact page 1 year 1 month ago #12744

  • scotty
  • scotty's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Karma: 0
Right now I have my javascript being called in the header of my index.php. The javascript does some cool stuff inside aicontactsafe. I think the js code is running right now anytime anytime anyone loads any page which doesn't have to happen. Is there a aicontactsafe file I could call my javascript from?

I tried a few places, but it ended up breaking aicontactsafe so I had to remove what I changed.
Last Edit: 1 year 1 month ago by Alex.
The topic has been locked.

Re: Calling javascript code from a aicontact page 1 year 1 month ago #12752

  • Alex
  • Alex's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 7780
  • Thank you received: 241
  • Karma: 60
All aiContactSafe javascript code is called from :
joomla_root\components\com_aicontactsafe\includes\js\aicontactsafe.js.php

If you want additional code you can add it there, but it will be overwritten if you reinstall aiContactSafe again or install a new version.
The topic has been locked.

Re: Calling javascript code from a aicontact page 1 year 1 month ago #12773

  • scotty
  • scotty's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Karma: 0
I put my code

<script type="text/javascript" src="replocatorwv.js"></script>

in that file, but my aicontact form is just blank when I try and go into it. Any idea what I'm doing wrong? Thanks for the reply by the way. I really appreciate it.
The topic has been locked.

Re: Calling javascript code from a aicontact page 1 year 1 month ago #12776

  • Alex
  • Alex's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 7780
  • Thank you received: 241
  • Karma: 60
That is not how you load extra javascript code from that file.
You can add this line at the bottom of that file:
$document->addScript( 'path_to_your_js_file/replocatorwv.js' );

Just replace "path_to_your_js_file" with the actual path.

More information about this here:
docs.joomla.org/Adding_JavaScript

If you need more help then that I suggest buying an aiContactSafe support subscription.
The topic has been locked.
The following user(s) said Thank You: scotty

Re: Calling javascript code from a aicontact page 1 year 1 month ago #12791

  • scotty
  • scotty's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Karma: 0
That info was perfect. Thanks! I plan on donating as soon as it's possible. I really like this extension and your support is fantastic.
The topic has been locked.

Re: Calling javascript code from a aicontact page 1 year 1 month ago #12798

  • Alex
  • Alex's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 7780
  • Thank you received: 241
  • Karma: 60
Happy to hear that. Thanks for the feed-back.

Will mark the topic solved.

If you use aiContactSafe, please post a rating and a review at the Joomla Extensions Directory.
The topic has been locked.
  • Page:
  • 1