Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / JScript / June 2004

Tip: Looking for answers? Try searching our database.

javascript with asp.net problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
krishna - 22 Jun 2004 17:45 GMT
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
bruce barker - 28 Jun 2004 18:22 GMT
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)

> Below is the code.
>
[quoted text clipped - 17 lines]
>
> 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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.