osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Inserting a javascript in mainpage.php

This is a discussion on Inserting a javascript in mainpage.php within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; OsMax 1.5 no other mods. I am having trouble inputing this script into the mainpage.php. I am sorry but I ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-05-2004, 06:38 PM
Lurker
 
Join Date: Jan 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
aalex
Default Inserting a javascript in mainpage.php

OsMax 1.5 no other mods.

I am having trouble inputing this script into the mainpage.php. I am sorry but I am new to php.

Here is the javascript:

<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFla sh." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
document.write('<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
document.write(' ID="script" WIDTH="300" HEIGHT="200" ALIGN="">');
document.write(' <PARAM NAME=movie VALUE="script.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> ');
document.write(' <EMBED src="script.swf" quality=high bgcolor=#FFFFFF ');
document.write(' swLiveConnect=FALSE WIDTH="300" HEIGHT="200" NAME="script" ALIGN=""');
document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
document.write(' </EMBED>');
document.write(' </OBJECT>');
} else{
document.write('<IMG SRC="script.gif" WIDTH="300" HEIGHT="200" usemap="#script" BORDER=0>');
}
//-->
</SCRIPT><NOSCRIPT><IMG SRC="script.gif" WIDTH="300" HEIGHT="200" usemap="#script" BORDER=0></NOSCRIPT>



It is used to display an image if someone does not have flash. I can't seem to get it to work.

Thanks
Alex
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Javascript & BTS gamerigs osCMax v2 Customization/Mods 2 11-06-2005 12:20 PM
inserting image joanstead osCommerce 2.2 Modification Help 0 10-24-2005 05:47 PM
Javascript Error jgkiefer osCMax v1.7 Discussion 0 09-23-2003 06:55 AM
javascript integration bushman osCMax v1.7 Discussion 3 09-16-2003 11:12 AM
inserting new products? Anonymous osCommerce 2.2 Modification Help 1 12-07-2002 08:24 PM


All times are GMT -8. The time now is 03:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax