free printable credit card logos best credit card apr 2012 horizon gold credit card offer credit card applications online for students virtual credit card terminal ireland sampath bank credit card promotions 2011 payday loans online direct lenders instant approval platinum card american express travel paypal buyer credit card login best no fee credit cards with rewards sear credit card pay my bill hdfc platinum plus credit card reward points redemption catalogue sears instant approval credit card yatra sbi credit card status payday loan lenders uk only hdfc credit card application format what type of credit card should i get to build credit joint credit card applications online credit card interest explained free reloadable prepaid credit cards personal loans with bad credit rating magnum cash advance reviews square credit card app kindle fire how to get away with online credit card fraud list of all credit cards in uk credit cards canada low interest credit cards for no credit with no annual fee tesco credit card balance transfer deals discover student credit cards review credit card calculator excel spreadsheet credit card processing machine with no credit check credit cards cash back offers check into cash online loans cash advances payday loans toronto where to send old navy credit card payments cash loans how to get a walmart credit card canada best business credit cards discover indusind bank credit cards payment no credit check payday loans no brokers old navy visa card address united mileage plus credit card premier qualifying miles visa card services phone number chase visa credit card phone number credit card payment protection insurance how do i get a credit card without a bank account best corporate credit card canada hdfc credit card payment by cheque in favour of blank credit card authorization form free hdfc credit card apply online in coimbatore compare mobile credit card apps how to know axis bank credit card reward points best 0 interest credit cards credit card interest fees calculator best credit card balance transfer rates nz how to get a credit card to build credit with no credit current credit card interest rates 2013 0 financing credit card offers new credit card rules for stay at home parents first premier credit card customer service number bank of america credit card cash advance online average credit credit cards instant approval sbi credit card reward points value halifax platinum credit card minimum payment how to apply for a credit card with little to no credit small business credit card bad credit get pre approved for a credit card online best credit card promotions october 2013 where to get prepaid visa cards credit cards for poor credit history uk where to get prepaid credit cards canada credit card debt consolidation ontario canada create paypal account virtual credit card calculate monthly interest on credit card balance reward cards student credit cards travel best gas reward credit cards list of credit card merchant codes discovery purple credit card benefits unsecured bad credit cards guaranteed approval canada applying for a credit card with bad credit in canada sears credit card customer service telephone number close my first premier credit card account apply for a credit card online uk business credit cards best rewards programs canadian credit card fraud statistics can i increase my absa credit card limit online aib visa debit cards sbi credit card apply online chandigarh apply credit card online india instant approval travel credit cards australia post prepaid credit card no fees 0 percent balance transfer no fee credit check free uk how to get a walmart prepaid credit card unsecured credit card applications online different types of hdfc credit cards us credit card debt outstanding lloyds tsb platinum credit card review us bank credit card processing free ipad credit card reader uk can i pay for a money order with a credit card at the post office credit card number font download ann taylor loft credit card payment best mobile credit card processing barclays us credit card list of credit card companies uk citigroup american airlines credit card login i need a loan to consolidate my credit cards no annual fee credit card malaysia chase business credit cards customer service capital one credit card good or bad discover credit card student loans how to activate standard chartered credit card malaysia visa cards wiki pay advance tax online india purchase manual credit card machine mbna business credit cards uk buy prepaid international credit cards capital one credit card address best rewards credit cards 2012 canada cash converters payday advance pretoria apply visa credit card canada platinum credit cards in pakistan payday loan lenders online ge toys r us credit card login 0 apr balance transfer business credit cards instant payday loans for bad credit best visa credit cards 2012 home depot credit card services canada no interest credit cards bad credit offer credit cards to my customers hdfc credit card emi offers ebay contact best buy credit card customer service how to get business credit cards with bad credit does amazon credit card report to credit bureaus how to redeem hdfc credit card points for gold card best credit cards for air travel rewards barclays student credit card limit free rewards cards australia louis vuitton credit card holder free hello kitty credit card do all credit cards have ppi chase credit card student loans kisan credit card agricultural loan from sbi secure credit card number storage icici credit card application status credit card charges abroad hsbc uk direct payday loan lenders only orchard bank credit card payment hold sample credit card settlement offer letters swiss miles and more credit card circuit city credit card website hdfc bank credit card online payment gateway applying for credit card with bad credit history most secure credit card discover card cash advance rate allied cash advance phone number american express air miles credit card application target visa credit card discontinued credit card authorization form template for travel agency apply for a prepaid mastercard online secured credit cards for really bad credit best buy credit card 6 months no interest united airlines credit card offer 50 000 miles lowering credit card debt advice standard chartered credit card india offers pay credit card online tesco chase credit card rewards program minimum credit score for credit card canada 2 cash back credit cards hotel reward credit card reviews prepaid us credit card hulu orchard bank apply for a credit card best credit card offer in india us bank credit card payment processing quickbooks online credit card processing canada sbi credit card helpline mumbai best rewards credit card 2012 no annual fee santander credit card 0 transfer simmons first credit card payment address payday online loan lenders orange prepaid credit card top up argos vanquis credit card contact number tesco credit card minimum payment calculator td canada trust business travel visa cancel sears canada credit card my virgin credit card account american express air miles reserve credit card bad credit loan lenders guaranteed approval can i use bestbuy gift cards to pay off credit card apply for walmart discover credit card bank of america credit card to help build credit who accepts visa debit cards in canada credit cards for bad credit scores no deposit credit card visa hack ucam cl tr 560 discover secured credit card offers cabelas black visa card pay icici credit card bill payment online visa debit card credit history care credit for pets us bank credit cards for fair credit sygma bank uk creation credit card mastercard credit card bank mega online jp morgan chase credit card fraud should i cancel low limit credit cards paypal accept credit cards directly credit report free calculate credit card interest calculator best credit card to have in canada 5000 personal bad credit loan best low interest credit cards balance transfers reward credit card comparison uk santander credit card no balance transfer fee teachers platinum credit card hdfc secured credit cards with rewards program buy prepaid visa with credit card is magnum cash advance legal in ohio capital one credit card app how to catch online credit card fraud bank of america prepaid credit card application best buy rewards zone credit card platinum credit cards in india temporary credit card number visa credit card number validator free download zero balance transfer credit card canada online payday loans bad credit history ipad mini credit card reader case magnum cash advance ach disruption westpac low rate credit card rewards axs credit card payment processing time icici credit card international usage credit card offer opt out phone number best credit card balance transfer offers 2013 standard chartered credit cards comparison how long does it take to get my first premier credit card github jquery credit card validator credit card interest free on purchases for 12 months best credit union credit cards 2011 credit union loans amazon credit card reviews 2011 what is credit card balance transfer fees i need a fake credit card number and security code pay barclay credit card over the phone starwood preferred guest credit card business online stores that accept international credit cards wells fargo student credit card cash advance easy no credit loans hack visa credit card 2011 updated chase credit cards apply online credit cards apply online bad credit credit card payment plan credit score intuit credit card processing complaints hdfc credit card apply online in hyderabad bank of america secured credit card instant approval bad credit credit cards usa american express prepaid credit card uk citibank credit card application status us credit card business card holder bank of america student credit cards review average canadian credit card interest rates amazon credit card 0 apr new credit card charges bank america bank of america credit cards account login bad credit credit cards guaranteed approval promo credit card bank mega best credit cards bad credit no deposit best buy credit card score requirement cibc petro canada credit card banks with visa debit cards in india top payday lenders direct loans lloyds platinum balance transfer card best student credit cards 2012 no credit credit card processing services for small business how do u apply for a walmart credit card usaa credit card pin setup scotia bank secured credit cards canada sbi online loan calculator cheapest online loans uk credit card machine rental south africa apply for best buy credit card in the store bank of america credit card payment plan easy quick online loans best gas credit cards 2011 standard chartered bank credit card online payment does it lower your credit score to close a credit card chase credit card interest refund orchard bank application for credit card royal bank of canada credit card rewards unsecured credit card bad credit no annual fee city bank credit card apply eligibility best credit card reader for ipad 3 apple iphone credit card processing entropay virtual credit card generator orchard bank credit card application by phone cheap credit cards australia icici credit card interest calculator credit cards online instant decision online standard chartered credit card payment india credit card logos for website uk 0 apr credit card offers for 2 years best pay day loans direct lenders credit cards with airline miles for fair credit how to know sbi credit card status citibank platinum credit card singapore how can i get credit card with no credit bank of america small business secured credit card chase mobile credit card processing reviews online credit card payment system singapore uob credit card rewards singapore should i use my tesco credit card abroad paying off credit card debt help credit score citifinancial credit card application compare credit cards with rewards why do i need a credit card for free apps on iphone icici credit card bill payment by cheque how to pay icici credit card bill online through icici net banking get loans with bad credit and no bank account view hdfc credit card statement online pre approved credit card offers bank of america discover credit card approval rates mastercard prepaid credit card uk how to prevent credit card fraud online shopping interest free balance transfer credit card offers free wireless credit card machines for small business matrix discover credit card account login compare premium credit cards canada how to accept credit card payments for small business philippines planet fitness black card standard chartered credit card customer care number mumbai where to buy prepaid credit cards australia south west trains gold card free weekend travel secured loan bad credit history citibank credit card no annual fee offer apply for gold credit card fnb should i get credit card insurance credit card offers for someone with no credit pay a walmart credit card payment online loan application for poor credit online unsecured credit cards for bad credit everest cash advance website apply online credit card icici bank best credit card in canada how does applying for a credit card affect credit rating what are some easy credit cards to get hdfc credit card helpline number gujarat can i apply for an ikea credit card online direct online payday loans uk best canadian credit cards travel rewards paypal merchant cash advance how to negotiate with credit card companies 2010 low income credit cards australia need to apply for walmart credit card online secured credit cards card applications benefits of accepting credit cards clark howard best credit cards for college students hsbc credit card review australia secured business credit cards for bad credit axis bank credit card reward points offers linking woolworths everyday rewards cards credit cards for poor credit scores uk citibank business credit card online payday loans online no credit check secured credit cards to rebuild credit in canada air canada credit card charges hsbc credit card points uk easy credit cards to get approved for in australia what is the lowest credit card rate available need 5000 bad credit loan pnc business credit card services hdfc corporate credit card login page cash rewards credit cards with no annual fee no credit credit cards canada alaska airlines visa credit card canada should i pay off my student loans or invest canada post office prepaid credit card what is a credit card balance transfer rate best 0 balance transfer credit cards 2012 ny and company credit card payment online how to cancel standard chartered credit card india newest payday lenders uk top cash rewards credit cards canada priority club rewards visa card uk cimb supplementary credit card application form business credit card offers with rewards best credit card offers usaa capital one credit cards login us credit card bank transfer means lic credit card with axis bank application form chase british airways credit card offer facebook credit card verification axis bank credit cards details make dillards credit card payment square international credit cards barclays platinum credit card login i need a business credit card but have bad credit online loans in south africa no documents reviews of amazon credit card uk ebay paypal credit card charges barclay credit card payment address ge money bank credit cards phone number us post office money order credit card prepaid business credit cards with rewards accept credit card payments online without merchant account kwik cash payday loans reviews hsbc visa uk credit cards standard chartered bank uae credit card citibank credit card apply kolkata american airlines credit card 50000 miles delta airlines gold delta skymiles? credit card hsbc credit card no annual fee india private label credit cards wiki jcpenney credit card pay bill online direct payday loan lenders uk only major credit cards in canada where to get prepaid credit cards in canada credit card for bad credit rating australia how to activate td visa debit card does walmart accept discover credit cards southwest visa credit card phone number how often does chase increase credit limit commonwealth bank awards credit card travel insurance chase credit card processing app how to increase credit card limit hsbc credit card company best visa cash back credit card credit card fraud detection using data mining techniques texas business free credit card machine banks that accept american express cash advance new york and company credit card payment number grand hyatt san antonio credit card authorization form visa credit card application after bankruptcy hdfc lifetime free credit cards in india hdfc credit card emi limits credit card debt consolidation loan bad credit credit card low interest transfer credit card fraudsters arrested uk instant credit card icici means virgin credit card ppi success southwest credit card free flight promotion best small business credit card with bad credit chase credit cards online account access marathon visa credit card application register everyday rewards cards woolworths tesco credit card points spend what is 6-digit approval code on credit card best credit card with rewards no annual fee credit cards with cash rewards and no annual fee zero percent balance transfer credit cards canada low income credit cards uk zero percent credit cards ireland does credit card debt expire on death icici credit card apply online application credit cards with 0 interest on balance transfers for life low interest credit cards for students balance transfers explained first cash advance reviews cash back credit cards wiki first premier centennial credit card login dillards rewards credit card login apply for credit card with bad credit and no checking account 10 best canadian credit cards chase credit card application status online best no credit credit card 0 credit cards explained discover credit card visa gift cards walmart compare best credit card balance transfer average household credit card debt 2013 city bank credit card payment through billdesk hdfc credit card application form free download chase freedom credit card ratings delta credit card cash back bank of america student credit card review clark howard choosing a credit card stores with easy credit card approval do you need to have a credit card to rent a hotel room easy credit card approval for bad credit are there any new payday lenders hdfc bank credit card payment through sbi credit card prepaid visa cards best credit card cashback deals best credit card abroad best mastercard credit cards rewards payday advance loans online direct lenders how long does it take to build credit with your first credit card chase visa debit card online prepaid visa credit card australia absa credit card fraud insurance smartphone credit card terminal uk small business credit card no credit check different types of credit card scams explain how credit card processing works compare bad credit loans instant decision walmart credit card 18 month no interest best credit card processing for small business canada credit card fraud penalties texas chase mobile credit card processing how quickly can i get a capital one credit card citi government travel credit card
Home Forum Download/Upload Links Search

