Click here to Skip to main content
15,899,025 members
Home / Discussions / C#
   

C#

 
GeneralRe: nested foreach obj1 in obj2 Issue [SOLVED] Pin
Harvey Saayman28-Mar-08 3:55
Harvey Saayman28-Mar-08 3:55 
GeneralTAPI UNIMODEM CALL DISCONNECT NOTIFICATION PROBLEM Pin
mamirbalouch27-Mar-08 22:49
mamirbalouch27-Mar-08 22:49 
QuestionJavascript in C# Pin
jonhbt27-Mar-08 22:10
jonhbt27-Mar-08 22:10 
GeneralRe: Javascript in C# Pin
pmarfleet27-Mar-08 22:52
pmarfleet27-Mar-08 22:52 
QuestionRe: Javascript in C# Pin
jonhbt28-Mar-08 0:50
jonhbt28-Mar-08 0:50 
GeneralRe: Javascript in C# Pin
Guffa28-Mar-08 1:25
Guffa28-Mar-08 1:25 
GeneralRe: Javascript in C# Pin
alhgamy3-Apr-08 6:36
alhgamy3-Apr-08 6:36 
AnswerRe: Javascript in C# Pin
Rritesh Ravlani1-May-08 21:13
Rritesh Ravlani1-May-08 21:13 
Hello jonhbt,

You have not indicated why you want an onload for a DIV, but here is an explanation of how to do it:

http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget-addEventListener


and you can try like this

set two variables for script from ur page and access them in function.

as you can not directly access onload of div but if you write script tag in div and name of your function it will call up on load of it.

aspx page like
--------------


function getValues()
{
alert(a);
alert(b);
}



getValues();

<asp:label text="this is div" runat="server">



and in on Page_Load .cs file
-----------------------------

protected void Page_Load(object sender, EventArgs e)
{
int a= 3;
int b=4;
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
"onLoad", "var a =" + a + ";
b=" + b + ";", false);

}


Smile | :)
GeneralRemove Flicker before drawing Splash Screen Pin
Sukhjinder_K27-Mar-08 21:47
Sukhjinder_K27-Mar-08 21:47 
GeneralRe: Remove Flicker before drawing Splash Screen Pin
Bekjong28-Mar-08 0:32
Bekjong28-Mar-08 0:32 
GeneralThe Solution I got Pin
Sukhjinder_K29-Mar-08 23:19
Sukhjinder_K29-Mar-08 23:19 
GeneralLine Eraser [modified] Pin
Denver Thomas27-Mar-08 21:15
Denver Thomas27-Mar-08 21:15 
GeneralRe: Line Eraser Pin
Xmen Real 27-Mar-08 23:06
professional Xmen Real 27-Mar-08 23:06 
General[Message Deleted] Pin
Denver Thomas27-Mar-08 23:07
Denver Thomas27-Mar-08 23:07 
GeneralRe: Line Eraser Pin
pmarfleet27-Mar-08 23:11
pmarfleet27-Mar-08 23:11 
General[Message Deleted] Pin
Denver Thomas28-Mar-08 0:37
Denver Thomas28-Mar-08 0:37 
GeneralRe: Line Eraser Pin
pmarfleet28-Mar-08 1:53
pmarfleet28-Mar-08 1:53 
GeneralRe: Line Eraser Pin
J4amieC28-Mar-08 2:05
J4amieC28-Mar-08 2:05 
GeneralRe: Line Eraser Pin
pmarfleet27-Mar-08 23:10
pmarfleet27-Mar-08 23:10 
GeneralRe: Line Eraser Pin
Denver Thomas27-Mar-08 23:17
Denver Thomas27-Mar-08 23:17 
Generalto Paul Marfleet Pin
Denver Thomas28-Mar-08 0:53
Denver Thomas28-Mar-08 0:53 
GeneralRe: to Paul Marfleet Pin
J4amieC28-Mar-08 1:17
J4amieC28-Mar-08 1:17 
GeneralRe: to Paul Marfleet PinPopular
pmarfleet28-Mar-08 1:59
pmarfleet28-Mar-08 1:59 
QuestionCalling HTTP Web Form and posting information [modified] Pin
ptr2void27-Mar-08 20:59
ptr2void27-Mar-08 20:59 
AnswerRe: Calling HTTP Web Form and posting information Pin
Rajesh Thomas28-Mar-08 2:21
Rajesh Thomas28-Mar-08 2:21 

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.