FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FiveWeb Questions
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Tue May 03, 2016 12:12 PM

Hi Antonio,

I have the files, I guess I'm just stuck on exactly where I can put them.
Ideally I would like them to reside on the computer that is running my webapp.exe

It looks like during the execution of the program (on the client side) it goes out to the url where these files are located.
So these would have to reside somewhere on the internet right?
I can't use a path like "C:\myfiles...." because the client would be looking locally for "C:\myfiles...."

If I put them on the computer running the webapp.exe, how would I compensate for different server names/IP addressed when trying to access these .js files?

Maybe I'm just not understanding this correctly????

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Tue May 03, 2016 05:04 PM

Jeff,

Are you going to use a web server in a local network ?

If not, then you can place them at bitbucket

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Tue May 03, 2016 05:38 PM
Ok, I officially feel dumb :-)

It took you saying "web server" for this to kick in.

I believe this is what you want me to do correct?

Code (fw): Select all Collapse
function IncludeScripts()

   ? '<script src="../js/jquery.min.js"></script>'
   ? '<script src="../js/jquery-ui.min.js"></script>'
   ? '<script src="../js/fiveweb.js"></script>'
   ? '<script src="../js/jquery.maskedinput.js"></script>'  
   
return nil
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Tue May 03, 2016 06:03 PM

Jeff,

Yes

Have you downloaded the files and placed them there ?

Is it working fine ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Tue May 03, 2016 06:14 PM

Hmmm well I thought it was working but it seem as if it cannot create the dialog box if I disable my internet.

For testing I have it running on my laptop with xampp.

Are there any other files I need to place on my web server?

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Tue May 03, 2016 06:28 PM

These are the files that we are currently using:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/jquery-ui.min.js"></script>
<script src="https://fiveweb.googlecode.com/svn/trunk/source/js/fiveweb.js"></script>
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/trontastic/jquery-ui.css">
<link type="text/css" rel="stylesheet" href="https://fiveweb.googlecode.com/svn/trunk/source/css/styles.css">

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Wed May 04, 2016 12:37 AM
I think I have it working from my webserver now :-)

Another question, do you know if there is anyway I can block the system from allowing the user to go into the "history" and clicking on a previous page from my web app?

I've figured out how to stop the user from using the back button but the history is still accessible.

FYI, this is what I'm using to stop the back button:
Code (fw): Select all Collapse
? '<script>'
? '   history.pushState({ page: 1 }, "title 1", "#nbb");'
? '    window.onhashchange = function (event) {'
? '        window.location.hash = "nbb";'
? '    };'
? '</script>'
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Wed May 04, 2016 08:27 AM
Jeff,

Please try this:

Code (fw): Select all Collapse
? '<script type="text/javascript">'
? '   window.onload = function () { Clear(); }'
? '   function Clear() {'          
? '   var historyLength=history.length;'
? '   if (historyLength > 0) history.go(-historyLength);  }'
? '</script>'
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Wed May 04, 2016 01:21 PM
It did not seem to do anything.

I might be able to get around this issue by encrypting the text sent in the browser and trying to make a "session".
I've tried before to encrypt the text with no luck.
See below for my simple login ... can you give me an idea on how I can encrypt the text?\

FYI, I am using a double colon (::) to separate my fields.

Code (fw): Select all Collapse
   @ 265, 189 BUTTON "Ok" SIZE 110, 40 OF oDlg ;
      ACTION ( "document.location = '" + AppName() + "?login::' + " ) + ;
             'oGetName.value + "::" + oGetPass.value'
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Wed May 04, 2016 03:04 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: FiveWeb Questions
Posted: Thu May 05, 2016 06:28 PM
Jeff Barnes wrote:Another question, do you know if there is anyway I can block the system from allowing the user to go into the "history" and clicking on a previous page from my web app?

I've figured out how to stop the user from using the back button but the history is still accessible.


It's a very bad practice to prevent the user from use the legitimate available browser commands. I don't recommend to do it.

EMG
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Thu May 05, 2016 06:48 PM

Hi Enrico,

The back button is only disabled in my web app. Any other opened tabs will function as normal.
As for the history, I've solved the issue by creating "sessions" so if someone goes into the history and clicks on a previous link from my web app it will tell them they need to log in again (if that user has logged out. If they are still logged in the links will work).

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: FiveWeb Questions
Posted: Tue Jul 26, 2016 11:39 PM
Hi Antonio,

How would I pass a value from script back to the program?
See code below, I would like to use cUserIP and add it to a dbf.

Code (fw): Select all Collapse
? '<script>'
? '$.getJSON("http://jsonip.com?callback=?", function (data) {'
? '    var cUserIP = data.ip;'
? '    alert("IP: "+cUserIP);'
? '});'
? '</script>'
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FiveWeb Questions
Posted: Wed Jul 27, 2016 08:21 AM

Jeff,

You have to send those values to the FiveWeb app and the EXE will save them to a DBF

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 231
Joined: Fri Jul 20, 2012 01:49 AM
Re: FiveWeb Questions
Posted: Wed Jul 27, 2016 01:59 PM

Hello Jeff Barnes,

I see that you are fighting with fiveweb for a long time.
I have a complete library that is working very great and professional.
If you want to gain time and really speed up your developerment for web. contact me.
I will show you my solution, I am sure that it will help you.

My skype suporte@lailton.com.br

Regards,

Lailton Fernando Mariano