Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Using Javascript & Flash File

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-18-2008, 12:30 PM
  tommyneel's Avatar 
tommyneel tommyneel is offline
 

Member
  
Join Date: Mar 2008
Posts: 10
 

Default Using Javascript & Flash File

I am trying to modify my file:

/customer/main/welcome.tpl

How do I use a simple javascript file or even embed a flash file. I have tried using both, both with the JS, I get an error. With the Flash, nothing shows up.

Is there a trick or can these just not be used?
Or, is there an easier way to use rotating images that are hyperlinked?

Thanks

Version 4.1.9
PHP 4.3.11
__________________
X-Cart 4.1.9
PHP 4.3.11
MySQL 4.1.20-max-log
Linux/Apache
Net::SSLeay 1.23
libcurl/7.10.4 OpenSSL/0.9.6b zlib/1.1.4
Reply With Quote
  #2  
Old 09-20-2008, 12:47 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Using Javascript & Flash File

Have you tried encasing your script in {literal} {/literal} tags?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 09-29-2008, 03:16 PM
  tommyneel's Avatar 
tommyneel tommyneel is offline
 

Member
  
Join Date: Mar 2008
Posts: 10
 

Default Re: Using Javascript & Flash File

where exactly are these tags to be used? when i use them, anything after the opening literal tag does not show up on my page. does it go right before the <script> tag? where?

also, what should the path be for flash files? if i have the file in the folder /images, can i still point to it like i do with actual images using the

{$ImagesDir}

?

thanks and if anyone is using flash out there, please let me know how you're doing it.

much thanks.
__________________
X-Cart 4.1.9
PHP 4.3.11
MySQL 4.1.20-max-log
Linux/Apache
Net::SSLeay 1.23
libcurl/7.10.4 OpenSSL/0.9.6b zlib/1.1.4
Reply With Quote
  #4  
Old 09-29-2008, 03:53 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Using Javascript & Flash File

check this out.

http://www.gotoandlearn.com/play?id=77
__________________
xcart 5.1.2
Reply With Quote
  #5  
Old 09-29-2008, 05:28 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Using Javascript & Flash File

Quote:
Originally Posted by tommyneel
where exactly are these tags to be used? when i use them, anything after the opening literal tag does not show up on my page. does it go right before the <script> tag? where?

also, what should the path be for flash files? if i have the file in the folder /images, can i still point to it like i do with actual images using the

{$ImagesDir}

?

thanks and if anyone is using flash out there, please let me know how you're doing it.

much thanks.

It should be...
Code:
{literal} <script language="javascript" type="text/javascript"> content of script goes here </script>

The {$ImagesDir} will call a file from the skin1/images directory, not the images directory in the x-cart root folder.

I don't use flash, but here is how x-cart does it....
Code:
<object type="application/x-shockwave-flash" data="{$ImagesDir}/custom/flash_logo.swf" width="341" height="206" id="flash_logo" align="top"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="{$ImagesDir}/custom/flash_logo.swf" /> <param name="menu" value="false" /> <param name="loop" value="false" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="FlashVars" value="not_home_page={if $main eq "catalog" && $current_category.category eq ""}0{else}1{/if}&amp;final_image={#FinalImage#}&amp;company_name_path={$ImagesDir}/custom/company_name.swf&amp;home_path={$current_location}/customer/home.php" /> <param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" /> <param name="swLiveConnect" value="true" /> </object>
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:27 PM.

   

 
X-Cart forums © 2001-2020