473,659 Members | 3,162 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Showmodaldialog return value undefined

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 across this problem or have any other
solution to work on this?
venkat
Nov 18 '05 #1
3 6710
Hello Venkat

U can append the following line of code at the end of the click event of the
second page. somemethod is a client script in the first page...

Response.Write( "<script
language='javas cript'>opener.s omemethod("pass urstringhere"; self.close();
</script>") ;

hope this will help u and do let me know if u need some more help...

with best regards..
Laiju

"Venkat Chellam" <ve************ @yahoo.com> wrote in message
news:ac******** *************** **@posting.goog le.com...
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 across this problem or have any other
solution to work on this?
venkat

Nov 18 '05 #2

I still didn't understand how is it going to help me. how would the
first page receive the return value?

venkat
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
what did you set window.returnVa lue to in the modal window?

only scalers are supported, as any objects will be destroyed when the modal
window is closed (and this be undefined). if you need to pass an object
back, you need to call a routine in the opener window to clone it, so the
object(s) will still exist.

-- bruce (sqlwork.com)
"Venkat Chellam" <ve************ @yahoo.com> wrote in message
news:ac******** *************** **@posting.goog le.com...
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 across this problem or have any other
solution to work on this?
venkat

Nov 18 '05 #4

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()
11
6903
by: Sweety | last post by:
hello to all members, i have strange question in C. main() { printf("%d",main) ; } here o/p is same for all m/c in TC++ version 3.0 i.e 657. I think this is not garbage.
13
2592
by: yohji | last post by:
Hi,everyone! I am a beginner of C.When I studied C,I found a problem which isn't described in many C teaching books.It is like this: I found some of int or char* functions can be used as void function.For example: we can use int function printf() like this : printf("hello,world!\n"); How it is like a void function! Also we can use char* function ltoa()like this: ltoa(ltemp,buffer,10); Why??
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
2057
by: bdobby | last post by:
Hi. I am relatively new to js, but I did think I was starting to get the hang of it. Then this happened... I have a form with an onsubmit event handler: <form id="uploadForm" method="post" action="..." onSubmit="checkDates()"> The event handler does some minor validation, then returns true or
20
3585
by: lovecreatesbeauty | last post by:
Hello experts, Is the following code snippet legal? If it is, how can exit() do the keyword return a favor and give a return value to the main function? Can a function call (or only this exit(n)) statement provide both function call and return features of the C programming language? /* headers omitted */ int main (void)
2
1320
by: info | last post by:
Hi... I want to know (inside a function) if the calling code wants a return value or not. Here is an example: function foo() {
0
954
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:
11
2939
by: polas | last post by:
Good afternoon all, I appreciate that the standard requires that main should return an integer. What I was wondering though is there any accepted standardisation on exactly what value to return - do people tend to return 0 or 1 or anything else? In addition, if there has been some failure, do people tend to return another value (such as -1?) Is there any standard for operating systems to handle the C return value in a particular way...
0
8337
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
8851
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
8628
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...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
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
4175
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
2754
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
1978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
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.