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 ... 733 734 [735] 736
11011
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.

cheers
Bruce

11012
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 www.getfirebug.com 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.

Cheers
Bruce

11013
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
http://www.capesoft.com/accessories/downloads.htm#nettalk

New documentation index can be found here
http://www.capesoft.com/docs/NetTalk/NetTalkWebFAQ.htm

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

Cheers
Bruce

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

yes.

Cheers
Bruce

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

Cheers
Bruce


11016
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
'images/active.gif'

Nick's approach also works.

Cheers
Bruce

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

Cheers
Bruce

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

cheers
Bruce

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

Cheers
Bruce

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

Cheers
Bruce

11021
The Rest - Ask For Help / Re: HTML help using NetTalk.
« on: June 19, 2007, 11:52:06 PM »
Hi Scuzzi,

Ok, so you have a normal Windows 32 bit program, using HTML help right?

And these HTM files are usually on the web - but now you'd like them to be local. Right so far?

Well, no, you don't need NetTalk. What you do is
a) include the HTM files with the install
b) set your embedded URL's to point to the local disk, instead of the web OR
Use File Explorer to open, and display the HTML files directly inside your application.
http://www.capesoft.com/accessories/fileexplorer.htm

Cheers
Bruce


11022
Web Server - Ask For Help / Re: Filters again
« on: June 19, 2007, 11:46:08 PM »
Hi Steve,

Firstly, global variables are a serious no-no. remember the web server application is being shared by many users at the same time, so the global variables are being shared by them all as well.

If your global variable is THREADed then it'll basically be blank all the time because everything happens on it's own thread. (even various routines in the same procedure, which also makes locals somewhat useless). If the globals are not THREADed then you will quickly encounter contention issues which will result in weird behavior.

So what you need to use are Session variables. Set them wherever you want to, and use them wherever you want to. They "belong" to one user. So you can treat them as "globals" but they belong to just one user.

For a filter, the classic construction looks like this

'TRI8:CustomerCode=' & p_web.GetSessionValue('GLO:CustCode')

IF Customercode is a numeric. IF it's a string then it looks like this

'TRI8:CustomerCode= <39>' & p_web.GetSessionValue('GLO:CustCode') &'<39>'

(all on one line)

Presumably elsewhere in your app (maybe on a web form, or in hand-code) Glo:CustCode has been set to something.

Cheers
Bruce


11023
Web Server - Ask For Help / Re: Two Inserts
« on: June 19, 2007, 11:39:37 PM »
Hi Stan,

Autonumbering is handled in 2 different ways.

a) the "classic" clarion way, Insert as form opens, then "update" when they press ok (or delete if they press Cancel). And

b) a "non fancy" way where the autonumbering is done right before the record is added (as they press ok).

The Web Server tries to use (b) because this makes for fewer problems if the user neither presses OK, nor Cancel. (which in a windows program is rare, but in a web program is really really easy.)
However he web server will use (a) when either;
i) there is a child browse on the form or
ii) you explicitly tell it to use (b). [ Advanced tab - "Prime Auto Inc" option]

But for you, there's a better solution.
Move your code to "PostInsert". That way the Autonumber will have been done for you, whichever approach it took.

Cheers
Bruce

11024
Gerald / John -

Did you set a _value_ for that drop down option? Usually
0
or
''
(depending on the type)

If you leave that out then possibly it would have an effect.

Also the "current value" is highlighted when you open the form. So if you were changing a record, then the department highlighted would belong to the department that person is assigned to. Which is why setting the value to zero makes it work.

Cheers
Bruce

11025
Web Server - Ask For Help / Re: Pseudo EIP
« on: June 19, 2007, 12:11:39 AM »
Hi Chris,

4.26 (which should go out today...) will mostly be bug fixes accumulated along the way, and some other fixes that are outstanding.

4.27 is scheduled to include EIP for the browse. However that _may_ come in stages. (For example 4.27 may just support check boxes in a browse, with 4.28 supporting entry fields and so on.)

As you point out this has the potential to get really complicated, what with validation and all, so I need to step very carefully. But EIP is definitely a useful feature that I want to add in the not too distant future.

Cheers
Bruce

Pages: 1 ... 733 734 [735] 736