DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   open a new window (http://www.daniweb.com/forums/thread123112.html)

sudhakary_rao May 8th, 2008 1:22 am
open a new window
 
Hi
i am having listbox,i want to open a new window after doubleclick of particular item in listbox in asp.net

ardeezstyle May 8th, 2008 2:29 am
Re: open a new window
 
Hi,
I may 've a solution for you. You can check it out.


You need to work on ItemDatabound event, in that add attribute onDoubleClick to each of liste items & call some javascript function to open a pop up.

Wish this help you....

majestic0110 May 8th, 2008 2:01 pm
Re: open a new window
 
Hi there, you can try this:

MyListbox.Attributes["onclick"] = "window.open(...);"

or...

<asp: listbox ID="MyListBox" runat="server" OnClientClick="window.open(...);" />

hope that helps you.
Here is a very useful site:
http://www.gridviewguy.com/ArticleDe...sked_Questions

majestic0110 May 8th, 2008 2:09 pm
Re: open a new window
 
If the above doesn't work you could try this:

http://64.233.183.104/search?q=cache...lnk&cd=7&gl=uk

sudhakary_rao May 9th, 2008 7:48 am
To open a new window in listitem of listbox
 
Hi
after double click of listitem in listbox a popwindow will open.i am able to get this using below code but when i clicked on another listitem.i am not able to get a popupwindow.after closing the previous one,able to get current selection.

<script type="text/javascript" language="javascript">
function display()
{
debugger;
var list=window.document .getElementById ("ListBox1");
var text=list.options[list.options.selectedIndex].text;
var text1=list.options[list.options.selectedIndex].text;
if(text==text1)

window.open("addform.aspx","mypage","scrollbar=no,height=500,width=300,resize=0,menubar=0,location=0");
}
//page_load
ListBox1.Attributes.Add("ondblclick", "javascript:display();");

majestic0110 May 9th, 2008 9:31 am
Re: To open a new window in listitem of listbox
 
I take it my previous post did not help you ?


peter_budo May 11th, 2008 5:28 am
Re: open a new window
 
Threads joined.
sudhakary_rao please do not multipost for same problem, continue with original post just give updated details of the problem

sudhakary_rao May 12th, 2008 1:20 am
Re: open a new window
 
Quote:

Originally Posted by peter_budo (Post 604658)
Threads joined.
sudhakary_rao please do not multipost for same problem, continue with original post just give updated details of the problem




Sorry and i got the solution

majestic0110 May 12th, 2008 2:16 am
Re: open a new window
 
Please mark your thread as solved and post the solution so that others may benefit from it. :-)


All times are GMT -4. The time now is 1:55 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC