By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,257 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,257 IT Pros & Developers. It's quick & easy.

Open a window using Window.ShowModalDialog

P: n/a
Hello

I want to open a window using Window.showModalDialog once i click
inside of a TextBox.And that window need to come just under the
TextBox,so that it seems to a same control.

So,what will be its code in javascript?

Thanks in Advance.

Dibakar

Nov 12 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
dibakar wrote:
Hello

I want to open a window using Window.showModalDialog once i click
inside of a TextBox.And that window need to come just under the
TextBox,so that it seems to a same control.

So,what will be its code in javascript?

Sounds really offtopic for me
Nov 12 '06 #2

P: n/a
dibakar,
This is really a Javascript - HTML DOM question and doesn't appear to have
any relation to C#, which is what this newsgroup covers.
ShowModalDialog is Internet Explorer specific, and has the same set of
"switches" that window.open has - for showing status, toolbar, widow size and
position.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"dibakar" wrote:
Hello

I want to open a window using Window.showModalDialog once i click
inside of a TextBox.And that window need to come just under the
TextBox,so that it seems to a same control.

So,what will be its code in javascript?

Thanks in Advance.

Dibakar

Nov 12 '06 #3

P: n/a
dibakar,

Be aware that I translated this here in the message from VBNet to C# so
watch errors.

string str;
if (!IsPostBack)
{
TextBox1.ForeColor = Color.White;
TextBox1.BorderStyle = BorderStyle.None;
string alertScript =
@"<script
language=JavaScript>document.all.item('TextBox1'). value +
@" = prompt('Give me text','My name is nobody'); </script>";
RegisterStartupScript("Startup", alertScript);
}
else
{str = TextBox1.Text;}
}

I hope this helps,

Cor

Nov 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.