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 ... 736 737 [738] 739 740 ... 744
11056
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
 

11057
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

11058
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



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

11060
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

11061
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

11062
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

11063
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

11064
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

11065
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

11066
Web Server - Share Knowledge / Customising your own Styles
« on: August 06, 2007, 01:29:30 AM »
There are a lot of questions in the forums that can be answered by changing the CSS for a specific item. However editing the supplied CSS files are dangerous, since changes you make will be lost with the next NetTalk update.

This post describes the steps needed for you to use your own CSS file. Inside this file you can put your own styles (based on the shipping ones if you like.)

Step 1:
--------
Create a new CSS file in your \web\styles folder. This is a text file, you can use something like notepad to create it. Name it whatever you like - custom.css is popular. (But be careful Notepad doesn't call it custom.css.txt)


Step 2:
---------
Add this CSS file to the list in the Web Server procedure, Styles tab.


Step 3:
---------
Into this new CSS file you can place your own styles. Usually the easiest way to start is by copying an existing style from the all.css file and then renaming it, and modifying it to your needs.

NOTE: CSS IS CASE SENSITIVE


Step 4:
---------
In your net web app, set the "thing" (it might be a browse, or a form field, or whatever) to use the new style. There are CSS tabs just about everywhere that give you a lot of control over the CSS class that is being used.

EXAMPLE:
-----------
To change the style of a browse

a) Do Step 1 and Step 2 as laid out above.

b) For a browse, go to the NetWebBrowse Settings, to the CSS Classes tab. Notice that the browse is (by default) set to use the 'BrowseTable' class

c) open \web\styles\all.css in Notepad. Find the BrowseTable style and copy it to your custom.css file. Notice that it has 3 parts to it...

.BrowseTable {
  font-family: Tahoma, Verdana,  Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #333;
  margin: 5px 0px 5px;
  border-collapse: collapse;
  border: 1px solid #888;
  padding: 0px;
}

.BrowseTable th {
  font-weight: bold;
  padding: 2px;
  border: 1px solid #AAA;
}

.BrowseTable td {
  padding: 2px;
  border: 0px solid #AAA;
  height: 20px;
}

They need a unique name so rename these 3 bits, to say MyBrowseTable in the custom.css file.

d) make any changes to the browse "look" that you want. For example to give each "cell" in the browse a border, set the border in the "td" section to 1

.myBrowseTable {
  font-family: Tahoma, Verdana,  Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: #333;
  margin: 5px 0px 5px;
  border-collapse: collapse;
  border: 1px solid #888;
  padding: 0px;
}

.myBrowseTable th {
  font-weight: bold;
  padding: 2px;
  border: 1px solid #AAA;
}

.myBrowseTable td {
  padding: 2px;
  border: 1px solid #AAA;
  height: 20px;
}

e) Back in the App, change the browse to use 'myBrowseTable' instead of 'BrowseTable'

REMEMBER CSS IS CASE SENSITIVE so make sure you get the Case right.

f) Lastly - Compile and run your program, and run the browser. You will need to press Ctrl-F5 in your browser after making changes to the CSS file in order to see the changes take effect.

You do not need to re-compile, or re-run the program while you fiddle with CSS changes. Just pressing Ctrl-F5 will reload the new file.

You will need to re-compile and re-run if you change any setting in the APP (for example a setting on the CSS Classes tab.)

11067
Hi Mark,

I confess that I didn't follow much of your explanation.
However the crux of the question is
"I update the drop down and the display field doesn't update" - right?

If so there are really only a few things to check.

a) Remember that any changes you make here apply to the _session value_. So if you wind up setting
whatever = 5
then you must remember to set
p_web.SSV('whatever',5)

b) Perhaps the value is updated, but not "sent". Look in the generated source, in the Validate::dropfield routine. You should see your embed code (which happens when the field changes) under that you should see
do Value::OtherField
where Otherfield is the field you're expecting to update. If it's not there then add it to the Client-Side tab (of DropField) to the Resets list.

c) remember that in this embed point files have _not_ been opened for you. If you are doing any file access code put
Access:File.Open() etc.

Cheers
Bruce

11068
Web Server - Ask For Help / Re: Client Side options on Form
« on: August 03, 2007, 03:32:49 AM »
Hi Bram

Yes, there was a problem with dynamic Text fields. I've fixed this for 4.29.

Cheers
Bruce



11069
Web Server - Ask For Help / Re: Priming a field
« on: August 02, 2007, 10:47:33 PM »
Hi Rhys,

Are you calling the form from a browse?

Can you right-click on the procedure, choose "source", search for the PreInsert routine, and cut & paste the code from that routine here? You should see the field priming there, but I'd like to see the actual code.

Cheers
Bruce

11070
Web Server - Ask For Help / Re: PDF Report using EE
« on: August 02, 2007, 10:40:37 PM »
Hi Wesley,

I just re-tried the example here and it seems to be ok.
But it occurs to me that maybe the file didn't convert to being a pdf. That would give the result you're getting. It'd do this is the PDF template isn't registered.

So here's what you need to do.
a) re-install nettalk, so that the example app is restored to shipping state.
b) open the app in your Clarion.
c) look _very_ carefully for any messages as you open the app. Things like "xxx template is not registered". If you do find any write them down, and post them here.

My guess at this point is that the PDF stuff is missing.

Cheers
Bruce


Pages: 1 ... 736 737 [738] 739 740 ... 744