hey all,
i have a server-side button on my webform and was wondering if i can call an
external javascript that's in the same application direcory?
If so, can someone please show me the syntax?
thanks,
rodchar 3 1654
Put a reference to the .js file in the page HTML. Example:
<script type="text/javascript" src="myscript.js"></script>
Then just use Page.RegisterStartupScript or whatever means you want to add a
script to the page that calls a function or uses data in the external
JavaScript.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Big things are made up of
lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.com... hey all,
i have a server-side button on my webform and was wondering if i can call an external javascript that's in the same application direcory? If so, can someone please show me the syntax?
thanks, rodchar
i'm sorry, i wasn't clear on my OP. for the button.click event on the code
behind can i run the javascript from there? if so, how?
"Kevin Spencer" wrote: Put a reference to the .js file in the page HTML. Example:
<script type="text/javascript" src="myscript.js"></script>
Then just use Page.RegisterStartupScript or whatever means you want to add a script to the page that calls a function or uses data in the external JavaScript.
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Big things are made up of lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:BB**********************************@microsof t.com... hey all,
i have a server-side button on my webform and was wondering if i can call an external javascript that's in the same application direcory? If so, can someone please show me the syntax?
thanks, rodchar
> i'm sorry, i wasn't clear on my OP. for the button.click event on the code behind can i run the javascript from there? if so, how?
JavaScript is client-side. The only place you're going to be running it is
on the client. So, my answer is the best you're going to get: You can add a
script to the client-side HTML on the server, and run it when the page gets
back to the client.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Big things are made up of
lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com... i'm sorry, i wasn't clear on my OP. for the button.click event on the code behind can i run the javascript from there? if so, how?
"Kevin Spencer" wrote:
Put a reference to the .js file in the page HTML. Example:
<script type="text/javascript" src="myscript.js"></script>
Then just use Page.RegisterStartupScript or whatever means you want to add a script to the page that calls a function or uses data in the external JavaScript.
-- HTH,
Kevin Spencer Microsoft MVP ..Net Developer Big things are made up of lots of little things.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message news:BB**********************************@microsof t.com... > hey all, > > i have a server-side button on my webform and was wondering if i can > call > an > external javascript that's in the same application direcory? > If so, can someone please show me the syntax? > > thanks, > rodchar This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: chirs |
last post by:
I am trying to understand a piece of code. In a javascrpit file,
there is a function:
function ItemStyle(){
var names=;
addProps(this,arguments,names,true);
};
In the html file, it calls...
|
by: Roberto Gallo |
last post by:
Hi everyone;
* How can I actively call a Javascript function from inside a Applet?
* What would be a good messaging system among some Applets inside the
same page?
Thank you very much....
|
by: cheezebeetle |
last post by:
ok, so I am having problems passing in an ASPX function into the Javascript in the codebehind page. I am simply using a confirm call which when they press "OK" they call this ASPX function, when...
|
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:
...
|
by: Randell D. |
last post by:
Folks,
I'm sure this can be done legally, and not thru tricks of the trade - I
hope someone can help.
I'm writing a 'tool' (a function) which can be used generically in any
of my projects. ...
|
by: dennise9 |
last post by:
My exeternal JS works fine when the call is placed in the page head or
body.
But if I call the same javascript from a (clicked) text link on the
page, the script throws a JS error when it...
|
by: KaNos |
last post by:
Hi,
"robot script pages" are html+javascript pages, can be played in aspx
player. So in this tech, robot call aspx player's function (an interface is
sheared) and wait a result synchronously with...
|
by: Angus |
last post by:
I have a web page with a toolbar containing a Save button. The Save
button can change contextually to be a Search button in some cases.
Hence the button name searchsavechanges.
The snippet of...
|
by: jojoba |
last post by:
Hello to all!
I have a fairly simple webservice running in asp.net ajax under c# (vs
2008).
I built the service and it runs just dandy when i test it by itself in
visual studio.
However, to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
|
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...
| |