Basic Web Form... A few text boxes and a checkbox - and a card reader...
The effect I want to accomplish is this:
The basic credit card fields are there and can be filled out. But if the
user swipes the card, I want to fill out the fields automatically and make
them read only. (So far I can do this.)
But I also want a checkbox to appear that indicates the card was swiped.
The user can clear the checkbox, re-enabling the fields so they can be
edited, but then I will no longer consider the data as being swiped. I want
the check box to disappear if they clear it.
Using server controls, if I create a checkbox, but make it not visible, then
it's not available at the client side to work with from client side code.
So I would need to send some flag back to the server to indicate a post back
and have the page re-rendered properly. But how do send info to the server
like that without having a visible control to attach the data to?
(Does this make any sense? Not sure if I'm explaining it well.)
Is there a way to send a value back to the server, in a postback, where the
data is not a property of a server control that's tracking viewstate? The
session object is only available on the server side right?
Any guidance here is appreciated. Thanks.
Jerry 6 1480
to send additional value to server , one commonly used method is
a HiddenControl (you will access it like Request.Forms["HiddenContrlNa me"]
from code behind)
or a TextBox Webcontrol with size 0 or attribute style='display: none' ..
But if the only purpose of post back is to display/check the checkbox ,
probabaly a better approach is to do the display/check in the client side
javascript ..
Instead of settign Visibility=Fals e, you would just add an attribute to
make it hidden , but still available at client code
CheckBoxName.At tributes.Add("s tyle='display:n one'")
"Jerry Camel" wrote: Basic Web Form... A few text boxes and a checkbox - and a card reader... The effect I want to accomplish is this:
The basic credit card fields are there and can be filled out. But if the user swipes the card, I want to fill out the fields automatically and make them read only. (So far I can do this.)
But I also want a checkbox to appear that indicates the card was swiped. The user can clear the checkbox, re-enabling the fields so they can be edited, but then I will no longer consider the data as being swiped. I want the check box to disappear if they clear it.
Using server controls, if I create a checkbox, but make it not visible, then it's not available at the client side to work with from client side code. So I would need to send some flag back to the server to indicate a post back and have the page re-rendered properly. But how do send info to the server like that without having a visible control to attach the data to?
(Does this make any sense? Not sure if I'm explaining it well.)
Is there a way to send a value back to the server, in a postback, where the data is not a property of a server control that's tracking viewstate? The session object is only available on the server side right?
Any guidance here is appreciated. Thanks.
Jerry
Okay... I can have the checkbox on the form and available with 'Display:
None'...
But I can't seem to find the proper syntax to change the display state and
make it visible on the client side...
Thanks.
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message
news:43******** *************** ***********@mic rosoft.com... to send additional value to server , one commonly used method is
a HiddenControl (you will access it like Request.Forms["HiddenContrlNa me"] from code behind)
or a TextBox Webcontrol with size 0 or attribute style='display: none' ..
But if the only purpose of post back is to display/check the checkbox , probabaly a better approach is to do the display/check in the client side javascript ..
Instead of settign Visibility=Fals e, you would just add an attribute to make it hidden , but still available at client code
CheckBoxName.At tributes.Add("s tyle='display:n one'") "Jerry Camel" wrote:
Basic Web Form... A few text boxes and a checkbox - and a card
reader... The effect I want to accomplish is this:
The basic credit card fields are there and can be filled out. But if
the user swipes the card, I want to fill out the fields automatically and
make them read only. (So far I can do this.)
But I also want a checkbox to appear that indicates the card was swiped. The user can clear the checkbox, re-enabling the fields so they can be edited, but then I will no longer consider the data as being swiped. I
want the check box to disappear if they clear it.
Using server controls, if I create a checkbox, but make it not visible,
then it's not available at the client side to work with from client side
code. So I would need to send some flag back to the server to indicate a post
back and have the page re-rendered properly. But how do send info to the
server like that without having a visible control to attach the data to?
(Does this make any sense? Not sure if I'm explaining it well.)
Is there a way to send a value back to the server, in a postback, where
the data is not a property of a server control that's tracking viewstate?
The session object is only available on the server side right?
Any guidance here is appreciated. Thanks.
Jerry
Syntax to display ?
document.getEle mentById("Check BoxClientName") .style.display= '' ;
document.getEle mentById("Check BoxClientName") .Checked = true;
this may help... http://www.w3schools.com/htmldom/dom_obj_checkbox.asp http://www.w3schools.com/htmldom/dom...yle.asp#layout
"Jerry Camel" wrote: Okay... I can have the checkbox on the form and available with 'Display: None'...
But I can't seem to find the proper syntax to change the display state and make it visible on the client side...
Thanks.
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message news:43******** *************** ***********@mic rosoft.com... to send additional value to server , one commonly used method is
a HiddenControl (you will access it like Request.Forms["HiddenContrlNa me"] from code behind)
or a TextBox Webcontrol with size 0 or attribute style='display: none' ..
But if the only purpose of post back is to display/check the checkbox , probabaly a better approach is to do the display/check in the client side javascript ..
Instead of settign Visibility=Fals e, you would just add an attribute to make it hidden , but still available at client code
CheckBoxName.At tributes.Add("s tyle='display:n one'") "Jerry Camel" wrote:
Basic Web Form... A few text boxes and a checkbox - and a card reader... The effect I want to accomplish is this:
The basic credit card fields are there and can be filled out. But if the user swipes the card, I want to fill out the fields automatically and make them read only. (So far I can do this.)
But I also want a checkbox to appear that indicates the card was swiped. The user can clear the checkbox, re-enabling the fields so they can be edited, but then I will no longer consider the data as being swiped. I want the check box to disappear if they clear it.
Using server controls, if I create a checkbox, but make it not visible, then it's not available at the client side to work with from client side code. So I would need to send some flag back to the server to indicate a post back and have the page re-rendered properly. But how do send info to the server like that without having a visible control to attach the data to?
(Does this make any sense? Not sure if I'm explaining it well.)
Is there a way to send a value back to the server, in a postback, where the data is not a property of a server control that's tracking viewstate? The session object is only available on the server side right?
Any guidance here is appreciated. Thanks.
Jerry
Thanks, but this doesn't seem to have any effect. I tried changing the
style.display property to all kinds of values, but the checkbox never
appears...
Jerry
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message
news:51******** *************** ***********@mic rosoft.com... Syntax to display ?
document.getEle mentById("Check BoxClientName") .style.display= '' ; document.getEle mentById("Check BoxClientName") .Checked = true;
this may help... http://www.w3schools.com/htmldom/dom_obj_checkbox.asp http://www.w3schools.com/htmldom/dom...yle.asp#layout "Jerry Camel" wrote:
Okay... I can have the checkbox on the form and available with
'Display: None'...
But I can't seem to find the proper syntax to change the display state
and make it visible on the client side...
Thanks.
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message news:43******** *************** ***********@mic rosoft.com... to send additional value to server , one commonly used method is
a HiddenControl (you will access it like
Request.Forms["HiddenContrlNa me"] from code behind)
or a TextBox Webcontrol with size 0 or attribute style='display: none'
... But if the only purpose of post back is to display/check the checkbox
, probabaly a better approach is to do the display/check in the client
side javascript ..
Instead of settign Visibility=Fals e, you would just add an attribute
to make it hidden , but still available at client code
CheckBoxName.At tributes.Add("s tyle='display:n one'") "Jerry Camel" wrote:
> Basic Web Form... A few text boxes and a checkbox - and a card reader... > The effect I want to accomplish is this: > > The basic credit card fields are there and can be filled out. But
if the > user swipes the card, I want to fill out the fields automatically
and make > them read only. (So far I can do this.) > > But I also want a checkbox to appear that indicates the card was
swiped. > The user can clear the checkbox, re-enabling the fields so they can
be > edited, but then I will no longer consider the data as being swiped.
I want > the check box to disappear if they clear it. > > Using server controls, if I create a checkbox, but make it not
visible, then > it's not available at the client side to work with from client side code. > So I would need to send some flag back to the server to indicate a
post back > and have the page re-rendered properly. But how do send info to the server > like that without having a visible control to attach the data to? > > (Does this make any sense? Not sure if I'm explaining it well.) > > Is there a way to send a value back to the server, in a postback,
where the > data is not a property of a server control that's tracking
viewstate? The > session object is only available on the server side right? > > Any guidance here is appreciated. Thanks. > > Jerry > > >
Obviously there is some thing not right other than the syntax.. :) .. Is
there any javascript error when you call the function to display the
checkbox?...
if still no luck, you may want to create a simple HTML page with only
following code in it...
<INPUT TYPE=checkbox ID=chk1 style='display: hidden'>
<INPUT TYPE=button ID=btn1 onClick="toggle ()" value="Click to Toggle
Display" >
<script>
function toggle(id)
{
el = document.getEle mentById("chk1" );
var display = el.style.displa y ? '' : 'none';
el.style.displa y = display;
}
</script>
Once this works, you can compare with the HTML your aspx generated and that
may help in finding the issue..
This link got a working sample... with code...pls see if this helps.. http://www.sam-i-am.com/work/sandbox...e_display.html
"Jerry Camel" wrote: Thanks, but this doesn't seem to have any effect. I tried changing the style.display property to all kinds of values, but the checkbox never appears...
Jerry
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message news:51******** *************** ***********@mic rosoft.com... Syntax to display ?
document.getEle mentById("Check BoxClientName") .style.display= '' ; document.getEle mentById("Check BoxClientName") .Checked = true;
this may help... http://www.w3schools.com/htmldom/dom_obj_checkbox.asp http://www.w3schools.com/htmldom/dom...yle.asp#layout "Jerry Camel" wrote:
Okay... I can have the checkbox on the form and available with 'Display: None'...
But I can't seem to find the proper syntax to change the display state and make it visible on the client side...
Thanks.
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message news:43******** *************** ***********@mic rosoft.com... > to send additional value to server , one commonly used method is > > a HiddenControl (you will access it like Request.Forms["HiddenContrlNa me"] > from code behind) > > or a TextBox Webcontrol with size 0 or attribute style='display: none' ... > > But if the only purpose of post back is to display/check the checkbox , > probabaly a better approach is to do the display/check in the client side > javascript .. > > Instead of settign Visibility=Fals e, you would just add an attribute to > make it hidden , but still available at client code > > CheckBoxName.At tributes.Add("s tyle='display:n one'") > > > > "Jerry Camel" wrote: > > > Basic Web Form... A few text boxes and a checkbox - and a card reader... > > The effect I want to accomplish is this: > > > > The basic credit card fields are there and can be filled out. But if the > > user swipes the card, I want to fill out the fields automatically and make > > them read only. (So far I can do this.) > > > > But I also want a checkbox to appear that indicates the card was swiped. > > The user can clear the checkbox, re-enabling the fields so they can be > > edited, but then I will no longer consider the data as being swiped. I want > > the check box to disappear if they clear it. > > > > Using server controls, if I create a checkbox, but make it not visible, then > > it's not available at the client side to work with from client side code. > > So I would need to send some flag back to the server to indicate a post back > > and have the page re-rendered properly. But how do send info to the server > > like that without having a visible control to attach the data to? > > > > (Does this make any sense? Not sure if I'm explaining it well.) > > > > Is there a way to send a value back to the server, in a postback, where the > > data is not a property of a server control that's tracking viewstate? The > > session object is only available on the server side right? > > > > Any guidance here is appreciated. Thanks. > > > > Jerry > > > > > >
I'll play with it. Thanks for your help. I was trying to use vbscript, but
I may have to switch to javascript...
Jerry
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message
news:54******** *************** ***********@mic rosoft.com... Obviously there is some thing not right other than the syntax.. :) .. Is there any javascript error when you call the function to display the checkbox?...
if still no luck, you may want to create a simple HTML page with only following code in it...
<INPUT TYPE=checkbox ID=chk1 style='display: hidden'> <INPUT TYPE=button ID=btn1 onClick="toggle ()" value="Click to Toggle Display" >
<script> function toggle(id) { el = document.getEle mentById("chk1" ); var display = el.style.displa y ? '' : 'none'; el.style.displa y = display; } </script>
Once this works, you can compare with the HTML your aspx generated and
that may help in finding the issue..
This link got a working sample... with code...pls see if this helps.. http://www.sam-i-am.com/work/sandbox...e_display.html "Jerry Camel" wrote:
Thanks, but this doesn't seem to have any effect. I tried changing the style.display property to all kinds of values, but the checkbox never appears...
Jerry
"Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in message news:51******** *************** ***********@mic rosoft.com... Syntax to display ?
document.getEle mentById("Check BoxClientName") .style.display= '' ; document.getEle mentById("Check BoxClientName") .Checked =
true; this may help... http://www.w3schools.com/htmldom/dom_obj_checkbox.asp http://www.w3schools.com/htmldom/dom...yle.asp#layout "Jerry Camel" wrote:
> Okay... I can have the checkbox on the form and available with 'Display: > None'... > > But I can't seem to find the proper syntax to change the display
state and > make it visible on the client side... > > Thanks. > > > "Sreejith Ram" <Sr*********@di scussions.micro soft.com> wrote in
message > news:43******** *************** ***********@mic rosoft.com... > > to send additional value to server , one commonly used method is > > > > a HiddenControl (you will access it like Request.Forms["HiddenContrlNa me"] > > from code behind) > > > > or a TextBox Webcontrol with size 0 or attribute
style='display: none' ... > > > > But if the only purpose of post back is to display/check the
checkbox , > > probabaly a better approach is to do the display/check in the
client side > > javascript .. > > > > Instead of settign Visibility=Fals e, you would just add an
attribute to > > make it hidden , but still available at client code > > > > CheckBoxName.At tributes.Add("s tyle='display:n one'") > > > > > > > > "Jerry Camel" wrote: > > > > > Basic Web Form... A few text boxes and a checkbox - and a card > reader... > > > The effect I want to accomplish is this: > > > > > > The basic credit card fields are there and can be filled out.
But if > the > > > user swipes the card, I want to fill out the fields
automatically and > make > > > them read only. (So far I can do this.) > > > > > > But I also want a checkbox to appear that indicates the card was swiped. > > > The user can clear the checkbox, re-enabling the fields so they
can be > > > edited, but then I will no longer consider the data as being
swiped. I > want > > > the check box to disappear if they clear it. > > > > > > Using server controls, if I create a checkbox, but make it not visible, > then > > > it's not available at the client side to work with from client
side > code. > > > So I would need to send some flag back to the server to indicate
a post > back > > > and have the page re-rendered properly. But how do send info to
the > server > > > like that without having a visible control to attach the data
to? > > > > > > (Does this make any sense? Not sure if I'm explaining it well.) > > > > > > Is there a way to send a value back to the server, in a
postback, where > the > > > data is not a property of a server control that's tracking viewstate? > The > > > session object is only available on the server side right? > > > > > > Any guidance here is appreciated. Thanks. > > > > > > Jerry > > > > > > > > > > > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Paul |
last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and
session.use_trans_sid = 1 in my php.ini file. Index.php contains:
----------------------------------------------------------------------------
<?php
ini_set("session.use_cookies", "off");
ini_set("session.use_trans_sid", "on");
session_start();
$_SESSION = "";
$_SESSION = "";
echo "<form method='POST' action='login.php'>
|
by: Fredrik/Sweden |
last post by:
Hi folks !
got this problem...
i have a table 'Accounts' in my database, which contains a bunch of
users. From the main menu i choose "edit user" and all users in the db
are presented in a table. The first column 'Pnr' is a unique ID for
each user that i made appear as a link. clicking on one userID should
present a form where the picked users userdata is already filled in so
i can easily edit it and then move on to submit the form to...
|
by: Miranda johnsen |
last post by:
Hello,
I need some help with passing a value from my login authorization page.
The authorization is done with the code below (it works), but I need the
'uName' value passed on when the window.location is activated.
I code my ASP with JavaScript NOT vbscript so please no &'s. And yes I
know I should be using a DSN-less connection! ((sorry, everytime I post
I get blasted about my syntax and connection choice :+))
|
by: Dthmtlgod |
last post by:
I am having a little difficulty in passing a value from a page to another
page. I am going to provide excerpts from the code. I think I am close.
This is from Page1.ASP
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtest=dsntest & "DBQ=" & Server.MapPath("ncci.mdb")
Conn.Open DSNtest
|
by: jr |
last post by:
Sorry for this very dumb question, but I've clearly got a long way to go!
Can someone please help me pass an array into a function. Here's a starting
point.
void TheMainFunc()
{
// Body of code...
TCHAR myArray;
DoStuff(myArray);
| |
by: Harolds |
last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005
the pmID is evaluated to "" instead of what the value is set to:
....
xmlItems.Document = pmXML
// Add the pmID parameter to the XSLT stylesheet
XsltArgumentList xsltArgList = new XsltArgumentList();
xsltArgList.AddParam("pmID", "", pmID);
xmlItems.TransformArgumentList = xsltArgList;
|
by: Gordon Hudson |
last post by:
Hello
Here is what I am trying to do:
Make a hyperlink on a data entry form with its URL built from the values for
fields in that entry on the database.
So, I would go to record 65785 click on the link and it would open a web
page.
The URL contained in the hyperlink would pass the name and address field
|
by: Ken Allen |
last post by:
I have a .net client/server application using remoting, and I cannot get the
custom exception class to pass from the server to the client. The custom
exception is derived from ApplicationException and is defined in an assembly
common to the client and server components. The custom class merely defines
three (3) constructors -- the null constructor; one with a string parameter;
and one with a string and innner exception parameter -- that...
|
by: Paul |
last post by:
Just wondering if someone could provide an example of passing a variable from
the code behind to javascript in vb. I want to have one control have focus
with the page loading with one condition and have another control with focus
after the page loads from a different condition. A gets set in the code
aspx.vb file and the script might look something like,
<script language="javascript">
function DoHighlight(a)
{
if a = 1 {...
|
by: Andrew Bullock |
last post by:
Hi,
I have two classes, A and B,
B takes an A as an argument in its constructor:
A a1 = new A();
B b = new B(a1);
|
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: 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?
| |
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...
| |