Hi all!
I've built this customer support web site. Because the service is not self-explanatory, I decided to do a help page.
For site navigation I use a webcontrols.menu component with four menu items. First three have navigateUrl property specified, and the last one should pop up a window with help.
The reason i chose popup is because it looks very smooth if your application window is resized to 2/3 of width to the left side and help window pops up on the last 1/3 to the right.
Because the menu/menuitem components have no Attributes property, it's kind of hard registering javascript to the onClick event. What I've tried to do is I have changed body tag runat event to "server" and whenever a user clicks on the help menuitem javascript with popup is registered to body onload event - which works fine on localhost. There's a catch to the published version though. Although the script is registered the popup gets supressed. Tried to mess with the javascript a bit, no solutions found.
So this is my first question - how to tell asp.net it should tell the browser that the window.open method is something we want to be executed?
Moving along.. I tried a different approach. I tried to simplify the whole mess and just went for the navigateUrl property and changed target to "_blank". Here's another catch, the tabs namely. If a user's browser is set to use tabs rather than new windows, the help pops up as a tab and the whole idea of having paralel windows goes down the drain.
That would be my second question - is there a way of forcing a browser to open a site in a new window rather than instantiating a new tag?
Do you guys have any other approach up the sleeves? All i want is that on a menuitem click a new window is opened, some js should be executed to modify the width and position of both windows.
Help much appreciated!
These days I'm nostalgically remembering classic ASP times. <-sniff->