Click here to Skip to main content
16,004,887 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to update data grid control without full page refresh Pin
Ashuu14-May-06 23:08
Ashuu14-May-06 23:08 
QuestionProblem with DataListItem Pin
kbalias14-May-06 19:25
kbalias14-May-06 19:25 
AnswerRe: Problem with DataListItem Pin
_AK_14-May-06 19:39
_AK_14-May-06 19:39 
GeneralRe: Problem with DataListItem Pin
kbalias14-May-06 23:23
kbalias14-May-06 23:23 
AnswerRe: Problem with DataListItem Pin
TheEagle14-May-06 20:09
TheEagle14-May-06 20:09 
GeneralRe: Problem with DataListItem Pin
kbalias14-May-06 23:17
kbalias14-May-06 23:17 
AnswerRe: Problem with DataListItem Pin
TheEagle17-May-06 7:44
TheEagle17-May-06 7:44 
QuestionOnclick Dropped on Render Pin
wylbur14-May-06 19:00
wylbur14-May-06 19:00 
Hi,

I’ve got a problem with my onclick handlers for command buttons
being dropped on page render for a popup window.

On the opening window, I have several command buttons,
and they all have the standard click handler references
(as they should):
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
input type="submit" name="button03" value="submit text"
onclick="WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions( ...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

... and this isn’t present for command buttons on the popup page.



On the popup window, the standard click handler is not in the button tags
on the rendered page - and the only buttons that have onclick set
are the ones where I use the Attributes property to set the
button for my own JavaScript handlers:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
string fn_call="javascript:doPostBack_JS('Test','','zxc1');"


new_button.Attributes.Add ("onclick", fn_call);

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



... and THAT renders OK:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
input type="submit" name="Button04" value="JavaScript Submit"
onclick="javascript:doPostBack_JS('Test','','zxc1');"
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



I set up a simple test case on the popup window page:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[script language="C#" runat=server>

void SubmitBtn_Click(Object sender, EventArgs e)
{
Message.Text="Hello World!!";
}



. . . . . . . . . . . . . . . . . . . . . . . . . . . .

[h3>Button Example[/h3>

Click on the submit button.

[asp:Button id="Button1"
Text="Submit"
OnClick="SubmitBtn_Click"
runat="server"/>

[asp:label id="Message" runat="server"/>

[/form>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



... and this is what got sent to the client:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[h3>Button Example [/h3>

Click on the submit button.

[input type="submit" name="Button1" value="Submit" id="Button1" />

[span id="Message"> [/span>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

As should be obvious, onclick isn’t set on the rendered page.



The script source tags are present on BOTH the primary page,
AND the popup page:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[script src="/Webfolder01/WebResource.axd?d=

[script src="/Webfolder01/WebResource.axd?d=
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



This is the JavaScript function that opens the popup window:
// =======================================================
function popup01 ()
{
var win_url
= "http://localhost/Webfolder01/CtrlInit12b.aspx";
var win_name
= "_blank";
var win_chrome
= "toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1";
var win_dimn
= ",width=444,height=444,left = 290,top = 162";

DBname_popup = window.open (win_url, win_name, win_chrome + win_dimn);
if (window.focus) {DBname_popup.focus()}

stop_postback = true;
}
// =======================================================


The really freaky thing about this is that it was working last week,
after I tested it - and it WAS working OK.



Does anyone have any idea as to why this is happening?

THANK YOU FOR YOUR ATTENTION TO THIS!!!

.

wylbur
-=-=-=-=-=-=-=-
Questionfinding all checked checkboxes (that are in a repeater) and then submitting their respective DataBinder Properties back to the server Pin
eggie514-May-06 18:42
eggie514-May-06 18:42 
AnswerRe: finding all checked checkboxes (that are in a repeater) and then submitting their respective DataBinder Properties back to the server Pin
minhpc_bk14-May-06 19:58
minhpc_bk14-May-06 19:58 
GeneralRe: finding all checked checkboxes (that are in a repeater) and then submitting their respective DataBinder Properties back to the server Pin
eggie514-May-06 20:01
eggie514-May-06 20:01 
GeneralRe: finding all checked checkboxes (that are in a repeater) and then submitting their respective DataBinder Properties back to the server Pin
eggie514-May-06 20:07
eggie514-May-06 20:07 
GeneralRe: finding all checked checkboxes (that are in a repeater) and then submitting their respective DataBinder Properties back to the server Pin
minhpc_bk14-May-06 20:14
minhpc_bk14-May-06 20:14 
QuestionSaving files on client machine in ASP.NET with C# Pin
Suma B R14-May-06 17:45
Suma B R14-May-06 17:45 
AnswerRe: Saving files on client machine in ASP.NET with C# Pin
TheEagle14-May-06 20:52
TheEagle14-May-06 20:52 
GeneralRe: Saving files on client machine in ASP.NET with C# Pin
Suma B R15-May-06 17:19
Suma B R15-May-06 17:19 
GeneralRe: Saving files on client machine in ASP.NET with C# Pin
TheEagle17-May-06 7:58
TheEagle17-May-06 7:58 
QuestionInteraction between two webpages Pin
cheeken2u14-May-06 17:42
cheeken2u14-May-06 17:42 
Questionstrange c++ compiler error Pin
IlanTal14-May-06 0:31
IlanTal14-May-06 0:31 
AnswerRe: strange c++ compiler error Pin
IlanTal14-May-06 1:00
IlanTal14-May-06 1:00 
QuestionA Hot Problem Pin
WDI13-May-06 20:50
WDI13-May-06 20:50 
GeneralRe: A Hot Problem Pin
MoustafaS14-May-06 1:40
MoustafaS14-May-06 1:40 
QuestionHow to jump to the grid when button cliked? Pin
Sunrise Shine13-May-06 19:40
Sunrise Shine13-May-06 19:40 
AnswerRe: How to jump to the grid when button cliked? Pin
MoustafaS14-May-06 1:42
MoustafaS14-May-06 1:42 
GeneralRe: How to jump to the grid when button cliked? Pin
Sunrise Shine14-May-06 19:36
Sunrise Shine14-May-06 19:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.