473,326 Members | 2,126 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,326 software developers and data experts.

Passing Data with showModalDialog

Hello,

I have a problem with passing Data between a "classic ASP-Page (VBScript)"
and a ASP.NET 2.0 Page using showModalDialog / window.returnValue
-------------------------------------------------------------
Here is the Code-Snippet from the "caller" page:

var rValue="oldValue";
rValue = showModalDialog(test.aspx?,'Name','dialogHeight:40 0px;
dialogWidth:800px;');
alert(rValue);
-----------------------------------------------------------
Here is the Code-Snippet from test.aspx

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TxtPLZ.Attributes.Add("onClick","javascript:window .returnValue='1',window.close();");
}
}

Clicking on the TxtLabel closes the window, but alert(rValue); shows alway
"undefined"

What am I doing wrong?

cheers, andreas
Jul 11 '06 #1
4 2115
Try

TxtPLZ.Attributes.Add("onclick","window.returnValu e='1';window.close();");

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"Andreas Pfiz" <pf**@solid-it.dewrote in message
news:eQ**************@TK2MSFTNGP04.phx.gbl...
Hello,

I have a problem with passing Data between a "classic ASP-Page (VBScript)"
and a ASP.NET 2.0 Page using showModalDialog / window.returnValue
-------------------------------------------------------------
Here is the Code-Snippet from the "caller" page:

var rValue="oldValue";
rValue = showModalDialog(test.aspx?,'Name','dialogHeight:40 0px;
dialogWidth:800px;');
alert(rValue);
-----------------------------------------------------------
Here is the Code-Snippet from test.aspx

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

TxtPLZ.Attributes.Add("onClick","javascript:window .returnValue='1',window.close();");
}
}

Clicking on the TxtLabel closes the window, but alert(rValue); shows alway
"undefined"

What am I doing wrong?

cheers, andreas

Jul 11 '06 #2
Thanks a lot for your answer!

Unfortunately it is the ReturnValue is still "undefined"

"Eliyahu Goldin" <re*************@monarchmed.comschrieb im Newsbeitrag
news:eE*************@TK2MSFTNGP05.phx.gbl...
Try

TxtPLZ.Attributes.Add("onclick","window.returnValu e='1';window.close();");

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"Andreas Pfiz" <pf**@solid-it.dewrote in message
news:eQ**************@TK2MSFTNGP04.phx.gbl...
>Hello,

I have a problem with passing Data between a "classic ASP-Page
(VBScript)" and a ASP.NET 2.0 Page using showModalDialog /
window.returnValue
-------------------------------------------------------------
Here is the Code-Snippet from the "caller" page:

var rValue="oldValue";
rValue = showModalDialog(test.aspx?,'Name','dialogHeight:40 0px;
dialogWidth:800px;');
alert(rValue);
-----------------------------------------------------------
Here is the Code-Snippet from test.aspx

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

TxtPLZ.Attributes.Add("onClick","javascript:windo w.returnValue='1',window.close();");
}
}

Clicking on the TxtLabel closes the window, but alert(rValue); shows
alway "undefined"

What am I doing wrong?

cheers, andreas


Jul 11 '06 #3
What you show here should work. Check other places in the code that can
affect returnValue.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"Andreas Pfiz" <pf**@solid-it.dewrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Thanks a lot for your answer!

Unfortunately it is the ReturnValue is still "undefined"

"Eliyahu Goldin" <re*************@monarchmed.comschrieb im Newsbeitrag
news:eE*************@TK2MSFTNGP05.phx.gbl...
>Try

TxtPLZ.Attributes.Add("onclick","window.returnVal ue='1';window.close();");

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"Andreas Pfiz" <pf**@solid-it.dewrote in message
news:eQ**************@TK2MSFTNGP04.phx.gbl...
>>Hello,

I have a problem with passing Data between a "classic ASP-Page
(VBScript)" and a ASP.NET 2.0 Page using showModalDialog /
window.returnValue
-------------------------------------------------------------
Here is the Code-Snippet from the "caller" page:

var rValue="oldValue";
rValue = showModalDialog(test.aspx?,'Name','dialogHeight:40 0px;
dialogWidth:800px;');
alert(rValue);
-----------------------------------------------------------
Here is the Code-Snippet from test.aspx

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

TxtPLZ.Attributes.Add("onClick","javascript:wind ow.returnValue='1',window.close();");
}
}

Clicking on the TxtLabel closes the window, but alert(rValue); shows
alway "undefined"

What am I doing wrong?

cheers, andreas



Jul 11 '06 #4
actually there is not much more in my test-environment...maybe a bug?

"Eliyahu Goldin" <re*************@monarchmed.comschrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP03.phx.gbl...
What you show here should work. Check other places in the code that can
affect returnValue.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"Andreas Pfiz" <pf**@solid-it.dewrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Thanks a lot for your answer!

Unfortunately it is the ReturnValue is still "undefined"

"Eliyahu Goldin" <re*************@monarchmed.comschrieb im Newsbeitrag
news:eE*************@TK2MSFTNGP05.phx.gbl...
>>Try

TxtPLZ.Attributes.Add("onclick","window.returnVa lue='1';window.close();");

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"Andreas Pfiz" <pf**@solid-it.dewrote in message
news:eQ**************@TK2MSFTNGP04.phx.gbl...
Hello,

I have a problem with passing Data between a "classic ASP-Page
(VBScript)" and a ASP.NET 2.0 Page using showModalDialog /
window.returnValue
-------------------------------------------------------------
Here is the Code-Snippet from the "caller" page:

var rValue="oldValue";
rValue = showModalDialog(test.aspx?,'Name','dialogHeight:40 0px;
dialogWidth:800px;');
alert(rValue);
-----------------------------------------------------------
Here is the Code-Snippet from test.aspx

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

TxtPLZ.Attributes.Add("onClick","javascript:win dow.returnValue='1',window.close();");
}
}

Clicking on the TxtLabel closes the window, but alert(rValue); shows
alway "undefined"

What am I doing wrong?

cheers, andreas



Jul 11 '06 #5

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

Similar topics

2
by: Jim M | last post by:
I hate to pass data on the query string. Is there a way to pass data to the serverside vb code using the object in showmodaldialog. var myObject = new Object(); var retVal = new Object();...
1
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...
1
by: Tim_k | last post by:
Hi, I'm using showModalDialog to open a Window and return a user selected variable. Here is the code: retval=window.showModalDialog(sFrameName,window,sFeatures);...
4
by: MW de Jager | last post by:
I want to call ShowModalDialog(...) from my C# code in the code behind page of my aspx page. I do not want to link this to a button, since I want to first do some checking myself before I call the...
1
by: Carlos Alejandro Pérez | last post by:
hi I need to perform this sequence: - a webform A calls another webform B. Webform B should be a modal one - when data is entered in webform B, the user chooses close window - the data must be...
7
by: mark | last post by:
I have a main form, and i have another form i need to call on a button press, then id like the result of the child form to pass data back to the parent - without losing any data previously entered...
2
by: ting ting | last post by:
I am using the ASP.net 2.0 and When I load a page, it will auto pop up the Reminder page by following showModalDialog Javascript. It worked fine for the first time, after I amended some data and...
6
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.