open a new window

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: May 2008
Posts: 10
Reputation: sudhakary_rao is an unknown quantity at this point 
Solved Threads: 0
sudhakary_rao sudhakary_rao is offline Offline
Newbie Poster

open a new window

 
0
  #1
May 8th, 2008
Hi
i am having listbox,i want to open a new window after doubleclick of particular item in listbox in asp.net
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 48
Reputation: ardeezstyle is an unknown quantity at this point 
Solved Threads: 1
ardeezstyle ardeezstyle is offline Offline
Light Poster

Re: open a new window

 
0
  #2
May 8th, 2008
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 Quick reply to this message  
Join Date: Oct 2007
Posts: 1,297
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: open a new window

 
0
  #3
May 8th, 2008
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; May 8th, 2008 at 3:04 pm.
Computers are man's attempt at designing a cat: It does whatever it wants, whenever it wants, and rarely ever at the right time.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,297
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: open a new window

 
0
  #4
May 8th, 2008
If the above doesn't work you could try this:

http://64.233.183.104/search?q=cache...lnk&cd=7&gl=uk
Computers are man's attempt at designing a cat: It does whatever it wants, whenever it wants, and rarely ever at the right time.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 10
Reputation: sudhakary_rao is an unknown quantity at this point 
Solved Threads: 0
sudhakary_rao sudhakary_rao is offline Offline
Newbie Poster

To open a new window in listitem of listbox

 
0
  #5
May 9th, 2008
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.

  1. <script type="text/javascript" language="javascript">
  2. function display()
  3. {
  4. debugger;
  5. var list=window.document .getElementById ("ListBox1");
  6. var text=list.options[list.options.selectedIndex].text;
  7. var text1=list.options[list.options.selectedIndex].text;
  8. if(text==text1)
  9.  
  10. window.open("addform.aspx","mypage","scrollbar=no,height=500,width=300,resize=0,menubar=0,location=0");
  11. }
  12. //page_load
  13. ListBox1.Attributes.Add("ondblclick", "javascript:display();");
Last edited by peter_budo; May 11th, 2008 at 6:27 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,297
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: To open a new window in listitem of listbox

 
0
  #6
May 9th, 2008
I take it my previous post did not help you ?

Computers are man's attempt at designing a cat: It does whatever it wants, whenever it wants, and rarely ever at the right time.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,241
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 491
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: open a new window

 
0
  #7
May 11th, 2008
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)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 10
Reputation: sudhakary_rao is an unknown quantity at this point 
Solved Threads: 0
sudhakary_rao sudhakary_rao is offline Offline
Newbie Poster

Re: open a new window

 
0
  #8
May 12th, 2008
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 Quick reply to this message  
Join Date: Oct 2007
Posts: 1,297
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: open a new window

 
0
  #9
May 12th, 2008
Please mark your thread as solved and post the solution so that others may benefit from it. :-)
Computers are man's attempt at designing a cat: It does whatever it wants, whenever it wants, and rarely ever at the right time.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC