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 ... 736
10936
Web Server - Ask For Help / Re: Priming a field
« on: August 10, 2007, 06:53:33 AM »
>> However, it's always in Insert mode

It sounds to me like it's not being put into insert mode correctly.
How are you doing it?
What does the URL look like?

FAQ #4 discusses the correct URL for an Insert.

Cheers
Bruce


10937
>> Ideally there would be a more generic solution e.g. an option to refetch the current view record (and an embed to do something with it) whenever a button is pressed on a browse page would be really handy.

The key to this is the concept of "Current View Record". Remember the browse procedure runs when the page is _generated_ and then the thread terminates.

By the time the user clicks on the button (or row) in the browse, there simply isn't any View active. Using the unique ID, you can reload the primary  table record.

Clearly though, this isn't good enough. Rather than passing the primary table unique id, we need to sore, and pass back, the view "position".

Alas that's not a completely trivial change to make, but a necessary one. It will be interesting to see also how badly it breaks the existing code where folk are expecting back the ID, not the View position.

I'll make the change over soon - probably in 4.30 - I'm busy testing the 4.29 build now for release early next week.

Cheers
Bruce

10938
Web Server - Ask For Help / Re: Rogue Close button
« on: August 10, 2007, 02:39:53 AM »
Hi Rhys,

The thing about "Close" buttons is that they're a con job.

After all a window isn't really "closing" all that's happening is that you are "going" to some pre-determined page.

The "close" button is really just there so users, used to a Windows interface, have something to click on.

Usually the menu is still visible at this point, so they don't really need to close, they just need to select an item from the menu.

If you do have a Close button then it _attempts_ to go somewhere useful. In this case, clearly, it's not getting it very right (and I'll look into that to see if it could be a bit "smarter". But either way, you have the ability to direct it to wherever you want it to go.

On the General tab, set the "Url on Save" to be the page that the user should go to when they click "close" (often it's the Index page, but clearly it's up to you.)

Cheers
Bruce


10939
Web Server - Ask For Help / Re: Login from another web page
« on: August 10, 2007, 02:23:44 AM »
You're on the right track, but the URL from the other site needs to contain the page name. eg

127.0.0.1:91/IndexPage/?login=junk,password=junk

In the login page you can test for the existence of the parameters using
p_web.IfValueExists('login')

cheers
Bruce

10940
Web Server - Ask For Help / Re: row sizes meaning
« on: August 10, 2007, 01:56:36 AM »
Hi Rene,

Yes, if you're doing rows then this is the height. If you're doing columns then this is the width.

The * means "as much as is left" more than "as much as it needs". It basically means the middle row the the one that will grow, and shrink, as your browser window grows and shrinks.

Cheers
Bruce

10941
Hi Rhys,

this is a subtle variation on the usual form of this question. What you need is a row identifier, where the "unique id" is no longer unique (because of the child records).

This is not trivial, so I'll need to think about it. I'll try and come up with something you can use within the next couple of days.

Cheers
Bruce
 

10942
Web Server - Ask For Help / Re: Popup Message
« on: August 07, 2007, 11:12:03 PM »
Hi Rene,

At the moment the Ajax stuff is "data only" not "code".
It's on the list though.

Cheers
Bruce

10943
Web Server - Share Knowledge / Re: Example code for logging in a user
« on: August 07, 2007, 11:08:51 PM »
Hi Edvard,