NetTalk User Group

NetTalk User Group Meeting!
Live Webinar!
Saturday Nov. 16 
7am PST
Click Here To Register!
Home arrow Forum arrow NetTalk Web Serverarrow Web Server - Ask For Helparrow Form Button and JavaScript Access Session Variables
NetTalk Central
August 05, 2015, 04:24:09 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the NetTalk Central Forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Form Button and JavaScript Access Session Variables  (Read 1419 times)
springguy
Full Member
***
Posts: 184


View Profile Email
« on: May 18, 2012, 08:06:53 AM »

Looking for general understanding/approach.

If you have a button added to a form, and when the button is clicked, you want to do some local analysis of a variable and if there is a problem with the variable data, popup an error, otherwise call a procedure or web page.

What is the best strategy for that?  Is it to call javascript before the OnClick procedure or URL call?  If so, how does the javascript access the variable NT data?  A simple, conceptual example would be helpful.

Or, is a better strategy to call a source procedure on the OnClick and depending on the clarion code there, call the appropriate procedure or web site?

Mike
Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 7688



View Profile
« Reply #1 on: May 18, 2012, 09:38:44 PM »

Hi Mike,

>> If you have a button added to a form, and when the button is clicked, you want to do some local analysis of a variable and if there is a problem with the variable data, popup an error, otherwise call a procedure or web page.

