|
| |
Newbie and can't understand why FPs put a JavaScript file in page
View related threads:
(in this forum
| in all forums)
|
Logged in as: Guest
|
|
|
womble
Posts: 5721 Joined: 3/14/2005 From: Living on the edge Status: offline
|
Newbie and can't understand why FPs put a JavaScript fi... - 3/14/2005 6:02:22
Hi, I'm very new to all this and trying to design my website through a combination of working in design view and split view to tweak the html where necessary. I have a problem with a JavaScript file FP seems to have put in for me (not sure why?). I suspect it may be something to do with either when in the early stages I decided page transitions would be cool, then changed my mind and took them off again, or a theme that I modified and then took out. I'm now left with an entry that reads: </script>
<script language="JavaScript">
<!--
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs=new Image; d.FP_imgs.src=a; }
}
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
I've no idea what it's there for and it's annoying me becuase FP won't let me take it out. There's also a file appeared in the file list called outline.js. When I try and preview the site with IE I get the 'To help protect your security, IE has restricted this file from showing active content' etc. etc. (but this doesn't happen in FF). If I try and design a new page from scratch, I don't get this happening, but if I try and create a page from an existing page, the same old problem happens. Could this rogue javascript be the problem? Thanks, womble (puzzled)
_____________________________
~~ "A cruel god ain't no god at all" ~~ ~~ Erase hate. Practice love. ~~
|
|
|
|
womble
Posts: 5721 Joined: 3/14/2005 From: Living on the edge Status: offline
|
RE: Newbie and can't understand why FPs put a JavaScrip... - 3/17/2005 4:30:06
Well I figured out the source of the script eventually after I copied over all the pages that seemed to be unaffected and started the ones that were from scratch. Paranoid by then about the script creeping back in again I kept previewing it in the browsers, and all was well until I used the design view to put in FP's little interactive buttons, previewed again, and there was the script. After much head scratching (the rest of the committee of the group I'm doing the site for were adament they wanted the buttons as they were) I eventually found a work-around by using just one of the 3 images FP was putting in for each button and doing an image map - voila, the buttons they loved without the script! womble
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|