2

I am having a problem with the asp:Menu control.
A menu control 2 levels deep does not play well with internet explorer on https.
I continually get an annoying popup.

I think in order to fix this I need to override a function in an automatically included script file.

change this

function PopOut_Show(panelId, hideScrollers, data) {
...
childFrame.src = (data.iframeUrl ? data.iframeUrl : "about:blank");
...
}

to this

function PopOut_Show(panelId, hideScrollers, data) {
...
if(data.iframeUrl)
childFrame.src = data.iframeUrl;
...
}

however I have no clue how I would hack apart the asp:menu control to fix microsoft's javascript in their control.

Is there a way I can just override the function to what I need it to be?

Biff MaGriff
  • 8,102
  • 9
  • 61
  • 98
  • change function name in derived one. or add a null parameter to the function in derived one. :)Why overriding Javascript. Overload it simply – zod Oct 29 '10 at 21:12

2 Answers2

3

If you declare the overload later that should be the function that executes

function alerttest(){
alert("1");
}

function alerttest(){
alert("2");
}

alerttest();

Here is another answer: Overriding a JavaScript function while referencing the original

Community
  • 1
  • 1
Alex Rashkov
  • 9,833
  • 3
  • 32
  • 58
  • Thanks this works to override the function. Unfortunately my code fix did not work. I'll have to see what the heck I'm doing wrong. – Biff MaGriff Oct 29 '10 at 21:28
0
childFrame.src = (data.iframeUrl ? data.iframeUrl : "about:blank");

Is identical to:

if(data.iframeUrl){
    childFrame.src = data.iframeUrl;
}
else{
    childFrame.src = 'about:blank';
}

Why do you need to override the function?

gen_Eric
  • 223,194
  • 41
  • 299
  • 337
  • about:blank does not get put under https and I get this pop up http://stackoverflow.com/questions/3551438/aspmenu-hover-makes-security-information-pop-up-how-do-i-fix – Biff MaGriff Oct 29 '10 at 21:15