This is such a common question, but unfortunately you've got it the wrong way around. Decisions are made in the _browser_ not on the server. The poppping-up-an-error is ok. To change the page you'd do something like;

p_web.Script('href.location="somepage"')

I'm not sure what you mean by "call a procedure" - the context of that you need to explain more.

Cheers
Bruce
Logged
springguy
Full Member
***
Posts: 184


View Profile Email
« Reply #2 on: May 19, 2012, 08:43:16 AM »

Thanks Bruce.

I have a specific case where I have a form with an added button.  The purpose of the button is to send an email based on information in the form data.  Using example 11, this was pretty straightforward, and works well.

However, if a data variable in the record has a certain value, then I do not want to send an email, but would rather popup a message telling the user why they cannot send an email, and then return to the form.

What I have been forced to do at the moment is to disable the button if the field value has that certain value.  That's workable, I guess, but it requires the user to understand why it is disabled, rather than the system telling them why.

So, what I am trying to get straight is when I click an added button on a Form, what is the best approach in general to do the following:

1. interrogate a variable on the record (or in a session variable)

2. have code (JavaScript I assume) that, on the basis of the variable contents, will popup a message within the browser, or...

3. call a different NT procedure or web page to do the analysis and action taking.

I don't know anything about JavaScript (yet, I suppose) to know if doing something like interrogating a value and calling for one of a multiple set of actions is possible - I assume it is, but how, and is that the best approach?

