Open a window using Window.ShowModalDialog

  • Thread starter Thread starter dibakar
  • Start date Start date
D

dibakar

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
 
dibakar said:
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
 
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
 
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
 
Back
Top