473,662 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

return value from showmodaldialog

there is a "Main" page to call for "phonebook" page by showModalDialog , like
below

var phoneno = window.showModa lDialog("phoneb ook.asp","Dialo g 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"?

i am not familiar with javascript but i trust javascript can do it.

Thanks in advance for your help.

Tony
Mar 7 '06 #1
2 18677
Tony WONG said the following on 3/7/2006 2:56 AM:
there is a "Main" page to call for "phonebook" page by showModalDialog , like
below

var phoneno = window.showModa lDialog("phoneb ook.asp","Dialo g 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"?


In the page that opens the modal:
document.formse nd.text1.value = window.showModa lDialog(.....);

And then in your modalDialog page:

returnValue = ABC;
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 7 '06 #2
Thanks a lot.
"Randy Webb" <Hi************ @aol.com>
???????:F_***** *************** @comcast.com...
Tony WONG said the following on 3/7/2006 2:56 AM:
there is a "Main" page to call for "phonebook" page by showModalDialog ,
like below

var phoneno = window.showModa lDialog("phoneb ook.asp","Dialo g 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"?


In the page that opens the modal:
document.formse nd.text1.value = window.showModa lDialog(.....);

And then in your modalDialog page:

returnValue = ABC;
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/

Mar 7 '06 #3

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

Similar topics

5
8172
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()
6
8143
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
6711
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
2850
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>"); }
8
7394
by: Sergei | last post by:
Hi, I am displaying modal dialog and passing values from the main form to the modal dialog and back. It works fine but if I used the following syntax on Page_Load(just for testing) in VB to assign value form the object to text Box it gives error 'Object required' Dim strResponse As String strResponse = strResponse & "<script language=""JavaScript"">" & vbCrLf strResponse = strResponse & "var aForm; " & vbCrLf
0
955
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:
6
2611
by: David | last post by:
Hi all, I am opening a webform with showModalDialog. This appears to pop-up fine, though I have a problem... Inside the webform is a treeview control. When the treeview is populated, I am setting the treenode navigateurl to javascript:Click('test')
1
2007
by: perhapscwk | last post by:
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. function openModal() { retVal=showModalDialog('popup.htm'); valReturned=retVal; alert('The following text has been returned: "'+valReturned+'"'); }
0
8432
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
8343
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,...
0
8856
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8762
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
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
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
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...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.