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.


Topics - rayrip

Pages: [1]
1
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


2
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

3
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.


4
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

5
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

6
Web Server - Ask For Help / Calendar not working in my app
« on: August 13, 2008, 02:29:55 PM »
I have one field that has a date. I tried web21 which are invoices and the invoice update works... I can't see what it is doing that I am not. I changed the field to a date field. I can change the date manually, but if I press the calendar button I get an error that says:

The Page at local http host says:
Error calling the Calendar: Parameter specified is not valid target control.

I have the calendarlookup.htm in my web folder. I see calendar2.js and 6 and their associated gz files.

Not sure where to go from here.

Help, hints, tips?

Thanks,

Ray
VMT

7
Web Server - Ask For Help / html all the time
« on: August 01, 2008, 04:00:23 PM »
The interesting problem I'm having is I am creating html so I can put in the tags for my procedures.. no problem doing that.. but, I can tell the program to call browse.html instead of just browse like from a menu and from a browse to a form or anywhere there is a place to call a URL.

But, many times when the program goes back, there is an assumption that is made and it calls the browse instead of the browse.htm.

What would be nice (and perhaps I don't know how to do it), is I setup in the browse (or form or whatever) the html version URL, so any calls made to that form or browse automatically attach the .htm. It could just be a checkmark and you just make sure that the html file is the same name as your procedure.

Anyway.. if there is a shortcut I'm missing, please let me know.

Thanks,

Ray Rippey
VMT Software

8
I have a form I've created and it has a save and a cancel button.

I want to put some code in an embed and check if I click on the save button to either call another form (so I can tell the user it is invalid) or just put a message on the form and display the message.

So for now, let's say I want to redisplay a message. I have one on the screen called reservestatus and the value starts out at 'Reserving Item'.

So I click on the Save button.. in my code I need to know how to do 2 things. One is redisplay the message.. without calling the reserveform.

Right now in the embed Validate Insert Start I have

 p_web.SetSessionValue('reservestatus','Problem Reserving Item!')
 loc:invalid='Problem Reserving Item!'

 I tried do value::reservestatus and I got some giant message at the top of the screen.. like bad html.

The way it is it calls reserveform (not reserveform.htm my html page that has the tags in it)... and does not update the reservestatus value.

I would just like to redisplay the reserveform.htm or just the one variable reservestatus and leave it at that. The docs say I can change the value and call do value::reservestatus.. but that doesn't work (probably because I'm doing something wrong).

The other option I suppose is just to call another form... but I'm really not sure how to do that on the validate embed?

Any hints at validation would be appreciated.

Thanks,

Ray
VMT

9
I looked at the sample with all the buttons (# 28) and it seems to allow the server side code on a browse with an 'other' button to work. However the docs say to not have a URL. Unfortunately the button I am clicking on is to go to a form (in the conditional display area) and I need to pass it some variables (not a form in the same file... a new record in a different file).

Anyway if I could just save the value for the row that I am clicking the button on things would be great. I am not calling a url directly but in the conditional area. I have 2 possibilities of buttons on the browse (in the same column). One will call my reservation form and one will call my waiting list form. This almost works, except I can't save the value field that has my id number in it for the row selected.

It seems to me that the server side click code should get called no matter what, and before anything else IMHO.

If that's not going to happen I need to find another place to capture the value field for the row when the button is clicked. I can capture that data if I click on another row first... but the first row data is not there because if it is already selected, clicking again does not call the ' clicked on the browse' embed.

Even if there were some sort of embed just before the URL (in my case the conditional display URL) is called I could probably get my Value (for me it's the item number). However I still think the server side code (under fields, Client-Side, Send button click to server) should be called no matter what

Thanks,

Ray
VMT

10
Web Server - Ask For Help / range limit browse with double key
« on: July 22, 2008, 12:35:02 PM »
I almost have it working but it's not displaying in the order that was setup in the table. I have a double key... class then title. I want to pick one class then see all the titles for that class, in title order.

I have a lookup that successfully select the class field and the browse displays the titles for that one class. However, it acts like a filter instead of a range because one, it's slow, and 2 the titles are not in order.

If I must code it by hand, where would I put the initializing set command?

Thanks,

Ray
VMT



11
Web Server - Ask For Help / Problem displaying data on an htm page
« on: July 15, 2008, 11:54:13 AM »
If I just call the form as is it displays the prompts and the data (display only). However, if I call the html page I created then the form does display, prompts, text (but blank), and no data fields.

I tried adding in the obsolete <!-- Net:c:Body --> which didn't display any data (but did make a difference as my page got longer... so there is code that is still doing something with that tag). I'm using MS Expressions to create the html code.

Anyway, I'm pretty sure I've got the tags in correctly... here is the html code (by the way it doesn't matter if I take out the message tag or leave it in):

<!-- NetWebServer -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Net:c:Head -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>View Movie Information</title>
<style type="text/css">
.style1 {
   border: 2px solid #800080;
   }
</style>
</head>

<body>

<table style="width: 100%; color: #00FF00;" cellspacing="3" cellpadding="3" align="center" class="style1">
   <tr>
      <td><!--Net:Message-->
<!-- Net:inv_view -->&nbsp;</td>
   </tr>
</table>
<!-- Net:c:BodyEnd -->
</body>

</html>

Pages: [1]