...

View Full Version : which is the best way to include files in home page



o0O0o.o0O0o
05-15-2008, 04:26 AM
hi ,

i want to know if i am building home pages with 5 links or 5 forms.
Now every link will have its corresponding html file with necessary JS

I want to load them on homepage DIV using ajax.

Now which is the best way to do.

Should i code each page separately , chk it and then direcly use like


get(a.html) target = div-content

or i have to code each page with reagards to home page.

IN first case , there will be files , JS files , Css files which will get repeated and can cause problems . Beacuse my individual files are working correct but when i import them in DIV tag , they they work well in IE but in FF they don't

So how you people do that

_Aerospace_Eng_
05-15-2008, 06:36 AM
Have you looked into the ajax scripts at dynamicdrive.com? More specifically this one: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

o0O0o.o0O0o
05-15-2008, 07:51 AM
i tried that script as well , but same problem , the JS script which works on that page does not work on the page when loaded dynamically into homepage

gnomeontherun
05-15-2008, 08:59 PM
Well...the embedded pages shouldn't need the JS?

o0O0o.o0O0o
05-16-2008, 06:26 AM
why is that. if i have form with JS validation check and i want to display that form inside a div tag , the jS is needed

gnomeontherun
05-16-2008, 06:54 AM
Ok I didn't know you meant a form validation script, you just said JS which I took to mean the AJAX script.

I know using the iframe versions will not prevent it from working, but I think the issue is that when you place that external file into the DIV it has to be accessed with a different path than when it is just its own page.

http://www.dynamicdrive.com/dynamicindex17/iframessi.htm



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum