all groups > dotnet jscript > january 2004 >
You're in the

dotnet jscript

group:

How does one Pass a value as a parameter to a function in code behind in Javascript



How does one Pass a value as a parameter to a function in code behind in Javascript Mehr H
1/29/2004 9:35:49 AM
dotnet jscript: Hi I've written the function below in the code front of my ascx control

<SCRIPT type="text/javascript">
<!--
function ColumnHeaderClicked(gridName, columnId, button)
{

var oColumn = igtbl_getColumnById(columnId);
for (i=0;i<igtbl_getGridById(gridName).Bands[0].Columns.length;i++)
{

igtbl_getElementById(igtbl_getGridById(gridName).Bands[0].Columns[i].Id).sty
le.backgroundColor = "#808080";

igtbl_getElementById(igtbl_getGridById(gridName).Bands[0].Columns[i].Id).sty
le.color = "#C0C0C0";
}
igtbl_getElementById(columnId).style.backgroundColor = "#ADD8E6";
igtbl_getElementById(columnId).style.color = "#000000";

<%RaiseColumnHeaderClickedEvent(oColumn.Index);%>
}
// -->
</SCRIPT>
The problem is when i try to call the server side function
<%RaiseColumnHeaderClickedEvent(oColumn.Index);%>
I get an error that says:
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'oColumn' could
not be found (are you missing a using directive or an assembly reference?)

Source Error:


Line 17:
Line 18: m_IndexValue = oColumn.Index;
Line 19: <%RaiseColumnHeaderClickedEvent(oColumn.Index);%>
Line 20: }
Line 21:


How do i pass this value to the function
RaiseColumnHeaderClickedEvent(oColumn.Index) which is defined in my code
behind?
I need some way of sending the index of this column to this function.
Thanks.

Re: How does one Pass a value as a parameter to a function in code behind in Javascript name
2/3/2004 2:17:29 AM
..... non-standard version, aka compiled pseudo component that resides on the
server
where .net was installed as a feature for latest windows.


Got the drift ?

===========

Classical:

Client : document.elements.password = "***"
Server : Request.Variables.password


===========

Goodluck !!!!!




[quoted text, click to view]
Re: How does one Pass a value as a parameter to a function in code behind in Javascript Mehr H
2/5/2004 1:21:02 PM
you are retarded.
[quoted text, click to view]

Re: How does one Pass a value as a parameter to a function in code behind in Javascript Mehr H
2/5/2004 1:22:09 PM
You are Retarded.... Got the Drift?
[quoted text, click to view]

AddThis Social Bookmark Button