Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1878 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

Using a .js in a .js

Thread title: Using a .js in a .js
Closed Thread    
    Thread tools Search this thread Display Modes  
12-25-2007, 02:21 AM
#1
kinkarso is offline kinkarso
Status: I love this place
Join date: Jul 2006
Location: Toronto, Canada
Expertise:
Software:
 
Posts: 684
iTrader: 17 / 100%
 

kinkarso is an unknown quantity at this point

Send a message via MSN to kinkarso

  Old  Using a .js in a .js

Hi,

I am trying to use the lightwindow script inside my unblockable popup window script. Apparently, it doesn't work. How do I put a .js inside a .js? Simply listing them in my head tags doesn't seem to work

eg.

<script type="text/javascript" src="javascript/prototype.js"></script>
<script type="text/javascript" src="javascript/effects.js"></script>
<script type="text/javascript" src="javascript/lightwindow.js"></script>

<script src="dw_lib.js" type="text/javascript"></script>
<script src="dw_glider.js" type="text/javascript"></script>
<script src="CounterHandler.js" type="text/javascript"></script>

Any tips?

Thank you,
Donny

12-25-2007, 04:02 AM
#2
kinkarso is offline kinkarso
Status: I love this place
Join date: Jul 2006
Location: Toronto, Canada
Expertise:
Software:
 
Posts: 684
iTrader: 17 / 100%
 

kinkarso is an unknown quantity at this point

Send a message via MSN to kinkarso

  Old

Ok, so I found out that it's because the two sets of files have variables or functions with the same name. Does anyone know how to fix this problem? It's because there are duplicate variable names. Is there an efficient way to make them different?

12-28-2007, 07:10 PM
#3
CreativeLogic is offline CreativeLogic
CreativeLogic's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 1,078
iTrader: 6 / 100%
 

CreativeLogic is on a distinguished road

Send a message via MSN to CreativeLogic

  Old

Use a text editor and replace them in one of the files.

01-05-2008, 11:46 AM
#4
galide is offline galide
Status: I'm new around here
Join date: Jan 2008
Location:
Expertise:
Software:
 
Posts: 3
iTrader: 0 / 0%
 

galide is on a distinguished road

  Old

This is a recurrent issue when using different javascript libraries. You should simply ensure that:
1) the different libraries you are using are compatible
2) the libraries you create are using non generic names.

Hope it helps.

Emmanuel
GetBiz, business directory
http://www.getbiz.co.uk

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed