costa rica pharmacies no prescription northwest pharmacy canada reviews zithromax vs azithromycin alli pill pants zithromax mail singapore pharmacy viagra candia fucked pussy ketorolaco doxycycline hyclate orange pill lexapro generic cost canada zovirax acyclovir online zoloft prescription price viagra curacao synthroid by mail atomoxetine pharmacies india periactin lowest priced cialis pills for sale ivermectin dosage cheapest price for viagra zithromax online cheap comprar viagra online sem receita allegra 120 mg tablet what is the price for cialis generic sildenafil citrate 100mg avodart tabletta actos canda from canadian co professional viagra buy robaxin from mexico buspirone pristiq over the counter drugs like flagyl 400mg used for where to buy fertility drugs online how can i get dramamine jarabe accutane uk price buy cheap cialis australia tulsi lowest price ark women levitra cost of abilify at walgreens apo metformin price canada where can i buy clomid in italy fluoxetine buy online over the counter levitra professional cheapest abilify cheap price buy allegra online buy cheap crestor online buy cheap cealis using pay pal lasuna next day delivery xanax price risedronate sodium purchase viagra with mastercard cerco cialis originale prograf buy online season 1 cialis low dose cost kamagra on sale clomid 150 morning lunch and evening indian cialis generic fml forte ordering manufacturer atomoxetine online buy cheap proscar online canada cipro xr no prescription orlistat shortage update order prazosin you canadian pharcharmies how to get nolvadex from doctor buy cheap pariet online australia prednisone overnight delivery viagra online in italia chipest buy accutane 20 mg xenical sale cheap achat levitra professionnel tobbot no rx pharmacy overnight shipping omeprazole 20 buy clomid fertility pills cheap nursing shoes sildenafil tablets 50mg cyprus cymbalta generic equivalent achat de viagra au quebec price alendronate generic how to buy dilaudid online woman viagra buy clomid for women erectile dysfunction home remedies donepezil tablet 2.5 mg cialis no prescription tadalafil 25mg x 40 ct can you get viagra over the counter generic phenergan pills buy viagra india no prescription paypal canadian pha quien receta la viagra treatment for pain of uti diflucan cost target bupropion flomax sale capsules does cialis lower blood pressure levaquin india does tricare cover cialis for daily use long time sex tablets for men non prescription propecia diflucan 3 pills where to buy viagra in doha 41 prices of viagra cialis and levitra generic lexapro sertraline augmentin tablet strengths accutane price in pakistan buying actavis syrup online no prescription generic abilify cheap abilify order from canada guaranteed next day delivery viagra uk has anyone ever bought clomid online doxycycline 10mg dosage best online pill site generic name for diflucan motilium overnight delivery viagra price hong kong viagra varata cheap online cails pills accutane 120 mg per day how to used cytitec pill for abortion buy xenical online south africa buying viagra online cialis price hong kong buy viagra kuwait kamagra jelly india avodart 0.5mg ventolin with viagra methylprednisolone 4 mg tablets microcidal nexium order from canada diovan 160 mg etken maddesi contact yahoo best generic nicotine patches effective cheap ed pills zithromax online uk discount cialis prices abilify drug price duloxetine dosage uk ventolin inhaler 90 mcg progesterone brand name levetra on line over the counter erection pills walmart neurontin non perscription inhaler usa viagra pfizer for sale cilas generic buy metformin no persciption fucidin pomata costo singulair online cheap generic clomid success in india name brand cialis without subscription discount v gel atika beauty cafergot buy buy generic lipitor cheap buy nizagara in uk buy clomid nz buy generic lasix no prescription citotecwalgreens order clomid cream canada online pharmacy claravis buy acyclovir without prescription minoxidil 10 uk search,http,dermapost,pyas,where,... toradol costochondritis tamoxifen buy no prescription zyrtec get aciclovir tablets while pregnant best viagra diclofenac 150 buy metformin 500 mg z 70 yasmin 1xtra pharmacy online india on line wellbutrin paypal crestor price in saudi arabia prednisone 10 subutex for sale online fucidin buy viagra 25mg tamsulosin and tamsulosin hcl where can i buy flagyl prescription online cymbalta generic walmart synthroid without water professionalsildena50mg. buying lexapro online canada viagra capsule price nhs omeprazole side effects purchase prevacid online walmart pharmacy prices cialis get viagra online with paypal furosemide for dogs cost buy online pantoprazole cost of 100 mg viagra buy sertraline zoloft montipedia 10 mg online kamagra supplier uk dapoxetine super delay pills cost of cialis daily free herbal viagra samples discount viagra no prescription buy nizagara sildenafil viagra price per pill walgreens 6 where can i buy clonidine uk buy alli weight loss pills online generic viagra mexico generic plavix may 2012 lipitor 20 mg adalah fincar for sale prozac online us levitra silk road no perscription echeck cost of generic 5mg cialis order phenergan codeine snafi price in uae viagra switzerland canadian cialis pharmacy where to buy prazosin in europe viagra price in pakistan lahore viagra for sale witthout perscribtion metformin 350 mg rogaine uk buy amoxicillin lowest price viagra uk tesco can prednisone help with tmj pain moduretic purchase without prescription drugs onn line coumadin online cheap watches viagra blogs best online belize prescription drugs zovirax ointment online pharmacy buy orlistat without prescription pfizer viagra pharmacy buy cheap synthroid 125mcg no rx diflucan uses cialis super active 20mg tablet zyprexa acutane pharmacy in canada crestor price hong kong avodart online order jaguar viagra generic levitra canada brand cialis pills cost of viagra tablet clomid success stories india romney medicare pharm net cheap plavix united states cost clomid in canada lipitor for sale in canada eldepryl prednisolone uk no prescription value pharmaceuticals scam where can i purchase zyprexa uk metformin 500 mg i45 dexilant price walmart klopidogrel prei generic benfotiamine gnc vam vira capsule viagra male enhancement pills zoloft no prescription avana pills cytotec sale wellbutrin get cheap cheap propecia online uk amsafast cialis 5 mg daily cost sildenafil tablets 100 mg tinidazole tablets brahmi online cheap capsules crestor generic availability trazodone 150 price aciclovir buy uk cheapest price on roxithromycin orifarm lasix 100 mg amsa fast orlistat ed pills from canada revatio 20mg buy online cialis generico come comprare valtrex 500 mg herpes canadianpharmacy 24h over the counter domperidone how can i get hydrochlorothiazide vitamins where to buy furosemide from europe thyroxine tablets to buy cialis overnight shipping from usa your-generic how can i buy augmentin online purchase viagra online in india omnicef how can i get eurax cream work how can i get brahmi powder buy generic propecia 2012 canadian pharms list of online pharmacies in uk bootleg viagra lexapro get out your system cipro 250 mg 3 days lamictal xr 100 best website to buy viagra online cialis daily use vs viagra cheap xenical australia i need viagra overnight delivery cheap viagra online ozz pills viagra online in usa buy cheap lotrisone tablets order viagra without prescription fake cytotec picture prices of cialis at walgreens buying propecia canada how can i get lincocin clean buy cialis online united states voltaren purchase online buy metronidazole bv levitra for singapore propecia for men to buy cost advair diskus 100 50 how can i get reglan give my dog cialis professional discount discount nexium 40mg erexin cost flomax prescription where can i get viagra cheap real viagra england buy xenical online cheap can you buy celebrex over the counter buy cheap doxycycline antibiotics online usa viagra et maladie du coeur how to get nexium cheaper how to buy viagra online without buy valtrex without insurance generic viagra accept paypal real viagra for sale online 178 trazodone 300 mg canadian pharmacy 24h basket ampicillin 500 mg on amazon zovirax 800 mg price buspar over the counter products contain binotal ampicillin 1000 mg bumex to lasix conversion buy voltaren gel uk wholesale generic toradol look like why cialis cost so much cheap prilosec canada indian levitra clomid for sale online canadian viagra safety drug similar to metformin wholesale generic antabuse side effects order clonidine overnight delivery cost drospirenone viagra generico in italia domperidone sale no prescription prevacid cost ordering keflex buy viagra with echeck generic wellbutrin 150 mg gabapentin cap online prescriptions without prescriptions viagra pastillas xenical usa buying hydrocodone while in canada search,http,tricare,online,pharmacy... buy prednisone steroids cheap diflucan canada risperdal cheapest price consta injection actonel zantac finasteride generic walgreens how much is azithromycin in nigeria buy duloxetine canada buy cialis 100mg order cialis 20mg 30 pill american express antibotics for women canada where to buy viagra manila lithium aspartate alli pill advice order wellbutrin sr lopid online cheap vintage can you get high off mobic lowest prices viagra can you get high off doxepin aciclovir sale online remedy for ed cialis 5 mg daily success distribuidora mincorp buy letrozole tablets presidone by mail metformin without prescr levitra prezzi clomid rezeptfrei online bestellen india online pharmacy reviews my canadian pharmacy no script purchase exelon jobs femara uk pcos ketoconazole walgreens buying viagra online canada actoplus cheapest price australia cheap lady era outfits buy online drug with paypal mexico pharmacies,best,reputable diovan prices walgreens buy cheap cialis without a prescription cipro from canada augmentin tablet price viagra uk over the counter rocaltrol over the counter substitute contents of suhagra tablets rx drugs online no prescription needed generic donepezil where to buy triamterene without a pres ordering vargra cialis dosage for ed is crestor 5 mg safe levomax 500 uputstvo xenical 120 mg wirkung on line pharmacy's order usa ed meds lasix order online wo gibt es viagra ohne rezept cipla field tadalafil 100 mg how can i get cytotec malaysia best price 100mg viagra generic cymbalta medication buy cheap pulmicort respules 20mg cialis cialis elevitra professionale hemofarm cardiologica preisvergleich viagra generika viagra websites levothyroxine online canada can i take cipro with almond milk what does clomid cost cheapest price on diltiazem xr venlafaxina sale generic caniadians cilus propecia mail order canada online abortion pills for sale where to buy real generic viagra viagra_in_usa generic levitra pills generic rosuvastatin canada does viagra come in yellow precose cheapest price website best erection pills for men universal drug services ltd. prozac online no prescription arthrotec price philippines cymbalta cost after insurance augmentin duo 625 india licensed online pharmacy in india how can i get femara vision rhiner inc. inda online canadian drugs paypal colchicine to buy lipitor tablet description online pharmacy without perscriptions micronase cheapest price jeans buy fluticasone propionate canadian pharmacy 24h order confirm php buy fluoxetine china order accutane online cheap wholesale generic zocor made viagra pills for sale in cork meds without a script alli buy online australia how can i get zyprexa help candian pharmecy generic lipitor with glass ventolin usual dosage web md safe online sites to buy viagra zyrtec liquid gels inderal buy india lipitor 10mg price usa online thailand pharmacies paxil on the internet augmentin 1000 mg kullanim clamida pills online why was etodolac discontinued femara online orders cheapest prices alcohol and viagra purchase tamoxifen no prescription prednisone 21 pack directions abilify buy generic quien vende cialis brand bayer levitra 10mg combivent price walmart flagyl tablets buy robaxin otc cheapest price on suprax uses myambutol over the counter canadian pharmacies with free shipping buy synthroid in uk boots chemist viagra cost cost of clomid uk doxtcycline pills without prescription canada actavis syrup alli precios online how much phenergan to give 16 month old where can i get atorvastatin without a buy albenza kong cialis reviews 5mg cheapest xenical online australia cabergoline buy
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
June 30, 2015, 12:19:39 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 1379 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: 7578



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



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



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



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