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 ... 714 715 [716] 717
Web Server - Share Knowledge / Temporary Files start with $$$
« on: June 26, 2007, 01:27:58 AM »
Hi all,

TIP: If you are generating a temp file, that is created, sent to the browser, and then needs to be deleted (in other words it will only be served _once_) then start the name with $$$. eg

The web server will automatically delete files that start with $$$ as soon as they are served.

This technique is used by the graphing template and the report tempate, so you'll notice that the PDF files generated and the PNG files generated by these templates both start with $$$.


Web Server - Ask For Help / Re: Session Variable Question
« on: June 26, 2007, 12:59:38 AM »
Hi Alan,

As long as the variables are THREADED you can use them. Because basically that means that at the start of each thread they are set, and exist (and are "local") for the life of that thread.

So (a) make sure they're threaded.

Then (b)

In WebHandler procedure
.ProcessLink method
Before parent call

GLO:FileName_CUS = p_web.GetSessionValue('userpath') & '\Customer'

Where "userpath" is something you set when the user originally logged in.


Web Server - Ask For Help / Re: Cell phone browsers
« on: June 26, 2007, 12:55:46 AM »
Hi John,

If you watch the server side screen, and you clear the log (so it's easy to spot) - does anything happen when the cell user clicks the login button?


Web Server - Ask For Help / Re: How do I refresh NetWebPage
« on: June 26, 2007, 12:54:40 AM »
Hi Alan,

why do you need to refresh the "form" part of the page?
is that gonna change? Perhaps you just need to refresh the "browse" part?


Web Server - Ask For Help / Re: IE6 and png Images
« on: June 25, 2007, 12:49:49 AM »
Hi Kevin,

IE 6 does have some problems with PNG's.
In the short term there's not an awful lot you can do about it. There is some code in NetTalk that can help (in some cases) but it doesn't work if the image is "hidden" as the page opens.

One option is to not use PNG, but use GIF - but of course GIF has only "hard" transparencies, and has a limited palette.

On the up side, IE 7 is an "automatic upgrade" for IE 6, so IE 6 folks should be encouraged to use it. Apart from anything else it's more secure.


Web Server - Share Knowledge / Re: Licensing and javascripts
« on: June 25, 2007, 12:44:16 AM »
Mozilla and BSD are great.
So is "public domain".

LGPL should be fine.

GPL is not so good. (As it would make your whole clarion app open source)

Bottom line - if in doubt write to the authors and ask. There are a couple DHTMLGoodies things in NetTalk, I wrote to them and they gave permission for us to use it.


The Rest - Ask For Help / Re: MOdifying StyleS
« on: June 25, 2007, 12:39:25 AM »
Hi Nick,

Further to what John said, if you haven't already check out FireBug (in firefox go to and install firebug from there.)

This allows you to "inspect" your site at runtime, and make changes on the fly to the styles to see the effect. It doesn't save the style, but it's easy to move your changes back to the CSS when you're done.

I'm planning a doc on changing CSS in the not too distant future.


News And Views / NetTalk 4.26 released
« on: June 21, 2007, 10:48:32 PM »
Hi All,

NetTalk 4.26 has been released.
Download your update from

New documentation index can be found here

Release notes:
# NOTE: the latest Web folder is installed to \clarion6\3rdparty\libsrc\netweb
Copy this to your application folder after installing the NetTalk update.

# Add: Support for Legacy report procedures, and (I think) CPCS report procedures. See example.

# Add: Forms now have a variable, loc:act which is set to either InsertRecord, ChangeRecord or DeleteRecord. Expressions can use this to determine current form action.

# Add: Ability to override CSS class for Prompt and Comment for individual form fields.

# Change: Made blank tab headings more visible in list of tabs.

# Change: .SetSessionPics, and .SetPics methods have been retired. Replaced with SetPics routine in form.

# Add: Translation for the "Locate" prompt can be set in WebServer procedure, Advanced tab.

# Add: Embed point into menu routine.

# Add: New Short-hand method names, GSV and SSV for GetSessionValue and SetSessionValue respectively. Use either short, or long form.

# Add: GetSessionValueLength method to return length of Session Value.

# Add: GetValueLength method to return length of parameter in Value queue.

# Add: New examples, 38 (Legacy) and 39 (LegacyReports) added.

# Update: Chrome menu script updated to version 2.01

# Reorganised docs a bit.

# Fix: Could generate code for "SmallOtherButton"

# Fix: "highlighted record" problem when Last or Previous pushed.

# Fix: Values getting dropped when a lookup is done.

# Fix: DATE and TIME data types were being treated as Alpha, not Numeric.

# Fix: For time fields that were > 12:00, but didn't include am or pm.

# Fix: Handled empty packets (with just a header) sent from a NetWebPage. Typically when sending a PDF or other static file from a NetWebPage.

** Those Who attended the World Tour, and added code to work around this issue can now remove the work around code **


Web Server - Ask For Help / Re: Multiple selects from 1 button
« on: June 21, 2007, 10:29:46 PM »
Hi Chris,

>> I have a droplist with three items (account type) and depending on which option is selected in the drop list I need to use a different select screen for another field (account number) as their are 3 possible source tables for the same number, depending on type.

Set the URL for the lookup to be a session variable. ie instead of
'browseAccounts' use p_web.GetSessionValue('lookupAccounts')
Then when the drop list changes change the value in LookupAccounts AND remember to "reset" the Account Number form field.

>> Also I need to make validation on entry and display the correct description. I assume I can just say send new value to server on the drop list and the correct value for account type is stored in the session queue for me to use.



Web Server - Ask For Help / Re: Conditional SSL
« on: June 21, 2007, 10:25:57 PM »
Hi John,

See example 8.
Basically you end up with 2 server objects in your Web server procedure, one listening on port 80 (unsecure) and one on port 443 (secure.)

But they share a common WebHandler procedure. So there's almost nothing for you to do except add the extra server object.

tip: if you have static files that must only be served over the secure connection then place them in the 'secure' folder.

tip: if you have pages that should only be viewed on the secure connection then tick on the option on the advanced tab.


Web Server - Ask For Help / Re: Images in a browse
« on: June 21, 2007, 10:23:03 PM »
Hi Steve,

One point to clarify regarding Mike's reply:
If your images are in the images folder then you need to include that in the name. ie

Nick's approach also works.


Web Server - Ask For Help / Re: Session Variable Question
« on: June 21, 2007, 08:41:31 AM »
Hi Mike,

The embed point to use, to set the connection string for tables, is in the WebHandler procedure.

Use the .ProcessLink method, before the "parent" call.

Typically at this point you'll want to check a Session Variable (usually set when the user logs in) to determine what the connection string should be.


Web Server - Ask For Help / Re: Chaining multiple pages?
« on: June 20, 2007, 11:00:57 PM »
Hi Lan,

Nope, this is not easy, indeed I'm not convinced that it's even possible.
Others should feel free to suggest alternate ways as well.

Your browser does the asking, and the server does the serving. The server cannot "force" stuff to the browser. Thus if the browser asks for the PDF they get the PDF, if they ask for the instructions page, then they get the instructions page.

From what you've described I think I might try somethign like this;
a) create a netwebpage, with nothing but a FrameSet extension. Use the extension to break the page into 2 frames, let's say a top and bottom frame.
b) set the default url for the top to the Instructions page, and the default url of the bottom to the PDF page
c) create a separate Instructionspage procedure (or static htm).

Then when the user clicks on the URL to get the report, make sure it's the Framepage (created in (a)) that the URL points to.

That may well do what you are chasing, and keeps the instructions, and report together.


Web Server - Ask For Help / Re: How does validation work?
« on: June 20, 2007, 10:56:07 PM »
Hi Chris,

There are 2 distinct times when validation can occur.

1) as the field is entered

2) as the form is completed.

I think you're mixing the two up a bit.
Loc:Invalid is only used in the latter

However it's correct to say that fields must be validated when the form is completed - and they _may_ be validated when the user enters them.

I'd need to see an example to determine why the erroroneous field was not colored correctly.


Hi Gerald,

Check out example 31
Update Customers procedure.
There are 2 drop down's there which should be doing what you're looking for.

The thing you are dropping down, is the unique identifier a string, or a numeric?

If a numeric then it should be 0, not ''.

I'll test here using a string and see if that's the issue.


Pages: 1 ... 714 715 [716] 717