OR, is it a better approach (for us clarion guys) to have the button click call a NT source procedure that will interrogate a variable and then have it take one of a series of actions?

OR, is there a different, better approach that you would recommend. 

I would not be surprised that this is a pretty common question for us clarion guys, and I am slowly getting a better understanding of the "web programming" evironment of NT, but can you give us some practical guidance on how to interrogate a variable on a form when an added button is clicked and take a variety of actions depending on the value in the variable (ie popup, go to a NT procedure, go to a web page, etc).

Does that help clarify?
Mike
Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 7688



View Profile
« Reply #3 on: May 19, 2012, 10:36:24 PM »

Hi Mike,

>> can you give us some practical guidance on how to interrogate a variable on a form when an added button is clicked

The form value is in the session queue at that point.

>> I have been forced to do at the moment is to disable the button if the field value has that certain value.  That's workable, I guess, but it requires the user to understand why it is disabled, rather than the system telling them why.

that's what "comments" are for. You can set the comment of the button to explain why it is disabled.

Cheers
Bruce

Logged
springguy
Full Member
***
Posts: 184


View Profile Email
« Reply #4 on: May 20, 2012, 04:09:22 AM »

Bruce,
I really appreciate your comments over the weekend.

I do understand that the values are in the session queue.  I think what I am asking is "can JavaScript access those values, and if so, can you give a simple example of what a piece of JS code would look like that does access a session value". If that is possible, then it opens an interesting door of possibilities in client side dynamics. 

