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

Pages: 1 ... 22 23 [24] 25 26
346
Using firebug check the CSS class of the hyperlink and add your desired value into your own custom CSS file.

347
Web Server - Ask For Help / Re: Data Download Advice
« on: May 03, 2009, 02:31:53 AM »
Hi Alberto,

In ASP they will be rendering the results directly from SQL into CSV and pumping it down into the browser as if it were a simple HTML page.

You could do this easily in a NetWebPage (with a pagename extension of .CSV so the receiving browser could decide what to do with it) procedure that generates each line of CSV and transmits it using:


packet = clip(packet) & CLIP(Field1) &',' & CLIP(Field2) & CRLF
do sendpacket


This way will be fast as no temp files are created, but you'll need to hook into the browsers filter property so you can match what was displayed in the NetWebBrowse procedure.

There are lots of simple tricks with CSV like wrapping text values in double quotes and stripping other double quotes etc.

Regards
Bill Shields

348
Web Server - Ask For Help / Re: displaying images in aform
« on: April 26, 2009, 06:35:16 PM »
Ok, Make sure you are using Firefox with Firebug installed, so we can debug. If Javascript isn't working its the easiest way to know whats going on.

We need to confirm when you click on an image we are calling our new function to replace the image. View the source inside your browser to confirm the anchor tag exists and looks like what we need.

If you can put your site public i'll check it for you.

I'm in Sydney GMT + 10

Regards
Bill

349
Web Server - Ask For Help / Re: displaying images in aform
« on: April 25, 2009, 04:59:14 PM »
Hi,

If i understand correctly, you have a number of small images on a form, and as the user clicks on them you have a larger place on the form reserved for showing any of the images at higher res?

I can see a few ways of doing this, personally i'd use Javascript on the client side, but you could also try using standard nettalk.

The concept with javascript is basically this:

Add into the form some custom XHTML in the right place where you want your larger image to show i'd start with "Before </form>"

<img id="PreviewImage" src="images/blank.png" width=400px height=300px />

The id here is key, id is like class except with id there can be only one on a page, which will allow us to find this img later in Javascript.

Id also write a javascript function and stick into the page (once its all working nicely you could place it in your custom script files for use anywhere), meanwhile place it inside XHTML section say "Before <form>" will do..

<script type="text/javascript">
  function replaceImage(myID, newURL) {
    var imgTag = document.getElementById(myID)
    imgTag.src = newURL
  }
</script>


You've now done all the preparation work. All that is left is to call the Javascript function (on the client side) with those two arguments.

replaceImage('PreviewImage','images/image1.png');

You can wrap your thumbnail image in an anchor tag or use the onclick javascript extension:

<a href="javascript: replaceImage('PreviewImage','images/image1.png');" ...thumbnail image in here... </a>

or

<img src="images/thumbnail1.png" onclick="replaceImage('PreviewImage','images/image1.png');" />

The other method would be to try and use NetTalks built-in ajax to refresh a display control with a new value. It should work also.

Regards
Bill



350
Hi Bruce,

Thanks heaps for that. I've tested a "new and improved" approach.

It goes like this.

Tick "Wrap Menu in Table" then add a CSS class of 'wrapper'

Then add the following into your custom CSS file.

.wrapper {
  height:100%;
  background-color: #969aa0;    <- thats my colour yours in probably different
  margin: 0;
  padding: 0;
  border: none;
}

.dhtmlgoodies_xpPane{
  background-color:#969aa0;
  float:left;
  width:200px;   <- mine is 200px width not 150
}


This is much nicer... and shorter.

Regards
Bill



351
Hi Johan,

I have a modified version using a custom CSS file that allows the XP Panel to be whatever height it needs (CSS 100%). It also requires a little bit of code to be added to the menu procedures to get around a few things.

I've also tested in IE6&7, FF2&3, Safari and Chrome.

This is how i do it:

Add into your custom CSS

#wrapper {
  height:100%;
  background-color: #969aa0;    <- thats my colour yours in probably different
  margin: 0;
  padding: 0;
  border: none;
}

.dhtmlgoodies_xpPane{
  background-color:#969aa0;
  float:left;
  width:200px;   <- mine is 200px width not 150
}

I'm pretty sure thats all the CSS thats needed. Then i hack in a table which is a web technique to force 100% height in all browsers.

I am using frames, but it would also apply without. In my LeftFrame procedure (where the XP Panel is defined as an extension)

Create a piece of XHTML "After <body>" to include this, call it WrapperHeader:

<table id="wrapper" valign="top" height="100%">
<tr><td valign="top">


Create another "Before </body>" call it WrapperFooter:

</td></tr></table>

This just wraps the whole left menu in a 100% height table. The CSS for wrapper colours it in the same background colour as the panel itself.

In the most recent version of NetTalk Bruce has added a new DIV which breaks this code so I've unceremoniously hacked it out.

You'll need to add two embeds to strip out the code, its ugly and i'm embarrashed, (but it was quite pretty until recent builds) but it works. The embed is "Processed Code"

! [Priority 1200]
IF 1=0
  packet = clip(packet) & p_web._jsBodyOnLoad('PageBodyHardLeft',,)
    do SendPacket
    Do WrapperHeader
    do SendPacket
! [Priority 2700]
END
  Do WrapperHeader
  do SendPacket


The bold is my code. If you read the code you'll see I am getting rid of the jsBodyOnLoad, which introduces a new DIV which screws my CSS.

I know it messy, but once it done you can forget about the XP Panel and can trust it to work nicely and fill the whole left side of the browser and not look cut off halfway down.

Regards
Bill

352
Web Server - Ask For Help / Re: Sortable Browse Header CSS
« on: April 24, 2009, 04:50:53 AM »
Hi Kev,

I know what you mean. Most of the time i seem to understand CSS but occasionally i'm at a complete loss and just have to keep guessing until i stumble over the answer.

Glad it helped.

Regards
Bill

353
Web Server - Ask For Help / Re: Sortable Browse Header CSS
« on: April 21, 2009, 03:53:56 AM »
Hi Kevin,

In tph.css add:

table#GLLedgerInquiryBrowse_tbl.MyBrowseTable1 th a {
    font-size: 8px;
}

Regards
Bill

354
Web Server - Ask For Help / Re: XML server / page size
« on: April 11, 2009, 04:04:57 PM »
Hi Rene,

Good point! Thanks.

Bill

355
Web Server - Ask For Help / Re: Manually Open a Drop
« on: April 08, 2009, 06:46:44 PM »
Hi Wilco,

Refreshing a second dropdown based on the first on is pretty standard. I'm guessing your real problem is forcing the second dropdown to "drop" automatically?

This would require client-side javascript. The theory is straight forward but my javascript isn't good enough to help. I've checked the javascript DOM regarding SELECT HTML controls and their doesn't appear to be an event or property you can set to make it open. It might be possible to do it pretty much like normal clarion where you select the control (which is easy in javascript) and then post an event into the control causing it to open.

You are outside the scope of nettalk here and into standard web programming so googling the problem is likely to assist.

Sorry I couldn't be more helpful.

Regards
Bill

356
Hi,

Create a delete button, give it no text. Give it an image preferrably png with transparency.

In the CSS Class give it a new name, mine is called imgbutton (remember css is case sensitive).

If you don't already have one, add a new CSS file to your application. Go to your main procedure that has the server extension template on it. Go into Extensions, find nettalk, then "Settings" then on the tab within it go to "styles". Add a new file into CSS Style Files.

In this new file add something like this:

.imgbutton {
  padding: 0;
  border:  0;
  background: transparent;
  cursor:pointer;
}

This will make the button look like just an image.

Regards
Bill Shields


357
Web Server - Ask For Help / Re: XML server / page size
« on: April 07, 2009, 04:22:45 PM »
Hi Rhys,

My XML is all over the shop.

In an older system i use Centrepoint XML (the one in clarion without any of the clarion classes, wasn't too impressed by them)

In newer systems i use iqXML.

In my web services i just write XML as text for speed and simplicity reasons.

John Moore has written a nice XML class which is fast and simple. Plus Capesoft have their xFiles which also appears lean.

A word of caution, you can up the MAX:NetBinData size but you will get performance issues, depending upon what you are doing.

I took it up to 640,000 and there was a considerable impact on speed 2-3 times slower. However, my own code contributed to this. Every time you do a CLIP() on a big string it takes time.

Regards
Bill

358
Web Server - Ask For Help / Re: XML server / page size
« on: April 07, 2009, 01:25:40 AM »
Hi Rhys,

Nettalk does have a 16kb buffer under certain circumstances. But its actually quite hard to bump into it.

If your XML is on disk use p_web._SendFile() and you'll have no limits.

If you are constructing the xml as you go along add chunks to the packet variable then issue do SendPacket and keep going.

You've also got p_web._SendBLOB and p_web._SendMemory with no limits.

I do exactly what you are referring to without issues.

Regards
Bill Shields

359
Web Server - Ask For Help / Re: Prent of a form
« on: March 31, 2009, 06:11:43 PM »
I was just reading the form code for another reason and realised i'd stumbled over the answer to your question.

You can pass 'ChainTo' on the URL and it will use that, or you can set 'FormName_ChainTo'  in the session queue. If these overriding techniques aren't used it pulls it from the URL Referrer.

360
Web Server - Ask For Help / Re: Prent of a form
« on: March 31, 2009, 04:31:07 PM »
Hi,

I can't see it posted on the URL or saved in the session queue, the only clue is in the HTML header as the referring URL.

Regards
Bill

Pages: 1 ... 22 23 [24] 25 26