473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ModalDialog form unable to return value to webpart

Hi,

I have a web part page with a toolbar webpart and a grid webpart. In the toolbar, I have menu-items to update a field.

For selecting the value of the field I have another asp.net webform which shows the various options in a dropdownlist.
This form has to be a modal form and has to be shown on click the Toolbar menu items. When the user selects an option from the drop-down list and click OK then the option selected has to be
returned to the web-part page from where the webform was shown.

I'm able to do this when I have a Webform and not a sharepoint webpart page as the parent page. When I use a sharepoint web-part page, this doesn't work.

Code Snippet:

grid webpart(in a webpart page):

• Code-behind
void webpart_SetToolbarMenuItemProperties(object sender, SetMenuItemPropertiesEventArgs e)
{
switch (e.MenuItem.MenuItemAOTName.ToLower())
{
case "smmmileadchangestatuspostpone":
e.MenuItem.ClientOnClickScript = "UpdateStatusWindow()" ;
break;
}
}

• Html source

function UpdateStatusWindow()
{
var returnVal = window.showModalDialog('http://localhost/_layouts/ep/smmLeadReasonId.aspx','','dialogWidth:200px;dialog Height:120px;status:no');
alert (returnVal);
Aasp.net form shown as modal form

• Html source

<input id="Button1" type="button" value=" OK " önClick="Close()"/>

function Close()
{
window.returnValue = getSelectedReason();
window.close();
}
function getSelectedReason()
{
return form1.ddlUpdateStatus.value;
}

If anyone has some idea why this is not working, please provide your inputs.
Thanks,
Manpreet

May 22 '07 #1
0 884

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Semi Head | last post by:
Hello folks, I'm looking for a script to validate a specific number value in a standard form input field. An example would be, if someone enters a number into a form input, I want the script to...
0
by: J. Jespersen | last post by:
Hi people, I fiddling with webparts, and have created my own custom webpart from scratch. The webpart itself is contained in a myPart.dll I have two different sites. SiteA and SiteB. Both are...
3
by: Jav | last post by:
I create a UserControl (.ascx), and then change it in code to: Inherits System.Web.UI.WebControls.WebParts.WebPart expecting that it will now be treated as a WebPart. But this immediately...
5
by: Rabia | last post by:
I am using the window.open() with modal=yes to simulate the pop up window as modalDialog in mozilla/firefox. The pop-up window (child) has a few options which the user selects and then click the...
6
by: praan | last post by:
I am trying to display xml content in a modaldialog window using window.showModalDialog(), but a blank modaldialog window is displayed. can anyone help me with this. Any other way present to...
0
by: Ken | last post by:
We have a shared hosting plan (Windows-based) with GoDaddy.com. GD.com has a "generic" form mailer script (gdform.asp) that allows us to set up a "Contact Us" page, which, when the user clicks...
0
by: Manpreet | last post by:
Hi, I have a web part page with a toolbar webpart and a grid webpart. In the toolbar, I have menu-items to update a field. For selecting the value of the field I have another asp.net webform...
0
gchq
by: gchq | last post by:
Hi there Is it possible to halt the execution of code to allow a ModalDialog window to open and return a value?
4
by: Arnab das | last post by:
I am working in asp.net webpart.I want to show the delete warning message in a modal popup. How can I achieve this?
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.