Regarding using the comments to explain a situation, I had never thought of that as being a dynamic set of comment.  Thanks for the suggestion - I think I can run with that.
Mike
Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 7688



View Profile
« Reply #5 on: May 20, 2012, 09:24:56 PM »

>> can JavaScript access those values,

no, not directly of course. the values are on the server side. To get the current value of one of them, the browser could "ask" (as in make an asynchronous request) and perhaps you have a web page that'll return that value - but there's no "GetSessionValue" function.)

also the request would be asynchronous, so it would be somewhat harder to use unless you were familiar with JavaScript callbacks etc.

cheers
Bruce
Logged
kevin plummer
Hero Member
*****
Posts: 1084



View Profile WWW
« Reply #6 on: May 20, 2012, 10:34:17 PM »

Hi Mike,

If you are just starting out in the web I wouldn't be too quick to jump in and start trying to use Javascipt. For the most part NTW protects us from that big bad world which makes the learning curve much easier. In your case the way I see it is you have 2 options. One, disable the button and use the comments field or insert a field to let the user know why the button is disable and enable the button when everything is good. Two, create a popup error form. Set the URL on your button to be dynamic (a GSV) and update this variable to be either the popup form or your email procedure. The caveat is if you can popup a form from a button from the templates. I hand coded this in NTW5 and without template support would be too complicated to work out.

Cheers,

Kev
Logged
springguy
Full Member
***
Posts: 184


View Profile Email
« Reply #7 on: May 21, 2012, 02:06:18 AM »

Thanks Bruce and Kevin,
I really appreciate your advice.
Mike
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Login Form

Welcome Guest.






Lost Password?
No account yet? Register
home contact search contact search