467,175 Members | 1,303 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,175 developers. It's quick & easy.

Open a window using Window.ShowModalDialog

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
  • viewed: 4160
Share:
3 Replies
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
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
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.

Similar topics

2 posts views Thread by Chris | last post: by
2 posts views Thread by RJN | last post: by
1 post views Thread by Steven | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.