User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 331,474 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,059 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 309 | Replies: 8 | Solved
Reply
Join Date: May 2008
Posts: 8
Reputation: sudhakary_rao is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sudhakary_rao sudhakary_rao is offline Offline
Newbie Poster

open a new window

  #1  
7 Days Ago
Hi
i am having listbox,i want to open a new window after doubleclick of particular item in listbox in asp.net
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Posts: 17
Reputation: ardeezstyle is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
ardeezstyle ardeezstyle is offline Offline
Newbie Poster

Re: open a new window

  #2  
7 Days Ago
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....
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 946
Reputation: majestic0110 is on a distinguished road 
Rep Power: 2
Solved Threads: 33
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Posting Shark

Re: open a new window

  #3  
6 Days Ago
Hi there, you can try this:

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

or...

  1. <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
Last edited by majestic0110 : 6 Days Ago at 2:04 pm.
If you have a quality, be proud of it and let it define you. Add it to the world!
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 946
Reputation: majestic0110 is on a distinguished road 
Rep Power: 2
Solved Threads: 33
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Posting Shark

Re: open a new window

  #4  
6 Days Ago
If the above doesn't work you could try this:

http://64.233.183.104/search?q=cache...lnk&cd=7&gl=uk
If you have a quality, be proud of it and let it define you. Add it to the world!
Reply With Quote  
Join Date: May 2008
Posts: 8
Reputation: sudhakary_rao is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sudhakary_rao sudhakary_rao is offline Offline
Newbie Poster

To open a new window in listitem of listbox

  #5  
6 Days Ago
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();");
Last edited by peter_budo : 4 Days Ago at 5:27 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 946
Reputation: majestic0110 is on a distinguished road 
Rep Power: 2
Solved Threads: 33
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Posting Shark

Re: To open a new window in listitem of listbox

  #6  
5 Days Ago
I take it my previous post did not help you ?

If you have a quality, be proud of it and let it define you. Add it to the world!
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 1,574
Reputation: peter_budo has a spectacular aura about peter_budo has a spectacular aura about 
Rep Power: 8
Solved Threads: 154
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Posting Virtuoso

Re: open a new window

  #7  
4 Days Ago
Threads joined.
sudhakary_rao please do not multipost for same problem, continue with original post just give updated details of the problem
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: May 2008
Posts: 8
Reputation: sudhakary_rao is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sudhakary_rao sudhakary_rao is offline Offline
Newbie Poster

Re: open a new window

  #8  
3 Days Ago
Originally Posted by peter_budo View Post
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
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 946
Reputation: majestic0110 is on a distinguished road 
Rep Power: 2
Solved Threads: 33
majestic0110's Avatar
majestic0110 majestic0110 is online now Online
Posting Shark

Re: open a new window

  #9  
3 Days Ago
Please mark your thread as solved and post the solution so that others may benefit from it. :-)
If you have a quality, be proud of it and let it define you. Add it to the world!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 8:47 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC