payday loan store wisconsin rapids wi instant payday loan lender payday loan direct lenders websites bad credit payday advances finance companies for bad credit personal loans cash advance on credit cards interest fast payday loans for people with bad credit secured loan with bad credit 60 day payday loans no credit check 1000 payday loan no fax bad credit personal loan banks can i get a business loan with bad credit how easy is it to get a small business loan best bank rates for personal loans refinance car loan with poor credit orlando cash advance payday loans for people on benefits cash best online auto loans bad credit best place to get a title loan cash advance loans denver usda rural housing guaranteed loan home loan with bad credit score no cash advance credit cards quick loans america cash advance loan companies easy online installment loans cash advance loans phone number payday cash now ace cash advance online job application interest rates for bad credit car loans no fax no teletrack direct lender payday loans how to get personal loan with bad credit payday loan lenders only no employment verification credit check instant payday loan now payday advance with no credit check cash loans in 15 minutes best online cash advance lenders cash advance payday loans.los angeles ca loans for unemployed people with bad credit bad credit loans business fast cash advance pay day loan getting a personal loan with bad credit ten minute payday loan cash advance information instant car loan approval bad credit cash loans in an hour cash today payday loan best home construction loans los angeles hard money loan get short term loan fast small fast loans jackson hewitt money now loan cash till payday loan can you get car loan with bad credit banks that finance bad credit auto loans online quick cash loans banks that do auto loans after bankruptcy discharge checkmate cash advance call for cash loan no credit check payday loan lenders magnum cash payday loans current ratio quick ratio cash ratio cash loan payday united payday loan advance online guaranteed cash advance loans xtra cash payday loan payday loan no credit check instant instant payday loans direct lenders uk cash auto loan debit card payday advance cash loan reviews fast easy cash advance top bad credit loans lakota cash payday loan bad credit money loan barclaycard credit card cash advance fee motorcycle loans for bad credit cash advance loans locations in illinois best new car loan cash card loans guaranteed payday loan bad credit payday loans indirect lenders cash converters pay day advance student loans for bad credit no cosigner money to pay off student loans bad credit used car loan mobile quick loans cash advance usa scam 2013 corvette loans to people with bad credit cheap no fax payday loan personal loans for poor credit scores easy credit union loans payday loan no teletrack cash advance pin bdo credit card merchant cash advance rates used car loans for bad credit www.payday cash alternative student loans bad credit bad credit home mortgage loans payday loans for bad credit and no direct deposit very poor unsecured small personal loans direct cash loans lenders guarantee for loan how to apply for small business loan personal loans for people with bad credit not payday loans student loan no cosigner bad credit fast loans fast advance business cash best auto loan rate get a merchant cash advance what do i need for a cash advance easy payday loans no faxing no credit check payday loans not brokers fee fees associated credit card cash advance money loans for bad credit people small personal loans for people with bad credit loans for people with bad credit and low income define hard money loan payday loans for unemployed students home equity loans for poor credit blue sky payday advance cash america best used car loan rates 2013 allied cash advance locations cash advance application what is a credit card cash advance when you need money fast instant installment loans no credit check small business loan ontario payday loans online bad credit can i get a small business loan with bad credit xpress cash advance cash advance car loan refinancing bad credit small business loans lenders blue sky payday scammers list installment loans for bad credit in texas online payday loans fast cash loan instantly cash until payday loan best online payday loans canada cash advances no fax bad credit auto loans virginia blue sky payday loan company payday loans online with no credit check direct lender small loans to build credit how to get a loan online with bad credit quick and easy cash loan getting small business loan easy payday cash loans where can i get loans with bad credit cash advance without employment verification click cash loans payday loan cash advances bad credit personal loan lender personal quick loans cash loan online payday cash advance phoenix ameriloan payday loan contact number used cars loans bad credit are there home loans for people with bad credit online advance cash quick cash with no bank account can you get a bank loan with bad credit compare cash loans payday loans no credit check indirect lender uk payday loan consolidation companies texas georgia cash advance how to apply for a house loan with bad credit payday loan no fax $200 within bad credit student loan no cosigner bad credit payday loans no fees instant guaranteed payday loans no faxing uk can get cash advance my credit card atm online payday loan advance hsbc visa debit card cash advance fee payday loans instant decision payday loans bad credit easy personal loans with bad credit cash call type loans easy get personal loans cash advance over the phone cash advance cash free instant cash games payday loans cash today payday loan cash advance in 10 minutes click blue sky payday breast augmentation loans for bad credit cash in minutes payday loans payday loan faxless no call first time home buyer loan bad credit small loans fast direct cash advance lenders no credit check cash advance loans online montel williams daughter applying for a home loan with bad credit loans for unemployed people in india how to get a loan bad credit blue sky payday scam alert online payday loans not phone calls get personal loan bad credit express cash loans 10 minute payday loans chicago illinois usa what is the best online payday loan company vehicle loan for bad credit direct payday loan lenders no credit checks fast payday loan no faxing loan yes no credit fax payday payday loans for people with bad credit pls payday loan store jobs cash 4 cars today faxless cash advance loans online bad consolidation credit loan unsecured direct cash advance companies list cash advance lenders fha loans people bad credit small boat loans fast approval payday loan day loans online small business loans 2012 small business government loan oregon small business loans fast online payday loans uk pls payday loan store milwaukee easy approval car loans best rate used car loan government small business loans for women with bad credit cash advance nashville tn instant online personal loans loan for bad credit history 3000 dollar loan with bad credit cash advance usa loans scamsday loans best loan for investment property small business loans bank best low interest personal loans payday cash advance loan online instant approval cash advance loan home equity loan with poor credit best used car auto loans payday loan consolidation lenders 60 minute payday advance direct loan loan guarantee form loans you can get with bad credit fast same day payday loans cash advances in north carolina bad credit new home loan car loans for poor credit scores quick online cash advance fast home loan cash advance loans in richmond va discount cash advance personal loans bad credit monthly payments second chance no fax payday loan lenders fast cash loan bad credit 30 day loans bad credit store cash advances refinance a car loan with bad credit 500 fast cash loans cash loan unsecured payday cash advance on line 365 day loans spam blocker motorcycle loan for bad credit quick and easy loan best pay day loans for bad credit cheapest payday lender business fast cash 100 day loans better business bureau ratings california payday loan cash advance online instant cash loan payday loans online installment payments refinance car loan with bad credit bad credit refinance car loan cheapest 12 hour advanced driver improvement course car loans poor credit small business sba loans best company for student loans legit cash advance in 1 hour loan stores in manchester online payday cash loan business cash call service loan bmo small business loan payday loans bad credit ok small business loans programs loans best interest cash advance louisville ky quick click cash military cash advance loans quick fast payday loans payday loan lenders instant decision broker hard money loan cash advance america payday loans middlesboro ky weather best rates for unsecured loans government grants small business loans small loans for poor credit instant no credit loans cash advance loans no employment verification loans that are easy to get faxless bad credit payday loans overnight cash advance payday loans how can you get a personal loan with bad credit 100 approval online payday loans sky lending cash advance bad credit loans for car cash advance debit card payday loans best signature loans sell my home fast for cash cash advance america.com 10 minute payday loans chicago il 60617 map cash 3 for today instant debt consolidation loans cash advance credit cards citibank student loan bad credit no cosigner needed ace cash advance employment application refinance my car loan bad credit start up business loans for women with bad credit loans bad credit monthly payments fast payday cash advances school loan bad credit get cash advance credit card atm loans with poor credit history what is the best payday loan company online bad credit fast personal loan instant personal loans best low credit loans payday loan lenders bad credit how can i get a loan with bad credit history instant no fax payday loans 15 day payday loan no fax long term payday lenders virginia cash advance pls payday loan store reviews cash advance loans uk o down bad credit car loans cash advance arkansas need fast cash now refinancing a car loan with bad credit one click cash payday loan payday loan yes address loan companies bad credit best personal loan rates personal loans after bankruptcy lenders cash loans texas monthly loans with bad credit loans after bankruptcy in canada 100 online payday loans chec king payday advance bad credit online loan large loans with bad credit money bank loans first time home loans poor credit quick student loan quick ways to make some cash online faxless payday loan lenders fast cash no loans ez money payday loan qualify for home loan with bad credit bad credit loan mortgage need 24 month installment loans for poor credit history short term loans quick the best car loan cheap cash advance loans small business start up loans for women with bad credit bad credit lender personal loan payday loans low brokers no upfront fees instant poor credit loans integrity advance cash instant cash isas lenders 1 hour cash advances instant money loans online mastercard cash advance fees small business loans washington state banks that loan to bad credit the best unsecured loans how to get loans for college with bad credit best rates for small business loans quick cash for cars advance america cash loans ace cash advance careers short term military loans bad credit auto loan bad credit instant approval payday loans lenders list quick school loans same day money loan bad credit business loans start up loans with bad credit unsecured advance cash loan payday citibank cash advance fee singapore safe fast cash loans can i get an auto loan with bad credit find cash advances quick approval loans home loan for bad credit rating payday advance online direct lender payday loans with no credit check direct lenders how to make fast easy cash quick cash loans online for bad credit payday cash advance today payday advance florida no fax uk instant payday loans quick loans montel williams payday loan cash advance call best auto loan bank online instant payday loans cash one payday loans easy way to make quick cash best bank for personal loan cash advances no checking account direct payday lenders llc king of cash loans payday loans indirect lenders not brokers cash point title loans faxless no teletrack payday loan lenders fast loan oregon commercial loan bad credit bad credit loan review car title loan bad credit cash advance payday loans in wilmington delaware zip code loans small businesses best new car loan interest rates cash for cars fast payday loans online c6 cash advance cash loans no faxing required personal loans online for people with bad credit 60 minute payday advance cash loan unsecured personal loans for military with bad credit money tree payday loans las vegas legitimate personal loans for people with bad credit how to get a home equity loan with poor credit best way to get quick cash fast cash pawn lakewood co fast same day loans no credit checks what to do when you need money fast need cash fast loans how do i make quick cash get a personal loan with bad credit small short term loan no fax payday advance loan 100 day loans better business bureau arizona tempe can i get a auto loan with bad credit best college loan rates florida hard money loans quick pay day loans bad credit bad credit easy loan unsecured personal loans bad credit lenders bad credit loans for military 12 hour advanced airway unsecured business loans for bad credit payday loans for people on benefits with bad credit cash advance in houston tx payday loan cash advance in 15 minutes pay day loans fast easy college loans quick loan with bad credit private loans for college with bad credit cash for car loans sky money loan private student loan bad credit no cosigner car loans with bad credit reviews approved cash advance locations payday check advance payday now advance best pay day loan payday lender online payday advance loans online no faxing how can i get a quick loan payday loan store chicago heights il money loans for bad credit fast and easy pay day loans housing loan with bad credit loans poor credit history best online payday loan lenders fast auto loans inc direct 90 day loans online student loan fast online payday advance auto car loan bad credit cash advance loans for people with bad credit 30 day payday no fax loans instant loan bad credit score easiest payday loan lenders i need personal loan and have bad credit 3500 loan bad credit best graduate student loans best rates auto loan fast cash for bad credit san diego cash advance whats the best payday loan guaranteed payday loans no credit check fast cash personal loans com get a fast loan with bad credit where to get a small personal loan with bad credit cash 3 winning numbers today checks cashed payday advance personal loans for military with bad credit car loans no money down online instant loans same day instant personal loan approval money advances loans payday cash advance in riverdale ga pay day loans easy online cash loans with bad credit loans online instant approval bad credit business loans guaranteed approval
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
September 04, 2015, 12:54:52 PM *
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 1475 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: 7753



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: 7753



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: 7753



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: 1099



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