NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rayrip

Pages: [1] 2 3
1
Web Server - Ask For Help / Re: I need to modify the header before posting
« on: September 10, 2021, 03:34:43 PM »
Got it working... the CC vendor gave me the correct string.. it's an api key so
Postnet.SetAllHeadersDefault() 
Postnet.HeaderOnly = 0
Postnet.CustomHeader = 'api-key:' & clip(clearent_key)

I have a function called post_to_url that had to be rewritten for some stuff that capesoft changed. I can use it for posting almost anything now. Anyway, the api-key: did the trick.

2
Web Server - Ask For Help / Re: I need to modify the header before posting
« on: September 01, 2021, 08:34:49 AM »
I just need to put in the api key which is a string of 32 characters. I do not need to pass a username or password. This api key string is so the server knows who I am. It's for credit card processing. I'm posting and getting data back so everything is working, except I get an unauthorized error back because I didn't pass the api key. The cc company says I need to pass it in the header.

3
Web Server - Ask For Help / I need to modify the header before posting
« on: August 31, 2021, 06:29:30 PM »
I have to pass a single api key during the post. I am posting some json to a website and I'm actually getting the data back, which are errors that say it's unauthorized because I'm not passing the api key. I need to pass the api key (a 32 character string) in a header. I tried using this:
authString=apikey;authStringLength=len(clip(authString))
  Postnet.Authorization = 'Basic ' & NetBase64Encode(clip(authString),authStringLength)

and that didn't work. Tried Postnet.Authorization = Postnet.CreateAuthorizationString('',clip(apikey),Net:WebBasicAuthentication,true) and a couple of variations and that didn't work... which I didn't expect it to because it wants a username and password and that doesn't exist.

Hints?

Thanks,
Ray


4
Thanks Bruce.. and thanks for the link to the doc.

5
Web Server - Ask For Help / Adding my session variable to the xhtml
« on: April 28, 2021, 01:39:14 PM »
I'm in the PageHeaderTag When logged in. The XHTML that is in there already is

<div class="nt-left nt-site-header-logo"></div><h1>WebWrench - User: </h1>
This works.

However, my username is stored in  p_web.GetSessionValue('User') and I'm trying to figure the correct syntax to add it, or what I'm supposed to do.

I want something like: <div class="nt-left nt-site-header-logo"></div><h1>WebWrench - User: & p_web.GetSessionValue('User') & </h1>

Which I know is wrong...

TIA

Ray

6
Web Server - Ask For Help / Re: SetValue StoreValue
« on: April 28, 2021, 11:02:26 AM »
Thanks Jane, that worked perfectly. I must have been doing something wrong before.. I tried that originally but I probably had the syntax or the parameters wrong.

7
Web Server - Ask For Help / SetValue StoreValue
« on: April 27, 2021, 04:14:33 PM »
I just want to make sure I've got this right and won't cause problems. In the Webhandler for checking the password I've got that working and want to set levels so I did this if the password is good...

if pPassword=PAS:PASSWORD
    ReturnValue = true
    self.SetSessionLevel(PAS:PASS_LEVEL)
    p_web.SetValue('CustomerBrowseLevel','5')
    p_web.StoreValue('CustomerBrowseLevel')
    p_web.SetValue('CustomerEditLevel','7')
    p_web.StoreValue('CustomerEditLevel')

I am using p_web.GSV('CustomerEditLevel') in the security area of my form and it seems to be working. I saw a post where you said that SetValue is rarely used.. but that is the only way I could get my session values to work.


8
Web Server - Ask For Help / Re: Opening Files to get single record
« on: April 06, 2021, 05:35:36 PM »
I went ahead and called openFiles in the PreInsert 4 end embed code:

  do openFiles
  get(comptwo,1)
  loc:startnum=COM2:startnum+1
  com2:startnum=loc:startnum
  access:comptwo.tryupdate()

  CUS:CustomerNum=loc:startnum
  p_web.SetSessionValue('CUS:CustomerNum',CUS:CustomerNum)

Seems to work and this way it doesn't increase the startnum on a change record. Not sure why openFiles isn't called when changing a record?

As usual, I type the question and I get it figured out right after.. If anyone has a better way please let me know.
Thanks,
Ray


9
Web Server - Ask For Help / Opening Files to get single record
« on: April 06, 2021, 05:00:18 PM »
Hi,
I'm trying to get a field from a single record file (comptwo). This is the code right after the openFiles Routine:

  get(comptwo,1)
  if error()
    message(error() & 'After opening files')
  else
    loc:startnum=COM2:startnum
    message(loc:startnum)
  .

The code runs when I open the form if I am changing the record (and gets my field), but doesn't get run when I am adding a record.. which is where I need it because I need that loc:startnum for my customer ID# when adding a new record.

I've tried this under the preInsert embed... but the file is not open... should I just go ahead and call the openFiles routine in the PreInsert?

Trying to figure the proper way to do this so I don't cause problems elsewhere.

