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 363,502 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 3,341 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

open a new window

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  
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.

<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 : May 11th, 2008 at 5:27 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
All times are GMT -4. The time now is 3:46 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC