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

Home Posts Topics Members FAQ

launching window in frame with a button control

Hi,

I am using the following code to try to open a window in a target
frame using a button control that is in the original frame. It does
not work unless I click the button twice. If anyone can help I'd
appreciate it. This is on a standard webform.

............... ............... .........
Private Sub btTools_Click(B yVal sender As System.Object, ByVal e_ As
System.EventArg s) Handles btTools.Click

btTools.Attribu tes.Add("onClic k", "window.open('r eps.aspx', 'main' )")

End Sub
............... ............... ..........

Thanks,
Dave
Nov 17 '05 #1
1 1684
Dave wrote:
Hi,

I am using the following code to try to open a window in a target
frame using a button control that is in the original frame. It does
not work unless I click the button twice. If anyone can help I'd
appreciate it. This is on a standard webform.

............... ............... ........
Private Sub btTools_Click(B yVal sender As System.Object, ByVal e_ As
System.EventArg s) Handles btTools.Click

btTools.Attribu tes.Add("onClic k", "window.open('r eps.aspx', 'main' )")

End Sub
............... ............... .........

Thanks,
Dave

You should place the code in the "Page_Load" but not btTools_Click.

Your code just will set the client side "onClick" AFTER your click the
button. Hence, before first click on the button, teh client side
"onClick" has nothing.

--
Jacky Kwok
ja***@alumni.cu hk.edu.hk
ja***@compose.c om.hk

Nov 17 '05 #2

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

Similar topics

6
6935
by: Clara | last post by:
Hi,... I meant to write an application where there is a button in a window and when you click on the button, it will open a new window, but I want the first window to close, replaced by the second window. I open a login window and start the mainloop, when the user click on the login button, the __call__ function of VerifyProcessor is executed and it will call the new window which is the file manager window The thing is,.. I don't know how...
10
14709
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to in VB. I've created an ASP interface where a user can select an email group that populates a listbox with those email addresses. If a user sees an email in that list that they do not want then they can remove it by clinking the Delete button...
1
1887
by: Hrvoje Vrbanc | last post by:
Hello all, here is what I'd like to do: I have an ASPX page with certain buttons that opens in its window, naturally. When any of those buttons is clicked, I'd like the action to happen in another targeted window (with parameters passed on) and that my original window remains unchanged. That window may or may not already be open, the point is that a click on any button on my original page causes action in the other but always the same...
1
382
by: Dave | last post by:
Hi, I am using the following code to try to open a window in a target frame using a button control that is in the original frame. It does not work unless I click the button twice. If anyone can help I'd appreciate it. This is on a standard webform. ....................................... Private Sub btTools_Click(ByVal sender As System.Object, ByVal e_ As System.EventArgs) Handles btTools.Click
1
3135
by: axiarich | last post by:
We have some doc mgt "lite" on our site. I basically have a window with a button that opens the relevant document (Excel, PDF, etc.). The button calls some javascript which basically performs a window open: window.open('document.asp?item=' + intDoc,'_self', ''); I use '_self' so that the document.asp itself does not open a new browser. the document.asp file basically retrieves the path and displays the document via the ADODB Stream...
1
6073
by: Grant | last post by:
Hi, I am looking for a tip. I have a panel and a checkbox. When I check the checkbox, I would like to add buttons to the panel (dynamically). When the checkbox is unchecked, the buttons should not appear (be deleted)---all the while, the window should resize if necessary. If you have a simpler example, that is fine. I just need a hint as to how you dynamically change the widgets and their layouts. Looking at the wx demos, there is...
10
1211
by: Simon Verona | last post by:
I've decided to store my help pages on a web site rather than deliver with my application (trying to reduce the size of the install files). The web site is sort of all ready to rock and roll. How from VB.net do I launch an internet explorer window, but making the window menuless, button and address bar less etc) and open the url for the help pages? I can see from the command line how to run internet explorer in "kiosk"
7
5814
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed to be two techniques for earlier versions. But the window.opener='' ;window.close(); and the window.open('','_parent','') ;window.close(); techniques do not work for me. I.e., I still get confirmation message
1
1771
by: Garg | last post by:
Hi, I am facing a problem while trying to close a window that I've opened in a frame. I am using javascript to close my current popup window. I have written the following line of code on click of OK button event. Response.Write("<scriptwindow.close();</script>") Now the problem is since this window is closed, the frame is still
0
8305
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
8726
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
8503
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
8603
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
7320
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...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
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
4151
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...
1
2726
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

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.