473,748 Members | 6,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to return 2 values using showModalDialog ?

123 New Member
I use below to popup a page "popup" and then pass the value from popup
and back to my page. see below

However, how to return 2 values? I can return 1 value only.

Expand|Select|Wrap|Line Numbers
  1. function openModal() { 
  2. retVal=showModalDialog('popup.htm');
  3. valReturned=retVal;
  4. alert('The following text has been returned: "'+valReturned+'"');
  5. }
thanks.
Dec 8 '08 #1
1 2016
Dormilich
8,658 Recognized Expert Moderator Expert
you can't return two values, only one. you could work around that by using arrays or object and extract back the desired values.

regards
Dec 8 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
8201
by: Lee | last post by:
I am using a modal window and an iFrame to try and pull a return value back. I am doing this across domains. I have the value returned from the modal window to the iFrame window but I can not get the value returned to the parent window. The alert in the parent window always returns undefined errors. Any help would be much appreciated. I call the modal window and wait for the return as such: function LCC()
1
3999
by: DavidS | last post by:
I have parent.aspx web page from which I call a modal dialog (child.aspx via showmodaldialog). I'd like to populate two text boxes, <asp:TextBox id=txt_HN> on the child form with data from the caller. for parent.aspx..... <script> block function UpdH(title,horse) { var iParms=new Object(); iParms.Name=horse; ....} for child.aspx.... <script> block
6
8154
by: Mark Goldin | last post by:
I have main aspx page with a button that will show a modal dialog in the Browser when a user clicks on the button. On the modal form the user will do some selections. The he will submit his selections to the server via a postback. How can I take these selections to the main page? Thanks
3
6714
by: Venkat Chellam | last post by:
HI all, I am finding a very peculiar problem. I have two pages. From the first page on button click i have javascript function which it turn opens modal dialog box with second page as a parameter to it. From the second page, when i click ok, i set some return value to the window and then want to retieve the return value from the fist page where showmodaldialog was called. but the return value always shows undefined? does anyone came...
1
2855
by: WLF | last post by:
I have the following function (C# behind aspx page): private void ButtonNewSupplier_Click(object sender, System.EventArgs e) { Response.Write("<script language=javascript>window.showModalDialog('" + Const.sPPAddSupplier + "','_blank','left=50,top=50,toolbar=false,status=yes,directories=false,menubar=false,scrollbars=true,copyhistory=false,width=500,height=500');</script>"); }
3
1462
by: csgraham74 | last post by:
Hopefully someone can help me with this i dont seem to be able to find a javascript - asp.net group. im trying to creat a modal dialog box in asp.net using the following Dim str_JavaPopup As String = "<script language" & "='javascript'>window.showModalDialog('frm_MoreInfo.aspx?ProductImage=" & str_ImageName & "&ProductDesc=" & str_Description & "','dialogWidth: 100px;dialogHeight: 100px;center: yes;resize: no;status: no;help:...
2
18690
by: Tony WONG | last post by:
there is a "Main" page to call for "phonebook" page by showModalDialog, like below var phoneno = window.showModalDialog("phonebook.asp","Dialog Box Arguments # 1"............... now i am able to store the data at the variable - ABC at the phonebook page How can i put ABC back to the "Main" page at form "formsend", element_textbox "text1"?
0
960
by: l7alabeh | last post by:
Hi, I am having problems with the returnValue from a showModalDialog. The value is not returned to the parent form and the the values in the other text fields in the parent form are emptied. Here is my code: Parent Page:
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9321
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.