Search:
Namespaces
Discussions
.NET v1.1
Feedback
javascript with asp.net problem
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.languages.jscript
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...
krishna (VIP)
Below is the code.
language/platform = asp.net/vb.net
private sub openW()
sResult = sResult & "<script language=javascript> mywindow = window.open('
http://localhost/mohsaic/default.aspx?tc=Client/Manage
'); "
sResult = sResult & "mywindow.parent.frames[1].location = '
http://localhost/treeview/treeview.aspx?m=c&pid=366826706
'; "
sResult = sResult & "mywindow.parent.frames[0].location = '
http://localhost/mohsaic/default.aspx?tc=Client/Manage
'; </script>"
Response.Write(sResult)
End Sub
I am calling this in
LinkButton
(asp.net servercontrol) Click event
it opens the new window and the new window has got the frames with in frames and frames with in those frames.
the above code works fine on local boxes and once the code is pushed to server(testing box), it works for 1st time and then on it stops working and i get a message "mywindow.parent.frames.1 is null or not a object error".
while pushing the localhost is made to the respective box name.
i cannot imagine a reason for working once and not working again., if anyone recall the same error before and have fixed please let me know?
any help is appriciated
Reply to this message...
bruce barker
you are hitting cross site scripting security. once the frames reference a
different site (localhost) than main site script form a main site page
cannot access the dom of the other pages.
-- bruce (sqlwork.com)
"krishna" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
i get a message "mywindow.parent.frames.1 is null or not a object error".
[Original message clipped]
Reply to this message...
System.Web.UI.WebControls.LinkButton
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com