Wrox Programmer Forums
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 31st, 2007, 04:01 AM
Registered User
Join Date: Dec 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to refresh the popup

Hi ,

am working with a Music Project which uses vb.net and asp.net...

In my songs.aspx i have all the songs with check boxes and playselected button...when i clicked on playselected button only those songs are displayed to play in a popup whose checkbox is checked..

here my player plays the songs by wring xml file..

the following is the coe for playselected..


Private Sub playSelected()
Dim check As Boolean

Dim Music As New MusicMachine
Dim strname As String = Music.GetMusicFileId

Dim item As DataGridItemDim writer As New XmlTextWriter(Server.MapPath("~\XML\") & strname & ".xml", Encoding.UTF8)



For Each item In FileSystemGrid.Items
Dim chkBx As CheckBox = CType(item.Cells(0).FindControl("deletethis"), CheckBox)

If chkBx.Checked Then

check = True


writer.WriteAttributeString("url", "Skins\skin1\Songs\" & Request.QueryString("Type") & "\" & Request.QueryString("Name") & "\" & item.Cells(2).Text)


End If





If check <> True Then

Response.Write("<script language=""javascript"">alert('Select at least One Song!');</script>")


Page.RegisterStartupScript("Popup", "<script> popup('player.aspx');</script>")

End If

Catch ex As Exception


End Try

End Sub

************************************************** **********

And the code for funtion popup is...:


function popup(URL)

{ day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0, width=735, height=625');");



Here the problem is : If i check 2 songs an click on playselected the popup is coming with 2 songs...if i checked one more song and click on playselected then again a popup is coming with 3 songs..this should be avoide .means the previous popup has to be refreshed...

Please help me out

Thanks in advance

Old December 31st, 2007, 04:48 AM
Friend of Wrox
Join Date: Oct 2007
Posts: 130
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via AIM to urtrivedi

Whenever you create popup window, pass one unique window name along with other parameters. I think this may help you. Refer to window.open function argument.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Scripting(ASP) popup(js)refresh after sent icecoolcorey Pro Java 3 March 27th, 2007 12:19 AM
Refresh GridView Using Refresh Button msbsam ASP.NET 2.0 Professional 0 December 6th, 2006 05:57 AM
get popup window value without refresh qadeerahmad General .NET 6 August 4th, 2006 10:49 AM
refresh the parent window when closing the popup ram_siddinen VS.NET 2002/2003 1 January 30th, 2004 04:05 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.