View Single Post
  #1 (permalink)  
Old May 12th, 2008, 10:30 AM
toddw607 toddw607 is offline
Authorized User
 
Join Date: Feb 2007
Location: Binghamton, NY, USA.
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddw607 Send a message via Yahoo to toddw607
Default Using javascript to open a page

Hi,
     I have a pretty strange problem. I am displaying 3 different frames in an aspx page, the top frame is a toolbar, the left frame displays a html page and the third, right frame displays an aspx page. On the right frame I have a datagrid with a link button and once the link button is clicked, it creates the html page, displaying it in the left frame. When the button is initially cliched when the page first loads it works fine however the page does not refresh every time a different link button is clicked. The html page is being created every time but it will not change in the frame. Here is my code:


Code:
 Public Sub Report_Arguments (Src As Object, Args As CommandEventArgs)

Args.CommandArgument & "<br/>"
Dim tempParam As String
tempParam=Args.CommandArgument
 Dim objWriter As New System.IO.StreamWriter("D:\IISRoot\newhtml.html")
objWriter.Write("<HTML><OBJECT CLASSID="+"""clsid:B97E13D0-0BB8-4BCC-85FA-348087269A7E"""+" WIDTH="+"""100%"""+""+ " HEIGHT="+""+"""100%"""+""+"><PARAM NAME="+"URL "+ "VALUE="+"""P:\twhitmarsh\PATHCGMS\"+ tempParam +""""+"></OBJECT></HTML>")
objWriter.Close()
 
MyClick(Args.commandname)
End Sub


  Public Sub MyClick(Byval Index As String) 
  Dim popupScript As String
  popupScript="<script language='javascript'>"+"window.open('IPCGen.aspx?Fig="+ FigNumb + "&Text="+Index + "','ipcframe');<"+"/script>"
  Page.RegisterStartupScript("popupScript", popupScript)
   Dim popupScript2 As String
  popupScript2="<script language='javascript'>"+"window.open('newhtml.html','cgmframe');<"+"/script>"
  Page.RegisterStartupScript("popupScript2", popupScript2)



    The Report_Arguments function is called in the OnClick event of the link button. Any thoughts? TIA

Reply With Quote