473,657 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calling an external javascript function from an asp .net codebehind page load method

2 New Member
The javascript function is called getsportart2

in the codebehind page_load I have the following

Page.RegisterSt artupScript("My Script3","<scri pt type='text/javascript' src='http://www.halaeducati on.com/media/modules/sports/getsportart2.js '></script>");

I would like to activate this function as soon as the page load.

I do not have a problem with activating this function from the <body onload=""> but I have a problem doing so from the page load method in the codebehind

Any suggestions how to do so??

P.S. I can activate this function with alternatives ways using button control but I do not wish to do so.
Jul 13 '08 #1
1 3624
ahmh
2 New Member
The javascript function is called getsportart2
Hi Every one

The javascript function is named getsportart2

in the codebehind page_load I have the following

Page.RegisterSt artupScript("My Script3","<scri pt type='text/javascript' src='http://www.halaeducati on.com/media/modules/sports/getsportart2.js '></script>");

I would like to activate this function as soon as the page load.

I do not have a problem with activating this function from the <body onload=""> but I have a problem doing so from the page load method in the codebehind

Any suggestions how to do so??

P.S. I can activate this function with alternatives ways using button control but I do not wish to do so.
Jul 13 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1314
by: ar | last post by:
If I had a form with one textbox on it and I wanted to populate that textbox on page load, how could I do that from a global procedure? I tried creating a separate class file with the following code and then called it from my aspx page: Public Class Class1 Public Shared Function setbox(ByVal textboxx As Object) Dim mycontrol As Control = FindControl("txtName") CType(mycontrol, TextBox).Text = "TESTTTT"
10
1925
by: Pasquale | last post by:
hello wverybody... i've got a terrible matter with JS my browsers (either IE and NN) load the external scripts uncorrectly...they load the files from the half part of them and not from the beginning, so my scripts don't work giving syntax errors. can you give me a solution?
5
5197
by: joaopedrogoncalves | last post by:
Hi, I want to load an external javascript file, get its results and stick them inside a <div> block. I also want to do this in several places on a web page. This way the browser doesn't have to wait for the external resource to load to show up the page, thus giving a perceiving faster load time for the user.
0
1839
by: Prescott | last post by:
I want to execute a javascript function that will set a value in the parent window from the child widow where its called and then post the form to the server. I seem to be able to execute one or the other but not both. The child page (html) code is: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="AddKeyWord.aspx.vb" Inherits="ComponentSearch.AddKeyWord"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML>...
0
7495
by: Darko³ | last post by:
I'm trying to do a simple web form with asp.net & C# but althoug the page is correctly compilated, when i load the page there is the following error message: System.Web.HttpException: External component has thrown an exception ---> System.Web.HttpCompileException: Eccezione lanciata da un componente esterno. at System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors(CompilerResults results, CodeDomProvider codeProvider,...
2
2835
by: Alex | last post by:
Hi all, I'm writing a small web application which searches a database based on a date field, and populates a datagrid control with the results. The datagrid control has selection buttons added to it to view additional details about the selected result (a second database query is triggered). I want this second query to pop up in a new window, the way it would if I used "window.open" in javascript. I've added a function in the
1
5402
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for that), the popup window will have also a text box and a button. when the User click on the button the value on the textbox will be send back to the textbox on My_WUC. I hope I was clear off what I want to do. I've been searching for some ideas...
4
2813
by: Adam Smith | last post by:
Hello, How can I call or trigger an external javascript twice in a form? I have <script language="JavaScript" src="country_state.js" name="Country_State"> <script type="text/javascript" src="country_state.js"> </script>
2
5352
by: Debbie | last post by:
I have always used VBScript but now need to convert my syntax to JavaScript. In an external file, I have a function that is called when a user clicks a button on a login page. The function checks the format of data that has been entered by the user and makes sure that all required fields have been filled out. On the login page, between the <head></headtags I have the following syntax: <script language="javascript"...
0
8324
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,...
0
8740
jinu1996
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...
0
8617
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 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...
0
7352
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, 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...
0
5642
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();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
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...

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.