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 - Bruce

Pages: 1 ... 730 731 [732] 733 734 ... 736
10966
Web Server - Ask For Help / Re: Track operator activity
« on: August 01, 2007, 12:11:56 AM »
Hi Rhys,

There are 2 approaches to this.
The first is to put a "timer" into the web page so that you can see the timer, and work from there.
This is a bit icky though. Firstly you're generating extra traffic, and of course it doesn't tell you if the user just left their browser on that page overnight.

A better approach is to make use of the Session Queue. By querying this at regular intervals you can take "snap shots" of who is online, and who is not.

Better yet, all you really need to trap is
a) when the user logs in and
b) when he either logs out, or the session automatically terminates.

The first part is easy to do (since you have to manage the login anyway).

The second bit is also easy, if a bit cunning.

the WebServer procedure contains an object based on the NetWebServer class. So in this is a method called _DeleteSession.
This method is called whenever a session is deleted (meaning it has been inactive for a period of time). So in this method, before the parent call, you can add any code you like.

At that point you've got to be a bit careful, because you're working inside the server (which is shared.) Plus the normal GetSessionValue changes to _GetSessionValue so the code would look something like this;

err Long

  x = self._GetSessionValue(p_SessionID,'whatever',err)
  if err = 0
    ! do something with x
  end

cheers
Bruce

10967
Web Server - Ask For Help / Re: Notify app frame from web server?
« on: July 31, 2007, 11:57:23 PM »
Hi Tony,

Ok, so your menu item has a URL - probably a NetWebPage procedure name or some thing like that.

It can of course be the "front page" - as in "I'm looking at the main/index page, and I click the URL, and it takes me to the page I'm looking at."

You can also add a parameter to the URL. For example
'index.htm?Notify=yes'

Then in that netwebpage put something like this :
if p_web.IfExistsValue('notify')
  NOTIFY etc etc
End

Cheers
Bruce

10968
Hi Greg,

Not so easy to do unfortunately.
This would require code executing asynchronously after the comment has been sent to the server. At the moment it can only send data, not code.

Also, depending on speed, they _might_ already have typed some letters in the new field so changing focus asynchronously might be a bit disturbing to the user.

Cheers
Bruce
 

10969
There's a method called "Escape" which will do this for you.

So if you have a string (let's call it Fil:Name) and you want to use it as a URL, and it might contain icky characters, then do

p_web.Escape(fil:name)

Some other methods that might be useful :

p_web._noColon: removes colons from variable and procedure names. This is necessary because HTML doesn't allow colons in variable names. You'll see this method called for you a lot by the template. You shouldn't need to use it yourself unless you are doing fancy hand-coded things.

p_web._jsok: data passed to the browser has to be valid XHTML. This is especially true of stuff passed asynchronously (like a browse update). the _jsok method encodes characters that would break the XML. (like \ or < etc)

cheers
Bruce


10970
Hi Bram,

The second part of the question is the most important.

>> After that I want to chain to a Net:webpage

Remember the server can't "push" pages to the client. The client has to request them. The requests are either GET's or POSTS.

With that in mind, the Button _has_ to have a URL - the URL of the page you want to go to.

Since the Save button will do this, I reckon it's probably best to put that back.

If you want to embed code, triggered by the save button, then put it int he ValidateAll routine in the form.

cheers
Bruce



10971
Web Server - Ask For Help / Re: LOC:Required
« on: July 22, 2007, 10:32:59 PM »
hi Rene,

The only way to do it at the moment is edit the line in
netweb.tpw

Loc:Required = 'Required'
to
!Loc:Required = 'Required'

I've put it on the list.

Cheers
Bruce

10972
Hi Bram,

Make a form, let's call it "Form A". Memory form, no Save or Cancel button,  Formstyle set to none.

It has 1 field, the browse.

then for the form field (the browse) - client side tab, Send new value to server - and so on.

Cheers
Bruce

10973
Web Server - Ask For Help / Re: Call a routine from a browse button?
« on: July 18, 2007, 11:53:30 PM »
Hi Gregg,

>> Note: have not upgraded production machine to latest version due to problems with chromemenu display problems in fixed width static page.

There were some ChromeMenu fixes in 4.28 so it might be worth looking into that. If you're still having a problem though please send me an example.

Yes you can add a button to a browse. And yes, you can send an email from that button. (well you can do anything really.)
what's your time-scale for this? I'm hoping to have updated examples in 4.29 for browse buttons, which I think will make explaining it a bit easier.

Cheers
Bruce


10974
Web Server - Ask For Help / Re: Client Side options on Form
« on: July 18, 2007, 11:47:20 PM »
Hi Bram,

Can you explain in a little more detail...

a) does the feature work sending a text field to the same form?

b) what do you have in mind with sending it to another form? Do you want the initial form to "complete" when they change the text field?

Cheers
Bruce

10975
Web Server - Ask For Help / Re: SendMail
« on: July 18, 2007, 01:26:03 AM »
Hi Kevin,

there are 2 kinds of mail server in the world. Those that require authentication to send a mail, and those that don't.

For the ones that do you must set .authuser and .authpassword properties.

For the ones that don't you must _not_ set these properties.

Unfortunately there's no way to really "know" which one you are talking to, so most systems get the user to specify - as in "my mail server requires me to log in to send mail".

Cheers
Bruce

10976
Hi Bram,

The answer to this is non-trivial. It is in fact quite complicated to do this sort of thing.

I presume you are not deleting from a browse? 'Cause there is already a popup that happens there...

Cheers
Bruce

10977
Hi Greg,

This approach isn't going to work, because the tags are only evaluated outside the browse loop, so in effect they will all get resolved to a single value, which is the last one you set it to.

So what you'll need to do (since you're inside the loop) is use the actual file fields.  For example;
... subject=' & clip(inv:id) & ' ...whatever

Cheers
Bruce

10978
Web Server - Ask For Help / Re: SSL Private key
« on: July 16, 2007, 10:39:33 PM »
Hi Stan,

The secret is sometimes in the "contents" of the key file. Keys come in various flavors, and can contain multiple parts.

Use notepad to open the one that works, and see what's inside.

Then use notepad to see if you can find the same sections in the other key.

Just changing the file extension isn't the right thing to do, often you have to "extract" one bit from inside the supplied key. It's all text though so you should be able to follow what I mean.

Cheers
Bruce

10979
Hi John,

It should return to the record they just added.
Any chance you can duplicate this effect with one of the examples? Or send me an example?

Cheers
Bruce

10980
Web Server - Ask For Help / Re: Color browse column headers
« on: July 15, 2007, 11:06:52 PM »
Hi Drew,

Yes you can do it by creating your own CSS file, and using this for your browse colors instead of the default one.

I'm busy writing up a doc on how to do it.

Cheers
Bruce

Pages: 1 ... 730 731 [732] 733 734 ... 736