In page1:<INPUT id="MD" type="hidden" name="MD" value="Hello world">,
and there is a button, has a javascript onclick event, in this event, a
popup window will appear.
In the pop-up window, how can I get the hidden control's value (Hello
world) in code behind?
BTW, I can get it in clicent by:
var MDValue = window.opener.d ocument.getElem entById("MD").v alue; 4 1570
You have to pass that as a querystring parameter to the popup, then the
code-behind can access it.
"Jack" <ls*****@gmail. com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. . In page1:<INPUT id="MD" type="hidden" name="MD" value="Hello world">, and there is a button, has a javascript onclick event, in this event, a popup window will appear.
In the pop-up window, how can I get the hidden control's value (Hello world) in code behind? BTW, I can get it in clicent by: var MDValue = window.opener.d ocument.getElem entById("MD").v alue;
I know I can access via querystring, but what I need is:
The page can only be opened in my way, never display information if
user input the link in the addressbar, then click "enter".
For the popup to be the information, the accepted way is to use the
querystring. A popup is nothing more than a page, and there is little you
can do to prevent the user from loading it manually.
Now, if you want to be tricky, you could always do a postback for your
button and then use something like RegisterStartup Script to inject the
showModelDialog function. This way you can store the field value in a
session variable and use this to verify they came from the correct place.
You can also check the Referer header field to make sure they came from your
page.
"Jack" <ls*****@gmail. com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com... I know I can access via querystring, but what I need is: The page can only be opened in my way, never display information if user input the link in the addressbar, then click "enter".
The 2 sites are different, Session doesn't work in this case.
I'm using javascript to control it,
if( window.opener == null )
// window.location = "xxxx";
but it isn't safe anyway. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: toufik toufik |
last post by:
Hi, I'm using the folowing javascript code to oprn a popUp window
msgWindow=window.open('','messageWindow', 'scrollbars=yes,width=300,
height=150');
msgWindow.document.open();
msgWindow.document.write(strHTML);
msgWindow.document.close();
In this window I've a form containing a text TXTNAME and a button that call
another function javascript popUpProcess()
|
by: Tony Farrell |
last post by:
Hi Everyone -
I have a data entry form that allows the user to click a button
and have that button popup a list of available values -
the code on the popup window uses the name of the form
to determine what field to populate on the opener...
|
by: Davey |
last post by:
I have a website which has a popup window (this only opens when the user
chooses to open it). In the popup window I have a <select> control which
lists a selection of "classes". Each class has a description and a class_id
(stored in the value attribute of each option). The user will then select a
class from the drop-down list.
What I want to do is have a control in the parent browser window which can
store the class_id and the...
|
by: wrytat |
last post by:
I have a form with a textbox for the user to enter a quantity and another
textbox for the delivery date. I disabled this delivery date textbox such
that the user has to press a calendar link next to the textbox, then a
calendar will pop up for him to choose the date. The dates that the user can
pick depends a lot on the quantity that he enters in the quantity field.
Is there any way that I can parse the quantity field to the calendar page...
|
by: heybrakywacky |
last post by:
After hours of pulling my hair out on this one, I've finally realized
that the problem I'm having in my code is due to behavior that is not
at all expected.
Using ASP.NET 1.1.4322.2032, I'm trying to update a dynamically-created
hidden control on my form, across multiple postings. My experience
suggests that once the initial version of the hidden control has been
created and populated, there is no changing that value in subsequent...
| |
by: ABC |
last post by:
I has a parent and a popup lookup ASP.NET Form. Both has javascript.
I test the popup window's window.Form1.SelectedProductCode.value has a
value. But don't know why the return variable "retvar" has not any value
pass from popup?
-- Parent Windows Script
function DoSelectProductCode()
{ var selectedstr = "";
|
by: knowdotnet |
last post by:
Hi all,
Which is the best way to return a value back to the web page from a pop
up page?
I have a asp.net web application which opens a popup page on a link
button click. The Link button is contained in a datagrid column. When i
submit the popup page I want a value from the page to be returned to
the parent page and is to be updated in a dataset, thereby updating the
datagrid. I want the parent page to be refreshed on submitting the pop...
|
by: neena |
last post by:
Hi
I am uing C#.net & using javacript for a popup window.
I've a form and there is a button named Categories. When it is clicked, it will open a new window for the selection of categories.
When the categories are selected from ListBox ,and the submit button of the popup window is clicked, the category id value should be set in the parent form and the popup window will close.
the problem is that the parent window form doesn't get the...
|
by: VMI |
last post by:
How can I transfer some text from a Textbox in a popup window to the main
webform that opened that popup?
The popup webform will have some type of Button that the user will click in
order to accept those changes. This is where the transter of the value should
be. It could also be done when I close the popup form (whichever is easier).
Once the popup form is closed, the value will then be used to fill a textbox
in the main Form.
I use...
|
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: 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,...
|
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: 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: 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: 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...
| |