a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

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
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Microsoft FrontPage Help >> Newbie and can't understand why FPs put a JavaScript file in page
Page: [1]
 
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. ~~
:)
jaybee

 

Posts: 14207
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Newbie and can't understand why FPs put a JavaScrip... - 3/14/2005 6:42:34   
Hiya, welcome to OF.

The script is an image preloader. Sounds like the easiest way for you is to do the pages from scratch as FP obviously wants the javascript in as part of something you've set in the old theme.

Once you've got rid of the old pages you should be able to delete the .js file.

The IE warning is just IE's new security with Service Pack 2. You'll get that every time you open a page from FP using IE.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to womble)
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/14/2005 8:38:36   
Thanks for that. :)

That's what I was worried about...and just as I'd got everything looking right! I've just tried my plain text version of the site, and they're fine, though admittedly they never had a theme associated with them, so it looks like that probably was the source of all my problems. You live and learn! I've just tried creating a new page and then cutting and pasting the content to save having to re-do all that, but it seems to be bringing the javascript with it. Oh well, back to the drawing board....

(in reply to jaybee)
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

(in reply to jaybee)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> Microsoft FrontPage Help >> Newbie and can't understand why FPs put a JavaScript file in page
Page: [1]
Jump to: 1





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