473,854 Members | 1,664 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Urgent : Running client script from a toolbar button

Hi all,

I have posted this previously but have had no satisfactory results.

I need to run some javascript from the client when a toolbar button (i.e.
IEWebControl toolbar button) is clicked. I create the buttons on-the-fly and
my code is as follows:
Dim override As New Microsoft.Web.U I.WebControls.T oolbarButton
override.Text = "<span onclick=""javas cript:alert('te st'); return
false;""></span>"
override.ID = "override"
override.ImageU rl = "override.j pg"
override.ToolTi p = "ovverride"
toolClaim.Items .Add(override)
What is interesting is that the script will run if I insert some text
between the span tags but I don't want to do this at all.

What do I need to do to get this working?

Regards
John.
Nov 18 '05 #1
2 1432
the span needs to be of some size to be able to click on it.

-- bruce (sqlwork.com)

"John" <a@b.com> wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l...
Hi all,

I have posted this previously but have had no satisfactory results.

I need to run some javascript from the client when a toolbar button (i.e.
IEWebControl toolbar button) is clicked. I create the buttons on-the-fly and my code is as follows:
Dim override As New Microsoft.Web.U I.WebControls.T oolbarButton
override.Text = "<span onclick=""javas cript:alert('te st'); return
false;""></span>"
override.ID = "override"
override.ImageU rl = "override.j pg"
override.ToolTi p = "ovverride"
toolClaim.Items .Add(override)
What is interesting is that the script will run if I insert some text
between the span tags but I don't want to do this at all.

What do I need to do to get this working?

Regards
John.

Nov 18 '05 #2
Thanks a lot. Got it!

"bruce barker" <no***********@ safeco.com> wrote in message
news:e9******** ******@TK2MSFTN GP09.phx.gbl...
the span needs to be of some size to be able to click on it.

-- bruce (sqlwork.com)

"John" <a@b.com> wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l...
Hi all,

I have posted this previously but have had no satisfactory results.

I need to run some javascript from the client when a toolbar button (i.e. IEWebControl toolbar button) is clicked. I create the buttons on-the-fly

and
my code is as follows:
Dim override As New Microsoft.Web.U I.WebControls.T oolbarButton
override.Text = "<span onclick=""javas cript:alert('te st'); return
false;""></span>"
override.ID = "override"
override.ImageU rl = "override.j pg"
override.ToolTi p = "ovverride"
toolClaim.Items .Add(override)
What is interesting is that the script will run if I insert some text
between the span tags but I don't want to do this at all.

What do I need to do to get this working?

Regards
John.


Nov 18 '05 #3

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

Similar topics

7
2505
by: Catherine Jones | last post by:
Hi all we are getting active x component can not create object (Error No. 16) while creating an instance of File System Object in ASP client side script. Could you plz help us in solving this problem. We were working on opening a selected text file at client site and inputing the content. I have pasted the same code bellow of which plz find in order. <SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript> <!--
2
1424
by: Solvig | last post by:
Server side and client side actions on one button in ASP.NET I am stuck. How do I find a start to a solution. After checking all fields in a form I want to save changes in the database, open a new window without toolbar with a fixed size and close the existing web window. Or change the web window to above. The new window is a Flash application where you can not use back and forward arrows. I use VB.NET in ASP.NET.
1
2524
by: Jenny | last post by:
Need urgent help for an unsolved problem. In our ASP web application, we creat a Back button and if user click on this button, it execute history.go(-1) to go back to the previous page. All our users use IE 6.0 and most of them don't have problem with this button. But one user reported everytime he click on this button, there is a pop-up window shows up and ask him refresh and reload the page, after he clicks OK, the previous page will be...
3
1182
by: Mark Goldin | last post by:
Is it possible to get a toolbar button that has been clicked on a client side? I'd like to add some JavaScript to it. Thanks
4
1319
by: Timo | last post by:
Over the weekend, I am installing a website on a laptop so our sales staff can give a demonstration on Monday at a potential client site. Things are not working as expected. I'm hoping what's wrong will be apparent from the symptoms below. I created a virtual directory beneath the Default Web Site using the wizard. I have set the execute permission on the Default Web Site (and directories beneath it) to Script. If I run iisstart.asp in...
1
4122
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET framework 1.1). The application implements a Progress Bar webcontrol, that pops up in a window, using the HttpHandler interface, on the event of a button click. The handler's process request routine reads the status of the progress by querying the...
13
3578
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains some javascript code that calls window.open. I pass the resource url of page B to Page A's window.open call. Page B is then loaded and executed but none of the server-side code is rendered. If I view the source of the page, the code (and page...
3
3689
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 html is: <a class="searchsavechanges btn btn3d tbbtn" href="javascript:" style="position:static"> <div id="TBsearchsavechanges">Search</div> </a>
3
2066
by: Mike | last post by:
Hi, I'm wondering if I can do this with ASP.NET?
0
9901
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
9751
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
10673
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
10365
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
7077
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
5738
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
5937
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4550
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
3
3183
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.