The problem with documentation is that it is imprecise. What we need is a more structured language to explain what is going on. Hah - I know we'll write the documentation in Clarion - that way there's no ambiguity. So you can see a full document of exactly what the methods do in the netweb.inc and netweb.clw files. (I'm just pulling your leg Edvard, sorry... :D )

Seriously though - The ValidateLogin() method is the same as .SetSessionLoggedIn(true). So if you call it, then the user becomes "logged in".

there'll be more information about each method once the method list has stabilized a bit.

Cheers
Bruce



10944
The browse, form and page procedures all let you embed your own HTML. The NetWebSource procedure is also a good place to put your own custom HTML, but there are some rules worth pointing out.

When "bits" of pages are sent asynchronously the HTML you create is validated according to XML rules. In effect, this means you shouldn't write HTML, you should write XHTML.

The main difference between the two is that XHTML is more rigid, and less forgiving. And the most common manifestation of this is the issue of closing tags.

In HTML you can code an image like this
<img src="bob.gif">
And you'd be fine. But in XML this leaves an unclosed tag (<img>). So in XHTML you need to close the tag, like this
<img src="bob.gif" />
or like this
<img src="bob.gif"></img>

Other common HTML tags used in isolation are <br> and <p>.

There are cases where HTML will suffice, but it never hurts to use valid XHTML.

The main indicator that you've done something wrong is that the page will display correctly when first loaded, but will refuse to "refresh" when it is dynamically updated.

10945
The Rest - Ask For Help / Re: How to get IP address
« on: August 06, 2007, 11:52:03 PM »
Hi Mike,

First assumption to get rid of is that the machine has "an" IP address. It certainly has more than 1, and may actually have quite a few.

Second assumption to get rid of is that the IP address is unique. It's not.

Lastly, the address an "outsider" uses is almost certainly not the IP Address of this machine - it's the IP address of the router.

So that all said, what are you really trying to know?

The only really useful number is the IP address others will use to contact you. And that's the only one you can't determine just on that machine. In order to determine your IP address, you need to "bounce" a packet off another machine, and get it to tell you what your IP is.

There are a few ways to do this, one of the easiest is to use the NetWebClient to do a fetch on
http://whatismyip.com/
and the page that comes back contains the IP address.

Cheers
Bruce

10946
Web Server - Ask For Help / Re: row sizes meaning
« on: August 06, 2007, 10:56:17 PM »
Hi Drew,

A frameset breaks up a page into a number of parts.
each part can contain either a Frame (ie a web page) or another Frameset.

Typically a Frameset divides the page into x rows or x columns. (Although it is possible to do both at the same time.)

So in the Accounts example, the page is broken up first into 3 rows, and the numbers are, as Alan explained, the initial sizes of the rows.

The middle row is then broken down into 2 columns, and you'll see sizes for that as well.

Cheers
Bruce

10947
Hi Alan,

I think your most reliable option is to add a parameter to the URL so that the browse can take care of it. For example on one button have
'CustomersBrowse?i=1' and the other 'CustomersBrowse?i=2'

Then in the CustomersBrowse, top of GenerateBrowse routine do

  p_web.StoreValue('i')

then use p_web.GetSessionValue('i') in the conditional for the Insert & Change buttons.

cheers
Bruce

10948
Web Server - Ask For Help / Re: PDF Report using EE
« on: August 06, 2007, 02:01:14 AM »
Hi Wesley,

Yes, this is normal. Because you are generating the report dynamically the browser "asks for" http://www.whatever.com/MailboxesReport

What is sent back is a PDF file (with the appropriate Reply Content Type set).

But since the browser displays what it asked for, that's what you see in the address bar.

I'm running out of ideas as to what might be doing this.
What version of Acrobat reader do you have installed?

For 4.29 I've added support though for adding a .pdf to the URL name. So you can call MailboxesReport.Pdf and that will also be re-directed to the MailboxesReport procedure. I'm hoping to do a release of that this week so perhaps get that as soon as it's available and try with that.

Cheers
Bruce

10949
Hi Greg,

yes, that'll do nicely.

For 4.29 I've done sort of the same thing, except the code is a bit "smarter". It'll only do it (automatically) for "dynamic" fields (ie ones that are being sent back to the server and so are susceptible to the bug). It also allows you (on the template prompts) to specifically turn off auto-complete for some fields if you'd prefer it off.

Oh, and I made it automatically off for password fields as well.

Cheers
Bruce

10950
Web Server - Ask For Help / Re: Different browse grid
« on: August 06, 2007, 01:31:19 AM »
Hi Greg,

This is a generic sort of question where the answer is "edit the styles".
So I've written up a bit and posted it in the hints forum. The posting is here.

http://www.nettalkcentral.com/index.php?option=com_smf&Itemid=36&topic=116.0

Cheers
Bruce

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