Forums / Templates, Stylesheets, Page Layout / Java Script code is displayed

Java Script code is displayed

Views: 801

Results 1 to 8 of 8
23 Apr 2011, 19:17
#1
saminca avatar

saminca

New Zenner

Join Date:
Apr 2011
Location:
California
Posts:
11
Plugin Contributions:
0

Java Script code is displayed

On main page of my website, now a Java scripts code is being displayed instead of streaming images. I haven't updated any code or made any changes to the code.

Can someone guide me on how to resolve this issue? I still have copy of my original codes saved on my desktop.

23 Apr 2011, 19:36
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Java Script code is displayed

It would help if we could see your site

23 Apr 2011, 19:50
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
9

Re: Java Script code is displayed

It probably means that there's a syntax error or missing tag, but as Kobra says, there's no way to even attempt to diagnose it without seeing it.

23 Apr 2011, 20:27
#4
saminca avatar

saminca

New Zenner

Join Date:
Apr 2011
Location:
California
Posts:
11
Plugin Contributions:
0

Re: Java Script code is displayed

kobra:

It would help if we could see your site

My site is https://www.qualitypetcenter.com

23 Apr 2011, 20:45
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
9

Re: Java Script code is displayed

Hmmm. Not seen one like that before. How was this javascript installed?

23 Apr 2011, 21:12
#6
saminca avatar

saminca

New Zenner

Join Date:
Apr 2011
Location:
California
Posts:
11
Plugin Contributions:
0

Re: Java Script code is displayed

kuroi:

Hmmm. Not seen one like that before. How was this javascript installed?

I didn't installed the Javascript and I am not sure how the javascript was installed.

I could simply replace the javascript file, if someone can tell me which file is causing the issue.

23 Apr 2011, 21:32
#7
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Java Script code is displayed

Did you just paste the content of the javascript file in to the define_main_page?

as your code seems to be missing the javascript tags that should be around it like this

<script type="text/javascript">

<!-- // JAVASCRIPT VARS // cache buster var cacheBuster = "?t=" + Date.parse(new Date()); // stage dimensions var stageW = "593";//"100%"; var stageH = "227";//"100%"; // ATTRIBUTES var attributes = {}; attributes.id = 'FlabellComponent'; attributes.name = 'FlabellComponent'; // PARAMS var params = {}; params.bgcolor = "#ffffff"; params.menu = "false"; params.scale = 'noScale'; params.wmode = "opaque"; params.allowfullscreen = "true"; params.allowScriptAccess = "always"; /* FLASH VARS */ var flashvars = {}; /// if commented / delete these lines, the component will take the stage dimensions defined /// above in "JAVASCRIPT SECTIONS" section or those defined in the settings xml flashvars.componentWidth = stageW; flashvars.componentHeight = stageH; /// path to the content folder(where the xml files, images or video are nested) /// if you want to use absolute paths(like "http://domain.com/images/....") then leave it empty("") flashvars.pathToFiles = "banner/"; // path to content XML flashvars.xmlPath = "xml/banner.xml"; /** EMBED THE SWF**/ swfobject.embedSWF("preview.swf"+cacheBuster, attributes.id, stageW, stageH, "9.0.124", "js/expressInstall.swf", flashvars, params, attributes); In order to view this object you need Flash Player 9+ support! --> </script>
23 Apr 2011, 22:21
#8
saminca avatar

saminca

New Zenner

Join Date:
Apr 2011
Location:
California
Posts:
11
Plugin Contributions:
0

Re: Java Script code is displayed

nigelt74:

Did you just paste the content of the javascript file in to the define_main_page?

as your code seems to be missing the javascript tags that should be around it like this

Hello NigelT74, thank you very much for your assistance. After replacing define_main_page.php file in the following folder /public_html/includes/languages/english/html_includes, the issue was resolved.

I am not sure, how this file got corrupted, but it is now resolved.

Again, thank you so much for pointing out the file name.