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 ... 728 729 [730] 731 732 ... 744
10936
Looking To Hire / NetTalk Consulting
« on: November 28, 2007, 11:53:49 PM »
Hi All,

I got the following request today.

<< We run a Clarion billing application (developed by another company), and want to make some data from the underlying tables available online. Can you refer us to a company or consultant that knows / uses NetTalk, and so can efficiently help us get this running. Many thanks.

Sounds  simple enough so those who want to work for cash please email him at
scott
at
alarmbills
dot
c o m

Cheers
Bruce

10937
Hi Mike,

I need to update that FAQ a bit - it's a bit out of date.

The short answer is to use Session Values, not Values - then the filter keeps working ok.
I think I've updated the example called DropFilter to use the correct technique...

Cheers
Bruce


10938
The Rest - Ask For Help / Re: Fetch in a loop
« on: November 28, 2007, 03:02:31 AM »
Hi Oeb,

The procedure is always asynchronous. (The "open" can be synchronous, but it's recommended that that too is asynchronous).

So you can't call "fetch" in a loop.
Rather call fetch
then in ErrorTrap, and PageReceived, call Fetch for the next item.

Cheers
Bruce

10939
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 27, 2007, 02:06:38 AM »
Now for the "tickling" question.
And the answer is, at the moment, "I'm not sure".
I haven't had much of a chance to look into this just yet.
I'll try and work up an example later this week.

Cheers
Bruce

10940
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 27, 2007, 02:04:38 AM »
Hi Simon,

First the URL question.

yes, that's one way to do it. Another is to pass the sysid as a parameter rather than as part of the actual url name.
for example
http://someservername/unsubscribefromsomelist?id=9873546

Then you'd have a function (called just unsubscribefromsomelist) and inside that function you can get the value of the parameter using
p_web.GetValue('id')
This function would need to be a "page" function - ie one that returns a page (ie not NetWebSource).

Cheers
Bruce
 

10941
Web Server - Ask For Help / Re: problems with auto-redirect to login page.
« on: November 27, 2007, 01:48:04 AM »
There are a couple ways to do this ...

Here's the most "generic".

LoginFormProcedure
GenerateForm routine
Before <Form> Tag embed point

Set loc:formaction and loc:formactiontarget
For example

loc:formaction = 'indexpage'
loc:formactiontarget = '_top'

Cheers
Bruce

10942
Web Server - Ask For Help / Re: WEB SSL Certificates
« on: November 27, 2007, 01:40:17 AM »
Robert here says he used one recently with one of our sites, and he's very happy. The system for getting one was slick and seemed to go fine.
Apparently he did the "free" one as a test. It's only valid for 3 months but is working nicely so far.

No idea on the different options - normal, pro etc.

Yes any port should be fine.

cheers
Bruce

10943
Web Server - Ask For Help / Re: 4.30 calendar bug
« on: November 27, 2007, 01:34:02 AM »
thanks Alan - I've fixed that - I'll include the fix in the next build.

Cheers
Bruce

10944
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 22, 2007, 12:59:08 AM »
Hi Simon,

yes, well done!

Since the name is in the URL, you can sometimes get the name "right" when the URL is created. Then handle the "complex" URL generically in the WebHandler, _SendFile method.

Not really "messy" - just right.

This doesn't always work (sometimes you don't know, and can't calculate, the correct name when the URL is created) but when it does work it's sweet!

Cheers
Bruce

10945
Hi Mike,

Not sure where I advised against Page-Loading - I usually advise _for_ page loading. I use it all the time myself.

Navigation usually breaks when what you send back is not valid XHTML. In version 4.30 there's a lot more "behind the scenes" to protect you from invalid XHTML, but if you put your own XHTML into the browse, and it is invlaid, then the navigation will fail.

Cheers
Bruce

10946
Web Server - Ask For Help / Re: File Lookup
« on: November 20, 2007, 05:23:10 AM »
Inside the LoadRelatedRecords routine load the record you want.
Then push the fields into the session queue. You can do just the fields you want, or the whole record.

For example;

usr:id = 5
Get(User,usr:key)
p_web.FileToSessionQueue(User)

Then on the form just use the usr:name field as a normal form field. I guess you'd probably make this a Display field, because obviously editing it won't do anything in this situation.

Cheers
Bruce

10947
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 20, 2007, 05:17:51 AM »
Hi Simon,

>> 1. What types of procedures are automatically handled by the WebHandler? It looks like NetWebForm, NetWebPage etc always get in there but I don't understand how in example 14 'MailboxesReportWithOptions' (a Report) gets into the list.

All the "page" style procedures get here. Reports get added because of the NetTalk extension to the report. NetWebSource procedures are not called here because they're designed to be "included" on pages, not be actual pages themselves.

>> In particular, I wanted to use a simple source procedure, prototyped (NetWebServerWorker p_web) and containing the magic p_web._Sendfile(). I ended up putting some handcode into theWebHandler so it would "serve the procedure". Must be the wrong way?

Start with a NetWebPage, not a NetWebSource.
There are a few examples that show embedding in a netWebPage - and from here you can do pretty much anything you like. I think the File Download example is a good place to see this in action.

>> 2. How do I put some simple text on a tab on a NetWebForm (some "notes" for the user)?

There's a "Display" form-field type. You can display text, URL's, images, buttons and so on.

>> 3. When using p_web._Sendfile() is there a way to override the url being used as the filename? What I mean is my excel file always opens as "StockListToExcel.xls" based on the server procedure name - I'd like to change it to "Client Name dd_mm_yyyy.xls" (for example).

nope, you can't do this. The _browser_ determines the name, not the server. ie the Browser "asks" for a file, and it always does the save-as with the name it asked for. There's no way for the server to say "hey, you asked for a.xls, but actually I'm sending you b.xls instead".

cheers
Bruce

10948
Web Server - Ask For Help / Re: Restrict Access to certain pages
« on: November 19, 2007, 07:16:40 AM »
Mike,

Every user who connects to the server initiates a session. This session exists regardless of whether they are logged in or not.

Each session can be set as "logged in" or as "not logged in".
To change the setting for a session use
p_web.SetSessionLLoggedIn(true) or
p_web.SetSessionLLoggedIn(false)

there is an alternative method
p_web.ValidateLogin() which is eactly the same as
p_web.SetSessionLLoggedIn(true)

When the template has the option "user must be logged in" then it adds a line of code

  If p_web.GetSessionLoggedIn() = 0
    Return
  End

thus preventing the procedure from running.
Depending on the situation the login screen may be displayed automatically.

Cheers
Bruce

10949
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 19, 2007, 07:11:28 AM »
>> Could someone briefly explain the steps to send a file (it's a spreadsheet) to client browser?

The browser asks for something. Always, the browser is the one doing the asking.
A spreadsheet is just a file, so if the browsers asks for the file, you can send it the file.
Typically asking for the file is as simple as clicking on a URL.

>> I see example 14 pushing a pdf but can't see how/why it works.

magic...

The browser requests MailBoxesReport. It has no idea what this is, or what it's going to get, but that's what it's told to ask for.

This passes through the WebHandler procedure, which directs it to the MailBoxesReport Procedure. In there a report is generated, and converted to PDF. The pdf file is written to disk, and the sent back to the browser (using p_web._sendfile).
Noe that the browser asked for a file, and it got one. That's all that matters.
The Content-Type of the file being sent back is set to 'application/pdf'. By doing this the browser can decide whether the file can be opened (which it will always try to do) or whether it should ask the suer if they want to save it.

>>  It also seems the file is deleted after it's sent - is that correct and what triggers it?

yes that is correct. Files starting with $$$ in the name are designed to be "serve once" files and are deleted after they're sent. This is useful whenever you are building a "temporary" file to be sent to the user.

>> Also, is it possible to do more of a filedialog/save kind of thing?

yes. By altering the content-type to something the browser doesn't recognize. But I think I need to write up a separate article for that.

Cheers
Bruce

10950
News And Views / Re: NetTalk Version 4.30 pre-release 3 available
« on: November 16, 2007, 05:37:28 AM »
Hi Guys,

Pre-Release 3 is now up. This will hopefully be the final pre-release before the final version of 4.30.

Thanks to all those lads who are giving me feedback on the pre-release builds.

cheers
Bruce

Pages: 1 ... 728 729 [730] 731 732 ... 744