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

Home Posts Topics Members FAQ

How to remove a client script in a page?

Hi,
I have a page which will call RegisterStartup Script function to register
a client script. I also need to remove it under some certain condition, is
there a way?

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
Nov 18 '05 #1
2 8154
You have a Page class in which you call RegisterStartup Script to add a
script to the Page. IOW, you don't need to remove it. You just need to not
add it. Let's say that a PaperBoy delivers a paper to you every morning. At
some point, he starts adding some ad magazine with his delivery. You don't
want to remove the ad magazine from the paper delivery. You want to tell him
not to add it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Hardy Wang" <ha*******@hotm ail.com> wrote in message
news:#m******** ******@TK2MSFTN GP12.phx.gbl...
Hi,
I have a page which will call RegisterStartup Script function to register a client script. I also need to remove it under some certain condition, is
there a way?

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy

Nov 18 '05 #2
Thanks!

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:ue******** *****@TK2MSFTNG P09.phx.gbl...
You have a Page class in which you call RegisterStartup Script to add a
script to the Page. IOW, you don't need to remove it. You just need to not
add it. Let's say that a PaperBoy delivers a paper to you every morning.
At
some point, he starts adding some ad magazine with his delivery. You don't
want to remove the ad magazine from the paper delivery. You want to tell
him
not to add it.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Hardy Wang" <ha*******@hotm ail.com> wrote in message
news:#m******** ******@TK2MSFTN GP12.phx.gbl...
Hi,
I have a page which will call RegisterStartup Script function to

register
a client script. I also need to remove it under some certain condition,
is
there a way?

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy


Nov 18 '05 #3

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

Similar topics

9
4330
by: Kathryn | last post by:
Hiya I have a problem with using some client side and server side scripting together in an ASP. I'm using VBScript. What I'm trying to achieve is this - - Page loads up and some server side vbscript reads the database and populates a listbox on the page with the first field from each record in the recordset. This works fine. - User selects an option on the listbox and, using the OnChange, I
12
55548
by: Sam Collett | last post by:
How do I remove an item with a specified value from an array? i.e. array values 1,2,2,5,7,12,15,21 remove 2 from array would return 1,5,7,12,15,21 (12 and 21 are NOT removed, duplicates are also removed) So far I have (val is value, ar is array, returns new array):
5
1968
by: tmb | last post by:
Is there a way to use ASP to 'push' a new image to the client every 15 seconds or so? I guess the entire page will have to be 're-sent' to the client but I'm not sure. I'm trying to 'rotate' a new product image every few seconds. I could use an animated gif or some java script maybe, but I want to keep the file small and not have to count on the user having java script
26
15216
by: Don | last post by:
I'm writing an html page with some JavaScript that reads a web page into a client-side temp file, then reformats it, then submits that same file as a URL to the browser for display, via "locate.replace". I can do all this if the html page containing the script originates on the client machine, but don't know how to get access to a client-side temp file when the same html page containing the script is on a web host. How do I get access...
7
7764
by: moondaddy | last post by:
I want to dynamically create a JavaScript file and cache it on the client for re-use. I know how to write javascript to a web page from the code behind, but I don't know how to actually create a file such as MyNewScript.js and then cache that on the client so all the pages of that session can use it. Can this be done? Thanks -- moondaddy@nospam.com
9
4907
by: Harry Smith | last post by:
While reading the documentation on IsStartupScriptRegistered, there is a reference to "client startup script" as "Determines if the client startup script is registered with the Page object." What is meant by "Client Start Script"? Thanks, Harry
7
1604
by: Mike Rand | last post by:
I am having a really hard time trying to get some client side code hooked up in VS2005, ASP 2.0. The code is in an .inc file (vbscript). The first problem I am encountering is the ASP.NET page doesn't like vbscript and throws fits about the syntax. Second, the page throws fits about the server side code tags (<% ... %>),...are these supported anymore? Third, when I set the onclick event of a client side HTML button it does not recognize...
5
2217
by: Alex Maghen | last post by:
I frequently find myself wanting to insert some basic client-side JavaScript functions in the page of an ASPX of mine. But I find it so frustrating that I have to actually contruct my JavaScript in C# on the server-side and render it to the client because I can't use the IDs of my controls as they are written in the HTML page itself. Rather, I have to use Control.ClientID to get that ID that I can use in the client-side JS. So my...
47
65336
by: SOLAV | last post by:
This is the only working way to completely hide your JavaScript code from the client just like PHP or ASP code. Here we'll need the help of PHP. Here is the code: index.php ________________________________________________________ <?PHP @session_start(); //Start our session. if(@!session_is_registered('PrintTheJavaScript')){ //If the session is not registered (and it's not). @session_register('PrintTheJavaScript'); //Register the...
0
8402
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, 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...
0
8315
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
8734
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...
1
8508
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5633
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
4164
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
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1627
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.