Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Side Include and Scoping...

Status
Not open for further replies.

greaver

Programmer
Apr 29, 2002
31
CA
Hey Guys,

I'm working with a html that has a navigation bar that I would like to pull out into another file and reuse. I've tried using server-side includes but I found that the onClick event don't seem to be able to cross page boundaries. That is the onclick event can only be captured by javascript that exists in the navigation-bar file and not in a file that includes this script. Is there anyway around this?

Sonny.
 
Whatever's wrong with your script, that isn't it. Server Side Includes run on the server, hence the name. Javascript runs in the browser. By the time the script gets to work on the page it doesn't know (or care) which bits were "original" and which were filled in by SSI. Do a view source on your page and you'll see what I mean - no SSI directives, just plain ol' HTML.

-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top