I have a webform on this form is a User Control and another webform in
IFRAME
On the User Control there is a save button.
I want to click this button and somehow tell the webpage in IFRAME that the
button was clicked, how would I do that?
(in other words I want to save the webform data in IFRAME when the save
button is clicked)
Peter
--
Thanks
------------------- cz****@wsinc.co m 3 5981
If you want to "talk" to an iframe using client side script, you just need
to use something like this:
document.frames ("frameName").d ocument.forms(" formName").subm it().
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"Peter" <cz****@wsinc.c om> wrote in message
news:%2******** **********@TK2M SFTNGP11.phx.gb l... I have a webform on this form is a User Control and another webform in IFRAME On the User Control there is a save button.
I want to click this button and somehow tell the webpage in IFRAME that the button was clicked, how would I do that? (in other words I want to save the webform data in IFRAME when the save button is clicked)
Peter -- Thanks ------------------- cz****@wsinc.co m
Thanks for your help!
What about if there are more than one button, say 'Save' and 'Delete'
buttons how do I know which one was clicked?
"Chris Jackson" <chrisjATmvpsDO TorgNOSPAM> wrote in message
news:uB******** ******@TK2MSFTN GP09.phx.gbl... If you want to "talk" to an iframe using client side script, you just need to use something like this:
document.frames ("frameName").d ocument.forms(" formName").subm it().
-- Chris Jackson Software Engineer Microsoft MVP - Windows Client Windows XP Associate Expert -- More people read the newsgroups than read my email. Reply to the newsgroup for a faster response. (Control-G using Outlook Express) --
"Peter" <cz****@wsinc.c om> wrote in message news:%2******** **********@TK2M SFTNGP11.phx.gb l...I have a webform on this form is a User Control and another webform in IFRAME On the User Control there is a save button.
I want to click this button and somehow tell the webpage in IFRAME that the button was clicked, how would I do that? (in other words I want to save the webform data in IFRAME when the save button is clicked)
Peter -- Thanks ------------------- cz****@wsinc.co m
Thank you so much, this is just want I needed, I appreciate all of your
help!!!
"Steven Cheng[MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:Bp******** ******@cpmsftng xa07.phx.gbl... Hi Peter,
Thanks for posting in the community! From your description, you'd like to post back a sub page in a iframe when a certain button on its parent(containe r page) is clicked. Also, you'd
like to pass the certain button's id to the sub page so that in the sub page's postback process ,you can got the info on which button in container page
is clicked, yes? If there is anything I misunderstood, please feel free to let me know.
As for this problem, Chris has supply the correct direction that use the javascript to submit the page in the iframe. And as to how to pass the button's id info, my suggestion is putting a hidden field(<input type=hidden value=" .." ... > to store the info, and when a certain button in container page is clicked, first set the hidden field in subpage and then submit it. For detailed illustration, I've attached a couple of sample pages using this means.
In addition, I've some further suggestions on this issue: 1. When you used <Iframe> to contain a certain page, then if the container page is posted back, it'll refresh the sub page also. So as for your situation, if you want to notify the sub page for the parent page's event and then do some operations, you need to use different means according to the button's event type(server button event or client event) (1): If is the server button event, you'd like to notify the sub page
after the sub page is posted back , thus, the sub page can do the certain operations after it is refreshed caused by its parent page's postback.
(2): If you notify the sub page at the buttons' client click event, since the parent page isn't posted back, you needn't to code as (1), just call javascript to posted back the sub page.
I've including the both situations in my sample page, you may refer to it if you feel anything unclear.
2. I've noticed that you used UserControl to contain some certain buttons and which will need to control some other element ourside it(in its container page). I think sometimes, it's better to avoid using UserControl since UserControl will make its controls's clientID changed( not the same as those which are directly put onto a page), that'll cause some problems or difficulties when we implement javascript code on them to associate
with some other pages or elements. Do you think so?
Please check out the preceding suggestions and my sample pages. If you
have anything unclear, please feel free to post here. Regards,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ej1002 |
last post by:
Hi
I have developed a Windows Application(C# Windows Form) which will get the IFrame Source of the page it is navigating using Webbrowser Control. Now I want do this in ASP.Net web application(C# Web Form).
Is there any other method through which I will be able to access the IFrame Source of the page I am navigating to. Also I need to click on some of the links in the page I am navigating. Requirement is to read the data the IFrame source...
|
by: Hadar |
last post by:
Hi,
I ran into a closed thread with the title "Want to be able to pass
parameters to an IFRAME"
The need to pass
I tried to implement what they suggested but i got an error:
"The Controls collection cannot be modified because the control contains
code blocks (i.e. <% ... %>) "
|
by: darrel |
last post by:
I'm still trying to fully understand how best to pass variables between
pages/usercontrols/each other.
On a current site I've done, I've had one userControl do the logic and set
the variable, and then I had other usercontrols simply read this by
traversing the class structure: siteClass.userControlClass.specficVariable.
That worked fine.
The new site I'm working on is a bit different, as I'm using multiple
|
by: scsharma |
last post by:
Hi,
I am working on creating a webapplication and my design calls for creating
main webform which will have menu bar on left hand side and a IFrame which
will contain all the forms that are shown when menu items are clicked.Besides
these i would like to put a custom status bar. Any error message encountered
in any of the webpage will be displayed in the banner.
The problem iam encountering is how to access the customer status bar in
child...
|
by: jceddy |
last post by:
Well, there is something here I'm working on, and I have a problem that
has several possible solutions...none of which I can figure out how to
implement.
Basically, I am creating a rich text editing element, using design mode
in IE, that validates/cleans up the contents of anything that is pasted
into it.
The element that has design mode on is the body of a page nested within
an IFRAME in the main page.
| |
by: Venkatesh |
last post by:
Hello All,
I have an iframe in my main html and within iframe, I'm loading another
HTML webpage. In my main html page, I've captured the mouse click
event, by setting the "onclick" for <bodyof main page.
The code is like this:
<body onclick="handleClickEvent(event)">
....
|
by: bbsbob |
last post by:
Hello,
I'm still using the Framework v1.1. Forgive me, I'm working on a legacy
application.
I'm using 2 iFrame sections with 2 aspx pages, i.e. 1.aspx (left) and 2.aspx
(right)
In 1.appx page, I have a treeview control, I'd like to pass a selected node
string to 2.aspx page and then to display some contents with passed node
string.
How could I accomplish that? The task is to pass the string parameter and
|
by: ismailc |
last post by:
Hi, I need help please.
I need to create a textbox with a report url in an iframe below.
Onclick of button create IFrame and pass textbox value into parameter of iframe src.
I'm not to sure how to do this, i think some javascript is needed as I want the button to check the textbox is not blank value first and then create iframe and pass textbox value as parameter.
Does anyone have another method where there are 2 iframes:
Having the...
|
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...
|
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,...
|
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...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |