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 ... 704 705 [706] 707 708 ... 735
10576
Web Server - Ask For Help / Re: html all the time
« on: August 11, 2008, 10:26:15 PM »
Hi Ray,

In the browser, if you right-click on the error window, and choose Source (View Source), then you should be able to see the name of the file it was asked for.

In which directory is your reservebad_h.htm page?

Cheers
Bruce

10577
Web Server - Ask For Help / Re: How to really time out
« on: August 10, 2008, 10:13:03 PM »
Hi Mike,

You're thinking of your app as a Program - and it's not a program it's a web site.

When you click on a link in the browser, that request is passed to the site.

All the timeout has done is delete your session. so effectively when you click on a link you are starting a new session.

Browses, Forms, Menus and so on can all be set to "require login". If you go to one of these and you need to login, then you'll be redirected to the login page. So make sure that what you _need_ to be logged in for, is set to be "require login". You can set this on the procedure itself, or on the template settings for the Web Handler.

Cheers
Bruce
 

10578
News And Views / Re: NetTalk Pre-Release version 4.31 PR 10 available
« on: August 08, 2008, 10:20:29 AM »
Ok, PR10 is up.
I'm running out of things to fix - If I've forgotten something please let me know.
(I'm talking specifically about _bugs_ here, not features.)

I need to update the docs in a big way, especially the template docs, before 4.31 goes final.

Cheers
Bruce

10579
A while back there was a thread, possibly more than one, requesting that after inserting a record, to a SQL backend, the browse should highlight the most recently inserted record.

The reason it doesn't work is because if you are using a server-side auto-incrementing key, then immediately after the insert the auto-incrementing-key-field is unknown.

We solve this (in version 4.31 PR10 and later) by doing an immediate SET & PREVIOUS - which will work almost all the time except when 2 users add a record "at the same time" and by "at the same time" I mean within a few thousandths of a second of each other.

There is a file driver solution documented here
http://www.softvelocity.net/community/blogs/clarion_6_tipstricks/archive/2006/03/09/701.aspx
But it only applies to build 9051 and alter, and I'm not having much joy making it work in my current Clarion build (9058) with MsSql 2000.


Cheers
Bruce

10580
Web Server - Ask For Help / Re: Required field issue
« on: August 07, 2008, 11:09:12 PM »
Hi Brian,

The validation (field required) would typically be done when the form is Saved.

Since your button is not the Save button, the validation isn't occurring.

You could add _extra_ Save buttons to the form if necessary - but they would need to be constructed very carefully. So if you need to do this, then let me know.

Which I suppose begs the question - why you're not using the standard Save button, but another button.

Cheers
Bruce

10581
Web Server - Ask For Help / Re: Server Connection Failed
« on: August 07, 2008, 10:43:53 PM »
Hi Greg,

The FireFox tip is here:
http://www.nettalkcentral.com/index.php?option=com_smf&Itemid=36&topic=467.0

There's also a thread somewhere (alas I can't find the link at the moment) which recommends not putting 2 web servers on the same window. (As is typically done when one server is SSL, and the other is not). There were some machines (browsers) which got an SSL error when you did this. I'm not sure if this is applicable in your case (the error doesn't look the same).

Lastly - you're still on version 4.24, which was a good build, but beware of getting too far behind. 4.30 is the current "official" build, and 4.31 is nearing release as well. The further behind you get the more likely there are to be "difficulties" upgrading. All these version-to-version issues (and to be fair there aren't many) are documented in the Version History.

Cheers
Bruce

10582
Web Server - Ask For Help / Re: Strange Firefox 3 Behaviour
« on: August 07, 2008, 10:37:41 PM »

10583
Web Server - Ask For Help / Re: Potential vulnerability
« on: August 05, 2008, 12:22:40 AM »
Hi Murray,

This technique goes by the rather fancy name of "HTML Injection".

By default NetTalk "encodes" form fields which the user enters, so that you can _see_ what they entered, but it doesn't _run_ what they entered.
In other words, by default, NetTalk is secure.

