Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Button post back.........

Reply
Thread Tools

Button post back.........

 
 
John
Guest
Posts: n/a
 
      03-05-2004
I have attached the java script code to Button web control as follows.

myButton.Attributes.Add("OnClick", "OpenWindow()")

I have written java script to open the window in the OpenWindow function.

When I click on the myButon, new window will open and at the sametime
button is posting back the form(?) and the main window comes up and the
opened window goes behind. So that my purpose of displaying the data(window)
is lost. how to make sure that the opened window will remain on top in the
clicked event of button.
Thanks
john


 
Reply With Quote
 
 
 
 
Gönen EREN
Guest
Posts: n/a
 
      03-05-2004
Hi John,

Here is your answer...

In the popup window put the fallowing in the body tag :

onblur="window.focus()"


You'll see the result is better then you think. =)

Gönen.


"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have attached the java script code to Button web control as follows.
>
> myButton.Attributes.Add("OnClick", "OpenWindow()")
>
> I have written java script to open the window in the OpenWindow function.
>
> When I click on the myButon, new window will open and at the sametime
> button is posting back the form(?) and the main window comes up and the
> opened window goes behind. So that my purpose of displaying the

data(window)
> is lost. how to make sure that the opened window will remain on top in the
> clicked event of button.
> Thanks
> john
>
>



 
Reply With Quote
 
 
 
 
seniorwebguy seniorwebguy is offline
Junior Member
Join Date: Jul 2006
Location: Hodgenville, KY
Posts: 3
 
      07-19-2006
Interesting answer Gönen but it didn't work for me.

Here is what I did:

Code:
protected override void Render(HtmlTextWriter writer)		
{
base.Render(writer); // The code had to be placed here so that the new window would // remain on top. if (this.IsPostBack && this.IsValid) Response.Write("<script>OpenWindow();</script>");
}
Also the OpenWindow function needs to set the focus to the new window (i.e. newWin.focus();)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Doing a serverside post and ending up at post server John Dalberg ASP .Net 8 09-23-2004 09:17 PM
Modelsim post place and route/Post Translate issues Sridhar Hegde VHDL 2 09-13-2004 02:43 PM
wlftg17 modelsim temp file beeing too big (corret post, ignore the old post) Oleg VHDL 0 04-05-2004 03:31 AM
Post post post. Shel-hed Computer Support 2 11-08-2003 07:41 AM
asp.net C# payflowlink post and capturing silent post khawar ASP .Net 2 10-28-2003 08:41 PM



Advertisments