Hi,
Can anyone tell me how can I call a function of my Web Page from
javascritp????
I have a grid that when I click in a cell I want to call another function
present in that same page?
It is possible to do that?
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca 4 1871
"ruca" <ru***@iol.pt > wrote in message
news:eT******** ******@tk2msftn gp13.phx.gbl... Hi,
Can anyone tell me how can I call a function of my Web Page from javascritp????
I have a grid that when I click in a cell I want to call another function present in that same page? It is possible to do that?
-- Programming ASP.NET with VB.NET Thank's (if you try to help me) Hope this help you (if I try to help you) ruca
In the grids ItemDataBound event handler, you can get a reference to the
specific cell (e.Item.Cells collection). Then use the cell's Attributes
collection to add a javascript string...quick non-tested example:
Private Sub grdMyGrid_ItemD ataBound( _
ByVal sender As Object, _
ByVal e As DataGridEventAr gs _
) Handles grdMyGrid.ItemD ataBound
' Check the type of item is...i think using ItemType property...
' can't remember.
e.Item.Cells(0) .Attributes.Add ( _
"onclick", _
"javascript :MyC lientSideFuncti on();" _
)
End Sub
HTH,
Mythran
Ruca,
You can add any function in the normal way as you do in javascript in HTML,
as long as that you can reach by instance the click event.
If it is a normal button than you can do it in the VB.net code as well.
See this sample. http://www.windowsformsdatagridhelp....0-82d66e99fa11
I hope this helps,
Cor
Mythran,
I know that..... But the problem is that I don´t want to call a client side
function. I want to call another functio present in vb file of my aspx page.
Hope you understand. But thanks anyway
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
"Mythran" <ki********@hot mail.comREMOVET RAIL> escreveu na mensagem
news:%2******** ********@tk2msf tngp13.phx.gbl. .. "ruca" <ru***@iol.pt > wrote in message news:eT******** ******@tk2msftn gp13.phx.gbl... Hi,
Can anyone tell me how can I call a function of my Web Page from javascritp????
I have a grid that when I click in a cell I want to call another function present in that same page? It is possible to do that?
-- Programming ASP.NET with VB.NET Thank's (if you try to help me) Hope this help you (if I try to help you) ruca
In the grids ItemDataBound event handler, you can get a reference to the specific cell (e.Item.Cells collection). Then use the cell's Attributes collection to add a javascript string...quick non-tested example:
Private Sub grdMyGrid_ItemD ataBound( _ ByVal sender As Object, _ ByVal e As DataGridEventAr gs _ ) Handles grdMyGrid.ItemD ataBound ' Check the type of item is...i think using ItemType property... ' can't remember. e.Item.Cells(0) .Attributes.Add ( _ "onclick", _ "javascript:MyC lientSideFuncti on();" _ ) End Sub
HTH, Mythran
"ruca" <ru***@iol.pt > wrote in message
news:Ou******** ******@TK2MSFTN GP11.phx.gbl... Mythran,
I know that..... But the problem is that I don´t want to call a client side function. I want to call another functio present in vb file of my aspx page.
Hope you understand. But thanks anyway
So, on the client's machine, you want to call a function that resides on the
server? This can only be done with a post back (for simplicity, otherwise
there are ways to do it and examples on the Internet).
Mythran This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mangi03 |
last post by:
Hi,
I came acrosss g++ compile errors whenever I make a function call by
reference and found out from the test program that compiler is
treating the function argument differently when another function call
funcRet()is made which returns the expected argument type for the
function call by reference funcByRef(class A&);
The only way to get around this probelm is to first call the
funcRet(), assign its value to a variable and pass that...
|
by: JoeK |
last post by:
Hey all,
I am automating a web page from Visual Foxpro. I can control all the
textboxes, radio buttons, and command buttons using syntax such as:
oIE.Document.Forms("searchform").Item(<name>).Value = <myvalue>
But I cannot control a dropdown with an onchange event. I can set the
dropdown's value and selectedIndex, but then calling the onChange() or
Click() does not do anything. It only seems to fire the onchange if I
|
by: Dave |
last post by:
I have a program that I've written a class for. I need to call the function
in the program from the class. When I try to call the function I receive the
error, the name xxx does not exist in the class or namespace. Where xxx is
the function being called. How do I call the function?
|
by: Bern McCarty |
last post by:
I have run an experiment to try to learn some things about floating point
performance in managed C++. I am using Visual Studio
2003. I was hoping to get a feel for whether or not it would make sense to
punch out from managed code to native code (I was using
IJW) in order to do some amount of floating point work and, if so, what that
certain amount of floating point work was
approximately.
To attempt to do this I made a program that...
|
by: Kurt Van Campenhout |
last post by:
Hi,
I am trying to get/set Terminal server information in the active directory
on a windows 2000 domain. Since the ADSI calls for TS don't work until W2K3,
I need to do it myself.
I'm fairly new to VB.NET, so I need some help.
Here is a code snippit :
| |
by: yangsuli |
last post by:
i want to creat a link
when somebody click the link
the php script calls a function,then display itself :)
i have tried
<a href=<? funtion(); echo=$_server ?>text</a>
but it will call the function whether i click the link
then i tried this (using forms)
|
by: Steven T. Hatton |
last post by:
I just read §2.11.3 of D&E, and I have to say, I'm quite puzzled by what it
says.
http://java.sun.com/docs/books/tutorial/essential/concurrency/syncrgb.html
<shrug>
--
NOUN:1. Money or property bequeathed to another by will. 2. Something handed
down from an ancestor or a predecessor or from the past: a legacy of
religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF,
from ML legatia, from L legare, to depute, bequeath....
|
by: Mike S |
last post by:
I've seen examples of using the CallWindowProc Windows API function to
call functions through their addresses in VB6 -- a clever workaround to
emulate C-like function pointer semantics. A well-known example is the
use of CallWindowProc to call a function gotten via
LoadLibrary/GetProcAddress. For example, I've seen code similar to the
following which can register/unregister a COM DLL where the path to the
DLL is known only at runtime -- in...
|
by: CryptiqueGuy |
last post by:
Consider the variadic function with the following prototype:
int foo(int num,...);
Here 'num' specifies the number of arguments, and assume that all the
arguments that should be passed to this function are of type int.
(My question has nothing to do with the definition of the function
foo, so don't bother about it.)
If I call the function as:
foo(2,3,4,5,6,7,8);/*More arguments than expected*/
|
by: RandomElle |
last post by:
Hi there
I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with or without parms. I know that any function that is passed to Eval() must be declared Public. It can be a Sub or Function, as long as it's Public. I even have it where the "function" evaluated by Eval can be in a form (class) module or in a standard...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |