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

Pages: 1 2 [3] 4 5 ... 33
31
Web Server - Ask For Help / Re: Displaying Image from SQL Blob Field
« on: December 13, 2016, 01:45:35 PM »
Not sure if this helps, but here's the pseudo code I've used to serve blobs.

In the _SendFile embed like Bruce says, if p_Filename is what you are looking for:

Code: [Select]
self.ForceNoCache=0
self.HeaderDetails.CacheControl=''
self.ReplyContentType='image/jpeg'
self.SendMemory(loc:Image_Blob,loc:Image_Size)
dispose(loc:Image_Blob)

You also need to then skip out of the template PARENT._SendFile(p_FileName,p_header) call that comes directly after the embed in _SendFile, wrap it in an "else / end" statement.

In data somewhere:

Code: [Select]
loc:Image_Blob &string
loc:Image_Size long

32
Exactly what was needed. Thank you Bruce, much appreciated!

33
Hi Bruce,

Okay, so maybe I've put a fix into place for a problem that has a better solution.

When you get into url rewriting in webhandler, relative paths have issues. When you change the url they become relative to that url, probably because they're of the first type you mention below.

So I'm thinking I might need to try with the slash in front of the folder name. Right. Which makes it relative to the host. That might be it.

Will report back with findings.

34
Hi Bruce,

Thanks for the info.

I'm a little confused though with your answer to my question about the performance tab.

In the template we set a value to "true" or "false".

I'm asking, how can I manually set that "true" on, in case something I'm doing in the code has stopped it from working? How do I absolutely make sure it's ON?

Yes, I get that some things aren't just a simple setting, but you've got them there as true/false options for us. So I'm asking, how do I set the option manually?

For instance: How can I manually make sure that file caching is turned on?

35
Web Server - Ask For Help / How to do a 301 Redirect from "www" to "root"?
« on: December 07, 2016, 02:52:24 PM »
Hi Bruce/Folks,

Specific question (arising out of another post below).

What's the best way to do a 301 Redirect for "www" urls pushing them to the "root" (non-www) urls?

(https://support.google.com/webmasters/answer/93633)

I've gone through the webhandler embeds that I do use for redirecting and doing lots of magic stuff. But am not sure of the right place to be able to adjust the "www".

Cheers.

36
Web Server - Ask For Help / Re: Problem calling form without browse
« on: December 06, 2016, 08:37:09 PM »
Ha ha, yeah, been there done/will-still-do that :)

