PDA

View Full Version : please help with javascript code!!!!


sahkab
11-23-2007, 06:14 PM
hi all, im pretty new to web designing. i built my first site in dreamweaver cs3 and it looked good. the problem is that when i bought my domain and uploaded the site i was told the site uses server side Jave script in, and they do not support server side KJave script on their platform. Hence, i need to change the script to client side Java script. the problem is that i have no idea on how to do that. can anyone help? thanks.

lux
11-23-2007, 07:04 PM
Please describe the functionality that the java script performs and post your code, then we'll see if we can help.

sahkab
11-23-2007, 07:06 PM
it will be my pleasure to do that. but i just have no idea. can you tell me what to do? should i copy the entire page's code? thanks

lux
11-23-2007, 09:49 PM
yes copy the code into your message and list exactly what you want to do on your webpage. e.g. have a user fill out a form, login or something else....

sahkab
11-23-2007, 10:07 PM
this is the code for the index.html page:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Kaajal Developments - Building Your Dreams</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
}
body {
background-color: #000000;
background-image: url();
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a:link {
color: #FFFFFF;
}
#Header {
font-family: "Times New Roman", Times, serif;
font-size: x-large;
text-align: center;
background-color: #313131;
color: #000000;
font-weight: bolder;
}
#Container {
width: 785px;
margin-right: auto;
margin-left: auto;
margin-top: 0px;
}
#Video {
background-color: #000000;
padding: 10px;
border: medium none #FFFFFF;
height: auto;
width: auto;
text-align: center;
}
#Links {
padding: 15px;
float: left;
margin-top: 20px;
}
#English {
padding: 15px;
float: right;
margin-top: 20px;
}
#footer {
padding: 10px;
clear: both;
}
a:hover {
color: #0000CC;
}
#Links {
font-size: 110%;
color: #FFFFFF;
text-decoration: none;
}
#English {
font-size: 110%;
color: #FFFFFF;
text-decoration: none;
}
#nav ul {
font-size: 120%;
color: #FFFFFF;
text-decoration: none;
list-style-type: none;
margin: 0px;
padding: 0px;
}
#nav li {
display: inline;
text-decoration: none;
padding: 0px;
margin-top: 0px;
margin-right: 150px;
margin-bottom: 0px;
margin-left: 150px;
}
#nav li {
font-size: 130%;
}
#nav {
color: #FFFFFF;
text-decoration: none;
}
#nav a {
text-decoration: none;
color: #FFFFFF;
}
#nav a:hover {
color: #999999;
}
-->
</style>
<script type="text/javascript">
function MM_CheckFlashVersion(reqVerStr,msg){
with(navigator){
var isIE = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
if (!isIE || !isWin){
var flashVer = -1;
if (plugins && plugins.length > 0){
var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
if (desc == "") flashVer = -1;
else{
var descArr = desc.split(" ");
var tempArrMajor = descArr[2].split(".");
var verMajor = tempArrMajor[0];
var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
flashVer = parseFloat(verMajor + "." + verMinor);
}
}
// WebTV has Flash Player 4 or lower -- too low for video
else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;
var verArr = reqVerStr.split(",");
var reqVer = parseFloat(verArr[0] + "." + verArr[2]);

if (flashVer < reqVer){
if (confirm(msg))
window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}
}
}
}
</script>
<script src="Scripts/AC_ActiveX.js" type="text/javascript"></script>
</head>
<body onload="MM_CheckFlashVersion('7,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?');">
<div id="Container">
<div id="Header"><img src="Images/Banner Kaajal.gif" alt="Kaajal Developments" width="786" height="90" /></div>

<div id="Banner">
<h2 align="center">Building Your Dreams in Mexico</h2>
<h2 align="center">Construyendo sus Sueños en México</h2>
</div>

<div id="Video">
<p>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','640','heigh t','518','title','Video','src','video','quality',' high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','video' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="640" height="518" title="Video">
<param name="movie" value="video.swf" />
<param name="quality" value="high" />
<embed src="video.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="640" height="518"></embed>
</object></noscript>
</p>
</div>
<div id="nav">
<ul>
<li><a href="Espanol.html">Español</a></li>
<li><a href="English.html">English</a></li>
</ul>
</div>
</div>
<!--End of div -->
<h1 align="center">&nbsp;</h1>
<h3 align="center">&nbsp;</h3>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>

all the pages are supposed to have simple text and links to other pages there are 11 pages in all, and this is the only one with a video,
by the way thank you

lux
11-23-2007, 10:27 PM
what is it about your web pages that doesn't work?

i assume you have uploaded all your web pages to your hosting account.

can you view the website on the domain you have registered?

sahkab
11-23-2007, 10:32 PM
no i cant lux, that is actually the problem. when i contacted the provider they sent me these email:
We have noticed that you are making use of server side Jave script in the index file for your website. We do not support server side KJave script on our platform. Hence, you need to either change the script to client side Java script or contact an Application developer for the relevant change.
now, the index page is not the only one that i cant view, its all of them. i just built the site in dreamweaver cs3 and to tell you the truth, didnt even know what java scripts were.
any ideas?
thanks

lux
11-23-2007, 10:42 PM
can you post the code from this file please:

Scripts/AC_ActiveX.js

try uploading the pages without the video player code and see if the pages load.

who are you hosting the site with?

domedia
11-24-2007, 02:55 PM
AC_ActiveX.js is a standard file adobe uses to fix the 'click to enable' issue in IE. There should be nothing wrong with the code in that file, it is generated by Flash.

To be honest, I don't see any server side javascript at all on your page.

Are you sure this is your file as it is on the server, and not just you copying source when viewing in browser?

lux
11-24-2007, 03:28 PM
cheers domedia,

i couldn't see any server side code either, i was wondering if the issue was with the media player for sahkab's movie

domedia
11-24-2007, 07:53 PM
sahkab,
Can you post the url please, it's not really clear what you need help with.