buy levitra sample about cialis 50mg propranolol 80 mg angst lexapro generic alternative 5mg cialis purchase order 100mmg. viagra buying viagra advice diflucan 150 mg vidal cheap bactrim online celebrex generic cialis online problems nolvadex legal buy prednisone 20 mg arrow doxycycline 50 mg tablet viagra generico prezzo viagra 100 mg last 1 mg propecia doxycycline 200mg cena buy doxycycline superdrug nexium 20 mg desconto cialis 20 mg diskuze prednisone eg 1 mg prednisone 10mg symptoms buy diflucan oral espillses buy cialis cialis 5mg women cheap viagra legal levitra prescription cheap kamagra 100 mg jelly cialis tablets 100 mg online cialis discount buy nexium france viagra 25mg preco generic softtabs viagra metformin 1000 mg tabletten viagra online comprar lexapro 20 mg prozac viagra online canada xenical 120 mg manufacturer synthroid backorder cheap cialis tramadol medikament levitra 20mg cheapest viagra 100mg hay levitra generico cheap cialis.ca strattera online prices discount cialis 10mg nexium 120mg metformin hci500mg generic name doxycycline erfahrung levitra 20mg diflucan 500mg buy amoxil 50 mg prednisone 4 mg 6 days generic propecia 5mg viagra buy manila buy blue viagra metformin 850 mg pret cialis online lloyd generic propecia safe cialis 5 mg hungary nexium 20 mg buying clomid 100mg tips lasix strengths 25mg cialis 5 mg duration levitra 10 oder 20 mg cialis generic overnight lexapro 20 mg coupon propranolol 40 mg overdose lexapro 20mg canada compra viagra generico clomid 50 mg uses best generic valtrex buy cheap zovirax zithromax 500 mg 2 tablets buy levitra 20mg trustworthy generic cialis online propecia cheap levitra 10mg anwendung zithromax 500mg treat generic for cytotec viagra order usa where buy metformin buy cialis au buy singapore viagra new generic lexapro zithromax 400mg susp xenical cheap online erythromycin motility disorders prednisone thyroid disorder zithromax 500 mg vial fast viagra online injectable lasix buy cialis 2 5 mg prezzo deltacortene prednisone 25 mg cialis 2.5 mg tables doxycycline tablets 50 mg cialis 5mg filmtabletta 14 prednisone tablet 50 mg levitra 10 mg opinie lisinopril 40 mg watson 409 viagra preis 25 mg bactrim generic cost cheapest cialis india prezzo cialis 10 mg overnight cheap cialis viagra 50 mg dosierung cheapest nexium metformin basics 850 mg problems generic lexapro buy viagra 50mg doxycycline 100mg generic viagra 150mg 2011 cialis buyer cialis 40 mg nederland strattera 25 mg high generic cialis australia efeito viagra 25 mg levitra online purchase viagra online manly cheap cialis 40 mg metformin 500 mg heumann generic fake propecia cialis 5mg nebenwirkung uk levitra online generic of nexium lexapro mg tablets metformin 500 mg overdose 1000 mg cipro 30 days dog viagra 10 mg buy dapoxetine usa buying cialis pattaya 800 mg zoloft 10 mg cialis effectiveness clomid 50mg gemeos kamagra 50mg uk lasix 20 mg nebenwirkungen viagra pfizer online buy wellbutrin xl generic cialis order doxycycline 100mg reviews nexium 40mg free safe cialis order 150mg dosage viagra bactrim 160mg prospect erythromycin sleep disorders zoloft 100mg reviews buy viagra 100mg zithromax 600 mg dose buy zoloft tablet doxycycline hyc 50 mg prednisone 5 mg cats synthroid 0.05mg tab valtrex generic cost lasix 40 mg bid order propecia generic nexium 40 mg ev nexium 20 mg mups lisinopril 10 mg pricing buy 150mg clomid buy dapoxetine generic viagra generica femenina generic viagra blueberry 100 generic strattera rezeptfrei prednisone 10mg acne nexium go generic generic zoloft australia nolvadex 10mg price take 2 25mg viagra prednisone 10 mg directions nexium 40 mg prezzo wellbutrin lawsuit generic vand viagra generic generic viagra testosterone not generic viagra buy amoxil dogs contraindicaciones lexapro 10 mg fee online viagra generic cialis costs bactrim 800 mgs nexium and generics cheapest viagra pharmacy online chat viagra kamagra buy spain viagra generic brands cialis online rx acheter viagra 50mg obat propranolol 40 mg lexapro order cheap 60 mg prednisone taper gaddafi orders viagra generico nexium mups 400mg doxycycline cialis 5mg au nexium generic toronto cialis 60 mg generic levitra 20mg dzialanie cialis 40mgs lexapro generic version2013 taking 1000 mg metformin cialis online ireland cialis tadalafil 5 mg lexapro generic 5mg buy strattera atomoxetine augmentin 500 mg dosis pastilla lisinopril 10mg. xenical australia online lasix cleaning 20 mg buy kamagra budapest wellbutrin generic buy walgreen generic viagra cialis 5mg filmtabletten amoxil 500 mg wikipedia levitra 20mg alcohol cialis 2.5 mg. tablet cipro 500mg 900 mg of wellbutrin propranolol 10 mg used buy clomid medicine mail order lexapro cialis 10 mg buy generic levitra medseller buying cialis bangkok lexapro 5 mg tiredeness synthroid 188 mg generic viagra names viagra generic oregon doxycycline 100 mg orally cialis 50mg usage prednisone injection8 mg metformin bp 500mg levitra 10 mg dispersable order msd propecia buying girls viagra online pharmacy nolvadex buy cialis viagra ip generic cialis doxycycline monohydrate generics australia doxycycline 50 mg prednisone 20mg info caratteristiche cialis 20 mg cialis 40mg information clomid kaufen online prospect augmentin 625mg levitra 10 mg compra khasiat prednisone 5mg cheapest cialis tadalafil apotheke levitra 10mg cialis 600 mg zoloft 50mg preisvergleich zithromax online consultation glucophage 850 mg information pastile cialis 20 mg levitra tabletas 20 mg priligy 30 mg hinta diflucan 150 mg torrinomedica cialis online toronto viagra 200 mg safe cialis generico 50 mg viagra 150 mg reviews lisinopril overdose 80 mg nudapest buy viagra cialis 20 mg presentacion diflucan 100 mg uses celebrex 200 mg costo zovirax 80 mg online viagra advertisement levitra 50 mg fiyati kegunaan doxycycline 100mg prednisone 20 mg breastfeeding viagra online cluj levitra generic40 mg generico priligy italia hydrochlorothiazide 25 mg tab reputable viagra online lexapro generic australia viagra 100mg duration levitra 40 mg mastercard buy pct clomid cheap cialis company generic viagra soft viagra clinic online take 2 5mg cialis generic viagra dangerous propecia brand buy kamagra 50mg india strattera drug online viagra 100mg substitute nakup viagra 25 mg propecia merck buy prescription lexapro online 3000 mg glucophage pfizer 50mg viagra viagra generico roma xenical 120 mg dzialanie cytotec order buy nolvadex london nexium 40 mg 14 tablets viagra generico foros clomid 50 mg tiw metformin 500 mg take propecia online hairlosstalk zithromax online europa nexium 2mgs buy cialis thailand zithromax 500 mg dosage 100 mg clomid results deutschland viagra generic trustworthy online viagra amoxil 12h 875 mg lexapro 5mg results cialis buy cheap propranolol er 120 mg viagra order malaysia viagra generico 25 mg lexapro generic insurance 20mg cialis review erfahrungen cialis 5mg harga celebrex 100mg viagra online 50 mg prix doxycycline 100 mg nexium 40mg night buy viagra phizer irbesartan hydrochlorothiazide 150 mg amoxil 500 mg contraindicaciones lexapro 5mg tablet viagra 25 mg dosis cialis generico opinioni kamagra 200 mg dose cheap kamagra de order cialis mastercard nexium generico 40 mg buy phenergan levitra lv online propecia 5mg order zoloft 50 mg indicazioni doxycycline buy dosage about 5mg cialis 1 cheap viagra order zovirax cream take 50 mg viagra lexapro 10mg price propecia 1mg 5mg bfp 150mg clomid two 5mg levitra levitra purchase generic medicament nexium 20mg efecto viagra 50 mg cheapest pharmacy viagra strattera 18 mg prospect lexapro generic info propecia generic pricing 20 mg viagra subsstitute generic levitra bad wellbutrin generic alcohol buy xenical pills propecia 1 mg 5 mg zovirax 200mg cena generic lexapro, w 40 mg generic levitra buy mardel tetracycline generic rx valtrex 100 viagra 100mg cheap kamagra 25 mg tel viagra generic iasi bali buying viagra buying online propecia viagra generic free cialis fc 10mg buy doxycycline 150 mg xenical venda online prednisone online pharmacy cipro 750 mg viagra 300 mg reimport levitra 20mg viagra generic legal metformin dosage 250 mg doxycycline 200 mg strattera 40 mg generic lexapro 5 mg engorda phenergan suppositories 25 mg purchase lisinopril online taking 4 5 mg cialis phenergan syrup online accident 40 mg levitra buy viagra ottawa cialis 2o mg cialis 40 mg sverige buy zovirax india celebrex 200mg indonesia mg viagra 325lb cialis forum mg lasix 20 mg torrino propecia generic nolvadex cialis 2.5 mg order online pink viagra bactrim 160 mg cialis diario 2 5 mg buy lasix injectable generic viagra silagra nexium 20 mg indicaciones viagra plus 50mg buy nexium us bronchitis prednisone 5mg propranolol 20 mg uses cialis price 10 mg sample generic cialis viagra 100mg einnahme beneficios cialis 2.5 mgs buy cialis disqus buy 10 mg lexapro generic vega viagra levitra generic dosage 100 mg prednisone viagra online cheap cialis 20 mg n1 start lexapro 2.5 mg viagra revieves online cialis generics 5mg cheap cialis weekender costco viagra 100mg buspar 10 mg reviews cost 120 mg strattera generico viagra dejavu precio nexium 20 mg 400 mg wellbutrin xl wellbutrin cost generic 380 mg gold viagra viagra 25 mg twice xenical online nz cipro 500 mg 3 days miami 10 mg cialis viagra 100 mg docpharm cheap genuine cialis cialis 20 mg gr zovirax generic tablets augmentin cheap cialis online american cialis 20mg vierteln xenical generico 500mg 30 mg of prednisone buy viagra scotland dapoxetine buy canada buying doxycycline vietnam valtrex 1000mg viagra 100 mg break buy cialis 50 mg pcos clomid 150 mg kamagra online buy pcos clomid 200mg levitra 20 mg foro wellbutrin generic lawsuit 20 mg of cialis 20mg cialis daily 50 mg viagra price doxycycline dosage 400 mg 5 mg lexapro withdrawal cialis 20 mg causas buy propecia msd price lisinopril 30 mg prednisone 90 mg amoxil 500mg uti 200 mg clomid online nolvadex d 20mg order kamagra jelly nolvadex 60mg pills online pils cialis bactrim 800 mg uti augmentin 625 mg posologie nexium online order 60 mg buspar nexium 40 mg ingredients kaufen viagra 25 mg celebrex 200 mg dosing zithromax 500 mg dose nexium online coupon bijwerkingen nexium 10 mg zithromax chlamydia order lasix 40 mgs vand cialis 20 mg 2013 about augmentin 625mg prednisone 15mg buspar dividose 15 mg augmentin 457mg pret kamagra 150 mg. lexapro 10 mg comprimidos buy zithromax cipro cyprus buy viagra buying viagra bali buy softtabs viagra hungary buy cialis celebrex 200 mg presentacion cheap cialis tadalafil pfizer viagra 250mg generic wellbutrin 142 diflucan 150 mg buy levitra generic cipla prednisone 15 mg day splitting cialis 5mg generic levitra
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 02, 2015, 06:32:50 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 1416 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: 7675



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



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



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