37
Have been running some more testing of the site (https://gtmetrix.com/reports/sandersnoonan.com.au/iFI2azAY), and it looks like I'm missing a number of the wonderful settings that Nettalk automatically can give. Because I hacked it to bits and rebuilt from scratch.

Bruce - How can I manually set any of the settings on the "Performance" tab?

38
Hi Bruce/Folks,

Our new website http://sandersnoonan.com.au is running on nettalk but heavily stripped down and rebuilt.

None of the nettalk css or javascript files are used.

So when I flag in the NetWebServer settings for the "keep-alive" setting to be used, and run a test on it (https://www.giftofspeed.com/check-keep-alive/index.php?url=http%3A%2F%2Fsandersnoonan.com.au), it's not on.

Figures that it's part of the files I've stripped out.

So my question is: How can I manually set the "keep-alive" setting for the webserver?

39
Web Server - Ask For Help / Re: Problem calling form without browse
« on: December 04, 2016, 06:29:53 PM »
Hi Mike,

It's "_bidv_" :)

Stu

40
Hi Bruce/Folks,

Here's the situation.

I've got all internal links (images, css, scripts) in my site pointing to fully qualified urls, rather than relative.

I did this because I have a lot of redirect logic going on, and found that if I didn't do this the urls were the original url + the relative path.

There might be a better way around this problem, sure. If there is, Bruce, be gentle.

However, there comes a problem with this.

Depending on whether or not you use "www" or the root non-www url to get to the site, the css url('<relative path>') calls mean that images/icons won't show.

To get a visual on this, visit 1) http://sandersnoonan.com.au - working great!, then visit 2) http://www.sandersnoonan.com.au - the little icons (css url('') relative folders) aren't showing.

[Edit: You'll want to visit those urls in separate incognito browser tabs, as if you visit them one after the other the icons work okay]

So the relative paths in the css will have http://www.sandersnoonan.com.au added on, and I'm guessing? that this stops things from working?

Really not sure what's happening here, but am guessing it'll be a simple enough solve.

This stack is interesting (http://stackoverflow.com/questions/940451/using-relative-url-in-css-file-what-location-is-it-relative-to). The W3 rules are that the relative url in a stylesheet is relative to the documents folder. So why does "www" / non-www make a difference?

Cheers.

41
Web Server - Ask For Help / Re: NetWebBrowse - Design considerations
« on: October 05, 2016, 06:06:15 PM »
Hi Jeff,

1. So, first thought is .. Is a child browse out of the question?

2. You could have one big column, a local field say, big long string, tick xhtml options in template, and have code that builds for that column it's own table structure (or divs).

3. You could use a memory file for the whole browse, and build it to have both parent and child table records as records in the mem file. You could then have a "buffer" column in the row that is displayed when the level (or whatever you want to call it) of the record is "2", ie child record, which would make it visibly obvious it was a child record.

Hope something there might help.

Stu

42
Hi Poul,

Interesting, very interesting!

So.

1. I don't use the serverstate function yet. I tried a couple of times, but .. My big intranet is so big and customised that a lot of stuff didn't persist through the restart (ie memory files). Wouldn't be hard to get working, just .. Time. Don't have it yet to get it working to where I'd like it to be.

2. I do a bit of trickery to get the server timeout to keep refreshing if the browser stays open. This is fraught with security issues, but so far the lack of annoyance at having to log in three or four times a day has outweighed the security issues.

So according to what you're saying, there might be something there.

3. I restart usually once a night, but it's at nighttime, nobody logged in.

JUST NOW

* I've just had the issue occur, but slightly different, and I got the user to call me and monitored DebugView as she went through the process.

The issue was slightly different in that this time the window was closing BUT nothing was being saved. This is a file record form window.

Even though this time the window closed (in the example above it wasn't closing), the "Send Stage To Debug" was showing exactly the same log.

When things aren't working, the net:web:StageVALIDATE net:web:SetPics event fires, but the net:web:StageVALIDATE net:web:Change and net:web:StagePOST net:web:Change events do not fire.

I then tried myself three times in a row, doing slightly different things. No dice.

Then a couple of minutes later I tried one more time, doing the same process, and it saved.

INTERESTING #1: The user said that she has to scroll down to get the save button on her screen. Could this be an issue?

It's definitely not an issue on my screen, and I experience it, so there's that. Probably a red herring.

INTERESTING #2: This issue occurs X times and then on time Y it goes away and everything works as per normal.

-

I'm still wondering if your theory about the sessions and timing and server state could be affecting here, even though serverstate isn't being used.

It's such a wierd occurance, a problem that goes away if you do the process enough times. What is "enough". And what might be happening between Y-1 and Y times to make it work?

43
That's really cool Bruce, thank you.

What would be the dangers in changing this?

44
So I've done a bit more investigation into this. The form has Send Stage To Debug ticked.

Took an example of the save button working and one not working, and compared the debugview output.

The difference, as follows, seems to be the 'stageVALIDATE' and the 'StagePost' do not get run when the save button doesn't work.

Code: [Select]
START p_stage=[2050 net:web:StageVALIDATE net:web:Change] Event=
END p_stage=2050 net:web:StageVALIDATE net:web:Change Event=
START p_stage=[4098 net:web:StagePOST net:web:Change] Event=
END p_stage=4098 net:web:StagePOST net:web:Change Event=

Bruce - Can you think of any reason why the Validate/Post stages wouldn't get run?

Could it have something to do with the form/save button info being overridden somehow, maybe by stuff in popup or child browse/form functionality?

45
So I've done a bit more investigation into this. The form has Send Stage To Debug ticked.

Took an example of the save button working and one not working, and compared the debugview output.

The difference, as follows, seems to be the 'stageVALIDATE' and the 'StagePost' do not get run when the save button doesn't work.

Code: [Select]
START p_stage=[2050 net:web:StageVALIDATE net:web:Change] Event=
END p_stage=2050 net:web:StageVALIDATE net:web:Change Event=
START p_stage=[4098 net:web:StagePOST net:web:Change] Event=
END p_stage=4098 net:web:StagePOST net:web:Change Event=

Bruce - Can you think of any reason why the Validate/Post stages wouldn't get run?

Could it have something to do with the form/save button info being overridden somehow, maybe by stuff in popup or child browse/form functionality?

Pages: 1 2 [3] 4 5 ... 33