buy differin from canada metrogel side effects alcohol propecia online medication puerto rico pharmacy cheaper can i buy cytotec over the counter does target have cheap prescriptions purchasing dapoxetine online cialis de 0.5 mg cheap glimepiride aravon women;s shoes discount cheapest viagra 200mg vardenafil chile generic cialis double donde comprar tenormin does viagra make you hornier cialis 5 mg image purest generic viagra albo nazionale commercialisti viagra order individually walmart generic nexium soma sent cod lexapro 2mg viagra ebay 24 b kamal kunj echtes viagra online thuoc propranolol 40mg genericviagra prednisone fast shipping crestor price medicare ordering endep on line bupropion reviews anxiety what is the shelf life for cialis canadian antibiotics buy cheap brand cialis online over the counter diabetic medicine sildenatil azithromycin order doxycycline brand name viagra 100 mg no prescription cozaar anxiety medications online www.inhousepharmacyuk cheapest viagra pills betnovate n cream in usa cialis 5 mg doctissimo orlistat from canada sexpowertablit skelaxin purchase in canada no prescription beta alanine fastest delivery of online viagra zenegra online order offer cialis 28 cpr 5mg metformin denk 500 buy generic finpecia online prescriptions propecia adalat for sale on line pharmarcy branded viagra cheap meratrim with coumadin side effects medication wellbutrin canada cheap generic viagra poland tetracycline generic brand xenical 120 mg dawkowanie tetracycline order cuckold creek md lexapro 2.5 mg tablet buy isoptin without prescription order zithromax azithromycin viagra vs cialis cost comparison canada viagra 100mg zithromax dosage 200 mg lotrison order cheap cleocin gel free delivery strattera 5 mg buy bactrim acne viagra generic ph no script trimix ed meds order amitriptyline online overnight metformin 850 mg cost cialis ricetta online buy cialis over the counter uk music cds australia buy online buy acyclovir 400 mg online buy doxycycline discussions cialis professional cheap atarax tabletsforsale prednisone 10mg shortage hydrochlorothiazide 25 mg picture best prices for 60mg. orlistat birth control pills online bactrim cheapest erection pills pay with checking list of best online pharmacies micardis 40 mg/12.5 viagra 25 50 oder 100 mg rx buys viagra dth 24 b kamal kunj reductil forum romania best rated generic viagra site advair diskus without prescription apotik penjual cytotec jakarta orlistat shortage levitra da 50 mg how to use viagra spray order neurontine overnight vipps pharmacy canada viagra finapecia blue steel erection pills augmentin prospect 875 buy 150 dose viagra order xenical philippines zithromax dosage 200 mg buy levitra germany all cialis 20mg online nexium cheap amikacin drug study scribd where to buy zocor hcl non prescription drug yp healthcare viagra accutane instructions lasix 40 mg pills generic viagra 20 mg how can i get cytotec effective in abortion online cialis singapore prednisolone 5mg buy online propecia buy ireland generic cialis in canada xenical 120mg 42caps erexor prices at costco achat de tadalafil au canada antifungal nizoral shuddha guggulu buy online flipkart wholesale generic advair have 25mg viagra counterfeit nolvadex 20mg mevacor non perscription drugs generic viagra 50 mg 50 sialis levitra super active canada companies only india topamax propranolol 40mg tablet acquistare cialis contrabbando metronidazole over the counter accutane buy viagra online branded strattera 60 mg capsule haldol elderly dementia zithromax 500 mg erfahrungsberichte cost of cialis at walmart pharmacy levitra online prescription carprofen for dogs drug interactionscealisbuycefadroxil 100mg viagra walmart software store review vgr 100 side effect canadiancialissources viagra mexico generic cheap cialis from propecia online australia nexium 20mg 40mg tablets augmentin generic liquid buy viagra shanghai buy bupropion 40 bactrim ordering information without rx xenical 120 mg shortage generico de cialis 5mg cialis forum xenical price cheap phexin capsule size suhagrat ka tarika doxycycline overnight delivery onadron ampulla viagra tabs 100mg medicament celebrex 100mg www pfizer viagra 100mg price viagra sales online captopril 25mg tablets cialis 10mg or 20 propecia canada buy hydrea flowers generic viagra shipped to po box mircette lowest price z1 nolvadex 10 mg dose buy viagra mn phentermine side effects hair loss viagra capsules in india oracea coupon bactrim 400 80 mg roche is dapoxetine legal in uk z pack antibiotic for sale order digoxin online day delivery cabergoline drugs forum viagra us sildenafil 20 mg without perscription order Female Cialis periactin eating disorders cialis 5 or 10mg cheap price on emsam online cheap unisom betnovate visa take 2 20mg cialis samonas bupropion weight loss dosage doxycycline hydrochloride 100 mg is it illegal to order generic capoten cipro 500 mg online zovirax price comparison assunzione levitra diflucan 150 mg vaikutus 100 mg generic viagra adderall and pregnancy effects farmaci generici zovirax lexapro 10mg alcohol la kamagra 150mg 2 000 mg of zoloft elavil without rx ninth street pharmacy diclofenac delivery 400 mg of zoloft where can i purchase proventil prescription cheap canadian drugs abilify cost of cialis vs viagra generic valtrex overnight viagra online asap esomeprazol nexium 10 mg cozaar plus diuretic mexico no prescription pharmacy amoxil 500 mg order seroflo online uk articulo 18 200 mg zoloft effects generic sumycin cheapest viagra reviews boots pharmacy ireland drugstore code free shipping diflucan 150 mg allegra 30 mg tablets xenical non perscription viagra methotrexate on line motilium alcohol cialis france acheter lexapro 5 mg tiredeness order cialis line generic lasix identification viagra 100mg dosage viagra mailed ordered from canada buy birth control pill ritalin weight loss order mentax online plendil felodipine side effects best secure canadian pharmacy best femcare prices levitra 10mg discounts generic viagra for sale in the usa usa viagra 1000mg vulnerable amex amantadina clorhidrato de tetraciclina medicamento generico celebrex wholesale generic doxycycline tablets suprax 400mg where to get it viagra 25mg online flowmax without prescription lisinopril 5 mg tabletas vigra made in canada wellbutrin 75mg sr order bactrim online canada drugs cheap lamisil cialis 20 mg interactions phentermine canada pharmacy cheap propecia finasteride keftab over counter uk buy zithromax pfizer europharmacy elavil by mail buy wellbutrin overnight shipping clomiphene citrate 50mg for men cheapest female viagra pret diflucan 200mg insulin pump therapy prompt pill store canadian pharmacy brought by echeck purchase cialis 2.5mg levitra 10mg chewing 20 mg levitra prices buy tricor without rx cvs viagra 100mg no rx cialis in canada viagra cost canadian online pharmacyambien stieva a cream buy online buy real viagra not generic chloroquine non perscription viagra ebay yasmin boland horoscope forecasts vigra tablet generic cialis 10 ontario viagra online loyang primary school albendazole australia cialis price europe 345 wriinkle viagra riyadh lynoral ethinyl estradiol levonorgestrel buy viagra from canada cheaper alternative to nexium tamoxifen shopping cheap prozac no rx no prescriptionamitryptiline malegra dxt no prescription articulo 162 buy viagra online in australia canada drugs no perscripition can i buy viagra in soho cheap female viagra prednisone for poison ivy for sale purchase anacin prescription zovirax salep zoloft no prescription canada generic cipro 500mg glucovance medication glyburide prednisolone for dogs buy cheap pfizer xalacom generic viagra information metformin 500 mg tabs can you buy cialis online in australia cheap xenical pills ciprofloxacina 500 mg 40mg cheap cialis zovirax 200mg tablets clomid buy europe order diovan hct online hydrochlorothiazide and valsartan biaxin generic walmart types of clonidine gazeta kosovarja online lisinopril 10 mg scored over the counter valtrex flagyl forte 500mg eldepryl cheapest price website zoloft europe online nexium 10 mg price wellbutrin xl 200mg diprosone cream generic periactin 4 mg dosage cialis 20mg generico augmentin tablet 375mg best super active prices generic viagra online drug irbesartan 300 mg tablet side effects uroxatral side effects mayo clinic buy bactrim ip 272 how to get bactrin generic viagra for sale canada cipla generic viagra viagra cheaply gabapentin buy online sildenafil venta libre tretinoin cream .05 generic lexapro wikipedia 36 hour cialis online ropinirole hydrochloride side effects cheap kamagra jelly elimite buy online buy differin you viagra omeopatico temazepam buy in line viagra generic usa pharmacy lantus solostar fertomid and clomidfinax mylan generic synthroid kamagra 100mg hrvatska novolog flexpen sliding scale chart cipla cialis review omeprazole 20 mg nexium compra cialis 5 mg purple pharmacy mexico online buy augmentin 875 mg viagra 400mg to buy tamoxifen vigrx metronidazole gel treatment bv zestril on line buy viagra boston mebendazole cost at wal mart ordering clomid online viagra 50 mg propecia 0.5 mg help mygra cymbalta side effects weight loss neurotin no scriptt bbb the pharmacy express 5 mg cialis effective cost of nizoral shop reminyl bula viagra uk 50mg generic zoloft 50 mg canada cilias prednisone dogs order viagra generic efficacy world med direct reviews viagra with a prescription synthroid prescription dosage clavamox for cats dosage cialis 20 mg for 20 grifulvin v 500mg information system cialis tadalafil 200mg where to buy alli diet pills viagra price 100 mg best generic cialis site where to get voltaren pct buy kamagra next day delivery paypal best viagra online celexa manufacturer viagra online craigslist online indian pharmacies pcos 150 mg clomid carbimazole treatment patients viraga 25mg lamisil website priligy online andorra celebrex buy online mg for metformin depakote medication for migraines viagra no prescrip flagyl liquid antibiotic for cats buy minocycline 100 mg generic viagra cialis online fedex buy clarinet music venlafaxine 75mg tablets lisinopril without rx 10mg usa pharmacy viagra shipped propranolol online bestellen ventolin pills online in the canada xenical 120mg wikipedia online generic viagra paypal accepted casodex bicalutamide 50 mg cialis cost 10mg generic lexapro price basket sevre et maine canadian rx without a script apo doxycycline 100mg comprar cialis 5 mg qsymia success stories domperidon 10mg for sale purchase tricor australia allegra drug interactions levitra orodispersible 10mg buying cialis pattaya best price cabgolin phrmacozmel buy generic atrovent with bonus mylan generic synthroid azithromycin cost at walmart buy brand cialis without a subscription kamagra buy budapest generic inderal mylan viagra cialis generica buy seroquel without prescription viagra 1oomg online pharmacy greece lisinopril 2.5 mg good rx relief card complaints atarax 25 mg for anxiety order viagra australia levitra kaufen 10mg doxycycline tablets 400mg trichomoniasis medication online generic minomycin kapsule viagra 10mg email artane 2 mg uses erythromycin 1000mg anastrozole bodybuilding suprax 400mg where to get it safe site to viagra soft clomid 50mg sale what does dramamine have in it buy generic diflucan ivermectin for cats overdosekamagracokamagrafast imagen de futbol con frases doxycycline generic cost vipps pharmacies canadian overnight can i crush clahymedi tablets amoxil 250 mg bula buy 2.5 mg cialis can women take proscar for hair loss roxithromycin sale xbox zoloft 100 mg diarrhea viagra buying advice albendazole tablet wiki order doxycycline usa purchase flagyl online usa buy generic propecia buy a viagra pills lisinopril 2.5 mg generic kamagra manchester buy achat xenical 120 mg cheapest cialis uk 40mgs cialis valtrex presciption houston cockapoo dogs 101 generic propecia approved different type of viagra pills
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
May 22, 2015, 08:00:44 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 1361 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: 7505



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



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



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



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