Thanks,

Ray

10
Web Server - Ask For Help / Re: next last buttons not working
« on: November 04, 2008, 01:57:36 PM »
Well, my bad on the next buttons... somehow I installed an older version of nettalk.. it's a miracle it worked at all. I was going to copy the dll and noticed it was from March... So, I reinstalled #17 and all is well.

I did however solve the dropdown list problem by getting rid of the include condition on both droplists and the hide conditions... so they're both there all the time, but it works, and for now that is fine.


Thanks,

Ray
VMT

11
Web Server - Ask For Help / Also, about the next buttons
« on: November 04, 2008, 12:45:21 PM »
Also, how to I get the next buttons to work in FF.. they work in IE, and they used to work just fine in FF.. nothing changed but the update, so I'm guessing I must have had something wrong in there to begin with?

Thanks,

Ray
VMT

12
Web Server - Ask For Help / Re: next last buttons not working
« on: November 04, 2008, 11:21:45 AM »
Good guess  ;D

I forgot to mention that... How can I display those fields (the dropdowns) when the person clicks on the radio's.. and if I can't do that, how can I just refresh the entire window... just as if I clicked on the original menu link (because that works). I really didn't want the dropdowns to display unless the person had chosen that particular sort (by using the radio's).

Thanks,

Ray
VMT

13
Web Server - Ask For Help / Re: next last buttons not working
« on: November 03, 2008, 05:48:44 PM »
I found out the next/previous/search buttons are working in IE... I normally use Firefox...

I got the radio buttons to refresh my browse... but they don't display the appropriate drop downs.

I have radio's: title, type, genre

If I select either one they refresh the movie browse in the correct order. But the type and genre need to be selected first (if they've selected that radio)... so when I select type, then the type dropdown should display and the movie browse should display appropriately... which it does if I click on the first menu item (on the left side of the screen).. which redisplays the entire browse, but correctly, because the radio buttons are global ... I tried setting the resets all over the place...

Anyone know the command to just redisplay the screen I'm On and where I would put it. I tried a few things and nothing happened.

If you'd like to look at it:
http://63.224.205.143/browsemovies_h.htm

This is a little older version, but if you click on the genre link on the left and try the radio's... you'll see that you have to click on the genre link again to get the proper display.

Thanks,

Ray
VMT

14
Web Server - Ask For Help / next last buttons not working
« on: November 03, 2008, 02:42:40 PM »
Well, I upgraded to patch #17 hoping the refresh browse would magically work... I did notice my item field is now a set length on the screen.. that is great.

However, I cannot get the browse to move forward by using the next button or the last button. It does not even search.

I call either the browse directly, or I call a form that has the browse in it, either way, the buttons no longer work. The form is a memory form that is supposed to let me filter by a choice of a radio button.. It almost works... If I select a radio button, then select the genre menu item (which is calling the form again), it refreshes and uses the variable selected...

But more important is getting the next/previous buttons to work..

Any idea's why that would break?

Also, when I first compiled the program there were about 4 buttons I had to delete out of the buttons in the main procedure.. like small copy and small print buttons. I got a field not found error for those... but the next buttons are still there.

Thanks,

Ray
VMT

15
Web Server - Ask For Help / Re: Calendar not working in my app
« on: August 21, 2008, 10:30:18 AM »
 :-\

Still can't get it right.

I put the code in:

Validate:insert start embed

  RES:RESERV_DATE=p_web.GetValue('loc:RESERV_DATE')
  !stop('REserve Date: ' & format(RES:RESERV_DATE,@d2))

 This gets the initialized value that was FIRST in the loc:reserv_date variable (I initialize it to today() + 1).

This code happens AFTER I have used the calendar to change the loc:reserv_date when I click on SAVE, as I witnessed by putting a stop or even without a stop, the reservation date is the original initialized date from loc:reserv_date.

For instance, I initialize loc:reserv_date to 8/22/2008.

in routines before generate form:
   loc:RESERV_DATE=today()+1
   p_web.SetSessionValue('loc:RESERV_DATE',loc:RESERV_DATE)



The form displays 8/22/2008. I use the calendar and change the loc:reserv_date to 8/23/2008. It displays 8/23/2008.

However, when I use the code above in my validate insert I get 8/22/2008.

One other piece of code that I had to put in there was an if statement that got rid of the code in the RestoreMem embed... the code there would always under every circumstance zero out the loc:reserv_date.

I did put the loc:reserv_date in the StoreMem embed and that does store it ok... the restore just doesn't work right.

I have put the code to get the loc:reserv_date in just about every embed.. and there is no where that it ever picks up the date that the calendar put into the field on the screen... or even if I just type in the date into the memory field... it is not memorized anywhere where I can find it.

It's like it's on the screen.. but doesn't get into the variable.

Is there any sample code anywhere that has an insert form with a date memory variable that is captured on the save and put into a field variable?

Thanks,

Ray
VMT


 

Pages: [1] 2 3