However, if you tick on the option "allow xHTML" for an entry field (and _specifically_ if you're not using the WYSIWYG HTML editor on the field) then NetTalk does not encode what the user enters.

Obviously if you want the user to add _some_ HTML, but not "bad" HTML, then you need to parse what they enter, and selectively remove stuff.

Cheers
Bruce

10584
Web Server - Ask For Help / Re: html all the time
« on: August 01, 2008, 10:32:22 PM »
Hi Ray,

I don't understand the question completely. But perhaps this will help.

In the web, you never go back. You only ever go forward. when you go from a browse to a form, you go forward. When you click on the Save button on the form, you go Forward (to the browse). And so on.

Sure you can set the URL for the save button to use, but I don't think this is your problem somehow...

Perhaps you could post a small example for us?

Cheers
Bruce

10585
Web Server - Ask For Help / Re: Can SessionID go in a URL on a button
« on: August 01, 2008, 10:20:42 PM »
Hi Brian,

You're on the right track. You've just got too much stuff on the line. Try

BrowseOfficers?<!-- Net:s:SID-->

Cheers
Bruce

10586
Web Server - Ask For Help / Re: validate delete from a browse
« on: August 01, 2008, 05:37:12 AM »
Hi Kevin,

The PreDelete routine in the form is the place it _should_ go.
However it has been a long while since I played with the Delete code, so I won't swear to it.

Ray's issue is different - in his case he has a multi-component key.

Cheers
Bruce

10587
Hi Mike,

The short answer is no, it's not a problem for browsers.

The slightly longer answer is that, from time to time, I feed the examples to the Validator and tidy up whatever I can. I don't think it's ever been _completely_ complaint (there are some button naming issues I need to sort out) but there are no "really bad" things as far as I know.

Cheers
Bruce

10588
Web Server - Ask For Help / Re: track incoming IP address
« on: August 01, 2008, 05:31:13 AM »
Hi Kevin,

Mikes explanation is great. I can add very little except to say;

you can get the IP of the current request using
p_web.GetSessionIP()
Thus anywhere you are currently logging stuff, you can add the IP number of the client to your log.

Cheers
Bruce

10589
Hi Ray,

Let's start by covering a couple of bases, then move on from there.

a) Validation can happen at several points during the Form. There's what I call "immediate validation" where fields are checked, as they are entered, and there's also "before save" validation which happens after the save button is pressed.  Although the two are both doing valuation, the approach to "how to fail" is quite different. (hold onto this thought for a moment and we'll come back to it...)

b) The URL on the SAVE button is set when the form is _generated_. Also put the "everything was ok" URL in here. Typically when validation fails, it remains on the current form. So the Save URL is the "where to go when validation passes" link.

c) The recent pre-releases of 4.31 contain some extended (better) support for Immediate Validation, and an example, so if you're wanting to do immediate validation then perhaps work with this.
http://www.capesoft.com/ftp/public/prerelease/index.htm

For purposes of your question I'm gonna assume that we'll add some validation after the user presses Save. If the validation fails it will return to the form, if it succeeds it'll proceed to the URL you've set for the Save button. For now I won't discuss Immediate Validation.

The Validation you are going to add will take place in the ValidateRecord routine.  You could use ValidateInsert and ValidateUpdate, but ValidateRecord covers both the Insert and Update cases.

here you add what ever code you like to _test_ whether the form is valid. It's also one of the very few places where you can access File Variables directly (eg cust:invoicenumber) - but for non-file-variables you should use p_web.GetValue('whatever')

If the record is ok, you set nothing, and the server proceeds to the URL specified by the Save button.

If the record is not ok, then you set 3 things;

    loc:invalid = 'Loc:Login'
    p_web.SetValue('retry','LoginForm.Htm')
    loc:Alert = 'Login Failed. Try Again.'

The first is loc:invalid. Set this to the "name" of the invalid field. (This will provide a visual indicator to the user, and also set the cursor to the right place.) Notice the quotes, the name is in a string.

The second is the "retry" parameter. This (by default) contains the name of the form procedure, however in your case you want to set it to match the "current web page htm file name". This is the direct answer to one of your questions, by setting the retry parameter you can specify the URL it goes to now that it has failed.

The 3rd item is loc:alert. Whatever string you put in here will appear in red (which you can override) on the form as it appears. It will also (by default) appear as a popup on the client computer. This is all overrideable, but we'll worry about that later.

Cheers
Bruce

10590
News And Views / Re: NetTalk Pre-Release 9 version 4.31 available
« on: July 28, 2008, 06:37:33 AM »
We're closing in on a candidate release with this one.

Cheers
Bruce

Pages: 1 ... 704 705 [706] 707 708 ... 735