FiveWeb Questions

FiveWeb Questions

Postby Jeff Barnes » Thu Jan 14, 2016 5:36 pm

1. Can you use .rc files with FiveWeb?
2. How would you open a PDF file to be viewed via FiveWeb?
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Thu Jan 14, 2016 5:44 pm

Jeff,

FiveWeb currently does not support RC files. Look for FWeb from Carles Aubia on these forums, his product does support RC files.

The browser should open a PDF by default (at least Chrome does it).

Look for "document.location" in FiveWeb examples and set it to the PDF file url directly.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Carles » Thu Jan 14, 2016 7:21 pm

Jeff,

1.- FWeb support *.RC files, you can see FWeb manual for this feature.
2.- You can use pdf from javascript with window.location.assign( "./help/FWeb.pdf") or document.location as said Mr. Antonio

If you want to see a little code example with FWeb:

Code: Select all  Expand view  RUN
<?php
include ('./fweb/fweb.php' );

$oWeb   = new TWeb( 'Test PDF' );      
$oWeb->Activate();

    $oWnd   = new TDialog( 'my_dialog', 700, 900 , 'Manual FWeb - Framework Web' )
    $oWnd->SetIcon( 'images.app/doc.png' );

        $oPdf = new TFrame( $oWnd, 'my_frame', 0, 0, '100%', '100%', 'help/FWeb_EN.pdf' );
   
    $oWnd->Activate();
   
$oWeb->End();
?>


and you can execute it-> http://itarraco.com/fweb/zpdf.php (pdf file is a little manual of FWeb :D )
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1137
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: FiveWeb Questions

Postby Jeff Barnes » Thu Jan 14, 2016 8:03 pm

Ok so I am obviously missing something in my formatting ... :oops:
I've tried several different ways of trying to open the PDF using document.location but it never seems to work (using Chrome)
Can you please give me a code sample on how to open the pdf using document.location ?

Thanks.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Thu Jan 14, 2016 8:06 pm

Jeff,

@ 260, 160 BUTTON "Ok" OF oDlg ;
ACTION document.location = "url_to_the_pdf"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Thu Jan 14, 2016 10:51 pm

Looks like its a problem with xampp not allowing me to open the pdf.
If I manually enter the url in Chrome with xampp running it give an error.
If I switch to IIS it will open the PDF

The problem is, in IIS the exe does not really work :(
When I click a button (a browse) it does nothing.

I took a quick look at FWeb but it looks like it doesn't let us use harbour code.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Carles » Fri Jan 15, 2016 7:19 am

Jeff,

If you manually enter the url in Chrome with xampp running, this should work. I've tried it and it works.

Fiveweb it's based in Harbour

FWeb it's based on php but using the FiveWin philosophy with RIA concept -> https://en.wikipedia.org/wiki/Rich_Internet_application

There are two solutions to make the jump to the Web ! :D
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1137
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: FiveWeb Questions

Postby Jeff Barnes » Fri Jan 15, 2016 11:25 pm

Got it working ...

How can I force the page to refresh after it opens?
I know I can use document.location.reload(true) but I can't get it to work when added to the button:

Example:
If I add each to it's own button, they work so I know the commands are correct but this isn't what I need.
I'm using window.open so I can have the PDF opened in a new tab. The second button will obviously reload the original tab.
@ 484, 456 BUTTON "PDF" SIZE 110, 40 OF oDlg ACTION window.open("/PDF/Monitor.pdf","_blank")
@ 524, 456 BUTTON "Refresh" SIZE 110, 40 OF oDlg ACTION document.location.reload(true)

But, if I try to do the following the code will not compile:
@ 484, 456 BUTTON "PDF" SIZE 110, 40 OF oDlg ACTION (window.open("/PDF/Monitor.pdf","_blank"), document.location.reload(true) )

The compile error is:
Compiling...
Certus.prg(232) Error E0030 Syntax error "syntax error at '.'"
Harbour 3.0.0 (Rev. 16951)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'Certus.prg' and generating preprocessed output to 'Certus.ppo'...
1 error

No code generated.
* Compile errors *
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Fri Jan 15, 2016 11:40 pm

Jeff,

Try it this way:

@ 484, 456 BUTTON "PDF" SIZE 110, 40 OF oDlg ;
ACTION "window.open('/PDF/Monitor.pdf','_blank'), document.location.reload(true)"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Mon Jan 18, 2016 12:26 am

Thanks Antonio ... That worked.

Is there any way I can do something like the code below without it being tied to a button?

window.open("/PDF/Monitor.pdf","_blank")

Example:

IF cVar = "Something"
window.open("/PDF/Monitor.pdf","_blank")
ENDIF
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Mon Jan 18, 2016 5:08 pm

Jeff,

Try this:

? "<script>window.open('/PDF/Monitor.pdf','_blank');<\script>"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Wed Jan 20, 2016 8:35 pm

Thanks Antonio ... got that part working now.
FiveWeb is working quite well so far :)

Now on to FOLDERS....

I am able to create the folders following the sample (TestFold.prg).

@ 0, 0 FOLDER oFld PROMPTS "Test 1","Test 2" SIZE 1000, 650 OF oDlg

How do I setup my gets/browse etc... in separate tabs in the folder?
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Jeff Barnes » Fri Jan 22, 2016 1:06 pm

I've tried using the same format as FWH but no luck:

@ 1, 1 BUTTON "Test" OF oFld:aDialogs[ 1 ] ACTION MsgInfo( "Hello world!")
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Fri Jan 22, 2016 11:01 pm

Jeff,

FiveWeb enhancements:

* Enhanced Class TFolder.

* Enhanced samples\testfold.prg adding child controls

Already available from:
https://bitbucket.org/fivetech/fiveweb/downloads (download repository)

Here it is the code for the enhanced samples\testfold.prg
Code: Select all  Expand view  RUN
#include "FiveWeb.ch"

function Main()

   local oDlg, oFld
   local cVar1 := Space( 10 ), cVar2 := Space( 20 ), cVar3 := Space( 30 )

   DEFINE DIALOG oDlg TITLE "Using folders"

   @ 10, 10 FOLDER oFld PROMPTS "One", "Two", "Three" OF oDlg SIZE 400, 300

   @ 100, 30 SAY "Tab 1" OF oFld:aDialogs[ 1 ]

   @ 150, 50 GET cVar1 OF oFld:aDialogs[ 1 ]

   @ 100, 30 SAY "Tab 2" OF oFld:aDialogs[ 2 ]

   @ 150, 50 GET cVar2 OF oFld:aDialogs[ 2 ]

   @ 100, 30 SAY "Tab 3" OF oFld:aDialogs[ 3 ]

   @ 150, 50 GET cVar3 OF oFld:aDialogs[ 3 ]

   ACTIVATE DIALOG oDlg

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Antonio Linares » Fri Jan 22, 2016 11:08 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests