Skip to main content
Home Forums Silverlight Programming Programming with JavaScript navigation problem
4 replies. Latest Post by Amanda Wang - MSFT on October 20, 2009.
(0)
Dileep720
Member
3 points
12 Posts
10-14-2009 8:59 AM |
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
Pravinku...
Contributor
4300 points
708 Posts
10-14-2009 9:05 AM |
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 Buc...
Participant
1667 points
336 Posts
10-14-2009 9:06 AM |
have you seen this?
10-14-2009 9:13 AM |
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 W...
All-Star
17241 points
1,466 Posts
10-20-2009 12:45 AM |
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"); }