views:

34

answers:

3

I was hoping to open a document in a menu control using a sitemap. I am using the following code in the sitemap but get an error. I would like to be able to click on the menu item, have it open the sample doc in a new window, but not to have the original page navigate to a new place (essentially to do nothing on the main page.)

<siteMapNode url="javascript:window.open('Sample.doc','SampleName'); return false" title="FAQs"  description="FAQs" />

Any idea? Is there some javascript I can use that does not require me to register a function on every page?

A: 
javascript:widow.open

Are you sure you don't mean window.open?
I don't think your script is that much related to widows ;)

Sune Rasmussen
Hah! I did mean window.open. I've updated my question (that wasn't my issue.) I have been trying so many things I got sloppy... thanks.
Sean
A: 

You will need to find out which control is consuming the sitemap file and then catch the event generated from that control.

azamsharp
A: 

I ended up using the following:

<siteMapNode url="javascript:window.open('Sample.doc','SampleName'); void(0);" title="FAQs"  description="FAQs" />
Sean