Skip to main content

Microsoft Silverlight

Answered Question navigation problem RSS Feed

(0)

Dileep720
Dileep720

Member

Member

3 points

12 Posts

navigation problem

 Hai all,

I am getting an error like this The DOM/scripting bridge is disabled  when i try to navigate to my defultpage.aspx from other page using javascript pls help me

Dilu

 

Pravinkumar R. D.
Pravinku...

Contributor

Contributor

4300 points

708 Posts

Re: navigation problem

Are you navigating from .aspx to other aspx or Silverlight to ASPX page?

Check this out-

http://blog.figmentengine.com/2008/11/exception-domscripting-bridge-is.html

Thanks,

Pravin

"Please mark as answered, if this answers your question"

Lars Buchleitner
Lars Buc...

Participant

Participant

1667 points

336 Posts

Re: navigation problem

 have you seen this?

Dileep720
Dileep720

Member

Member

3 points

12 Posts

Re: Re: navigation problem

 ya but not solved my proble, i am trying to navigate from a different silverlight application to the default one,using javascript

 here my code

.cs file ..............

HtmlPage.RegisterScriptableObject("PendingRequests", this);
HtmlPage.Window.Invoke("TalkToJavaScript", "logout");

 

 

 

.aspx file...........

    function TalkToJavaScript(data) {
        window.location = "UserLogin.aspx";
           
        }    

Amanda Wang - MSFT
Amanda W...

All-Star

All-Star

17241 points

1,466 Posts

Answered Question

Re: Re: navigation problem

Hi,

We have test in our labs, it wokd fine.

1. Add below javascript function to the head of the  aspx that is hosting  the *.xap file:

 function TalkToJavaScript(data) {
            window.location = "http://www.google.com";
        }    

2. the codebehind of the silvelright usercontrol:

 private void Button_Click(object sender, RoutedEventArgs e)
        {
            HtmlPage.Window.Invoke("TalkToJavaScript","logout");
        }

Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities