473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Calling functions?

Hello, I wrote a jscript function within the HTML window of my webpage and
would like to call it from inside the ASPX code-behind page. Any
suggestions?

or

I would like to cause an alert box to pop up using the code-behind window of
an ASPX page.

Any of these two things will work for me.
Thanks
Chuck
Nov 17 '05 #1
3 3725
Hey Chuck,

What you are trying to do doesn't really make any sense :) Code behind
executes on the server, jscript runs on the client. The two don't have
anything to do with each other. Your only hope might be to have code behind
make the browser call your jscript function to open up the alert box by
putting a call to the jscript function in some client-side event like
<body onload=myFunction();>

Otherwise, server-side code cannot effectively call client-side script but
it can cause it to be called. (if that makes sense).

Good luck,
Graham.

"Charles A. Lackman" <Ch*****@cet.com> wrote in message
news:u1**************@TK2MSFTNGP12.phx.gbl...
Hello, I wrote a jscript function within the HTML window of my webpage and
would like to call it from inside the ASPX code-behind page. Any
suggestions?

or

I would like to cause an alert box to pop up using the code-behind window of an ASPX page.

Any of these two things will work for me.
Thanks
Chuck

Nov 17 '05 #2
Hello Chuck

What about ...
Response.Write("<script language='javascript'>window.alert('Thankyou for
your message! We will email you shortly.');</script>")

Hope this helps.

Graeme

"Charles A. Lackman" <Ch*****@cet.com> wrote in message
news:u1**************@TK2MSFTNGP12.phx.gbl...
Hello, I wrote a jscript function within the HTML window of my webpage and
would like to call it from inside the ASPX code-behind page. Any
suggestions?

or

I would like to cause an alert box to pop up using the code-behind window of an ASPX page.

Any of these two things will work for me.
Thanks
Chuck

Nov 17 '05 #3
Chuck,

Look into Page.RegisterStartupScript...

This will do all that you need...

jayuya
-----Original Message-----
Hello, I wrote a jscript function within the HTML window of my webpage andwould like to call it from inside the ASPX code-behind page. Anysuggestions?

or

I would like to cause an alert box to pop up using the code-behind window ofan ASPX page.

Any of these two things will work for me.
Thanks
Chuck
.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: pieter.breed | last post by:
Hi All, Is it possible to export a c# method into a dll in such a way that your "normal" C application can then call this method? To be clear: I am not asking how to use "DllImport" or...
19
by: Ross A. Finlayson | last post by:
Hi, I hope you can help me understand the varargs facility. Say I am programming in ISO C including stdarg.h and I declare a function as so: void log_printf(const char* logfilename, const...
5
by: Dave | last post by:
does calling a regular function cost any cpu time? In other words, is it faster to write the code of two functions into main(), or is it the exact same thing as calling two functions. I know its...
1
by: Mark Jerde | last post by:
Yesterday I posted the message below to microsoft.public.dotnet.languages.vb and microsoft.public.vc.language. The two replies are also posted. I need to write some ISO C++ functions, more...
1
by: Jesse McGrew | last post by:
Hi all, I'm trying to make a plugin DLL for a third-party application, using VC++ .NET 2003. This DLL acts as a bridge between the C++ plugin API of the application, and my actual plugin code...
1
by: H.B. | last post by:
Hi, I need to make a function that can display data on my Managed C++ app and be called by an unmanaged C++ DLL. Something like : void Form1::Form1_Load(System::Object * sender,...
2
by: Daniel Lidström | last post by:
I'm using a library called fyba. This library reads and writes files in a format called sosi. fyba uses the following code to determine if the calling process has own methods to handle errors,...
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
4
by: Edwin Gomez | last post by:
I'm a C# developer and I'm new to Python. I would like to know if the concept of Asynchronous call-backs exists in Python. Basically what I mean is that I dispatch a thread and when the thread...
10
by: sulekhasweety | last post by:
Hi, the following is the definition for calling convention ,which I have seen in a text book, can anyone give a more detailed explanation in terms of ANSI - C "the requirements that a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.