The WorksForWeb Community Forums
Welcome to the WorksForWeb community forums. Here you can discuss WorksForWeb products with others and contribute to the rapidly growing WorksForWeb community. Please note that while WorksForWeb staff try to maintain presence on the forums, this is not the most reliable way to contact WorksForWeb staff. In case you require a timely response from WorksForWeb on an issue, please open a support ticket here. For pre-sales questions, please open a sales ticket here.

Welcome, Guest. Please login or register.
February 09, 2012, 01:08:34 AM

Login with username, password and session length
Search:     Advanced search
Added the iLister-related Boards

Rate My Site Boards Added

Merged iAuto and iRealty Support Forums together

Several new tips in the Tips and Tricks section
1,602 Posts in 623 Topics by 1,179 Members
Latest Member: bobsteam
* Home Help Search Login Register
+  The iAuto/iRealty/iLister Support Forum
|-+  iAuto, iRealty and iLister v.4.x
| |-+  General iAuto Discussions
| | |-+  external Javascript
« previous next »
Pages: [1] Print
Author Topic: external Javascript  (Read 1534 times)
japking
Newbie
*

Karma: 0
Posts: 1


View Profile
« on: September 17, 2008, 09:53:18 PM »

Hi

How do i link an external .js file?  or cannot use this option? Huh

thanks



Logged
iron
Global Moderator
Jr. Member
*****

Karma: 0
Posts: 90


iAuto\iRealty\iLister support


View Profile
« Reply #1 on: October 30, 2008, 02:50:48 PM »

You can add javascript code directly into the template. Or you can also put the link to the external JavaScript file using the following code:

Code:
<script type="text/javascript" src="/scripts/script.js"></script>
Logged

bro
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #2 on: July 05, 2010, 05:43:11 AM »

I'm trying to link to an  external JavaScript file but its not working.. it looks like this

(template/irelity/main/scripts/javascript.js) can i put JavaScript in this directory?

<script type="text/javascript"  src="scripts/jquery-1.4.2.min.js"></script>

also my CSS is not working in same directory.

can you tell me if this is correct?
Logged
Arthur
Jr. Member
**

Karma: 2
Posts: 81


View Profile
« Reply #3 on: July 05, 2010, 09:46:45 AM »

Hi Bro

Your variant should work.
If it don't - try to change path - for example like in main.tpl
 src="{$GLOBALS.site_url}/system/ext/jquery/jquery.js

Logged

bro
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #4 on: July 05, 2010, 09:54:15 AM »

Thanks,

for some reason my jquery accordion is not working,  It works well on my computer  on a static web page but when i uploaded to the website it does not?!?

am I missing something?
Logged
Arthur
Jr. Member
**

Karma: 2
Posts: 81


View Profile
« Reply #5 on: July 05, 2010, 10:04:43 AM »

Our product is uses jquery too - so it can just rewrite your jquery. You can use our jquery.js or change it with new.
Logged

bro
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #6 on: July 05, 2010, 01:04:24 PM »

yes I know but I don't see the effects on the page.. I want to add an accordion on a page but I don't see anything?!

do I add this to the template for that page? eg:  search_rent_form.tpl    <----  $("#accordion").accordion({ header: "h3" });

do you have an example?
Logged
Arthur
Jr. Member
**

Karma: 2
Posts: 81


View Profile
« Reply #7 on: July 05, 2010, 02:46:13 PM »

try other way.
Move your script to images folder template/irelity/main/images/javascript.js
and try to open it using  like this
<script language="JavaScript" type="text/javascript" src="{image src='javascript.js'}"/></script>

Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Classified Software by Worksforweb Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!