Page 9 of 10

Re: FiveWeb Questions

PostPosted: Tue May 03, 2016 12:12 pm
by Jeff Barnes
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????

Re: FiveWeb Questions

PostPosted: Tue May 03, 2016 5:04 pm
by Antonio Linares
Jeff,

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

If not, then you can place them at bitbucket

Re: FiveWeb Questions

PostPosted: Tue May 03, 2016 5:38 pm
by Jeff Barnes
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: Select all  Expand view

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  
 

Re: FiveWeb Questions

PostPosted: Tue May 03, 2016 6:03 pm
by Antonio Linares
Jeff,

Yes

Have you downloaded the files and placed them there ?

Is it working fine ?

Re: FiveWeb Questions

PostPosted: Tue May 03, 2016 6:14 pm
by Jeff Barnes
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?

Re: FiveWeb Questions

PostPosted: Tue May 03, 2016 6:28 pm
by Antonio Linares
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">

Re: FiveWeb Questions

PostPosted: Wed May 04, 2016 12:37 am
by Jeff Barnes
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: Select all  Expand view

? '<script>'
? '   history.pushState({ page: 1 }, "title 1", "#nbb");'
? '    window.onhashchange = function (event) {'
? '        window.location.hash = "nbb";'
? '    };'
? '</script>'
 

Re: FiveWeb Questions

PostPosted: Wed May 04, 2016 8:27 am
by Antonio Linares
Jeff,

Please try this:

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

Re: FiveWeb Questions

PostPosted: Wed May 04, 2016 1:21 pm
by Jeff Barnes
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: Select all  Expand view

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

Re: FiveWeb Questions

PostPosted: Wed May 04, 2016 3:04 pm
by Antonio Linares

Re: FiveWeb Questions

PostPosted: Thu May 05, 2016 6:28 pm
by Enrico Maria Giordano
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

Re: FiveWeb Questions

PostPosted: Thu May 05, 2016 6:48 pm
by Jeff Barnes
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).

Re: FiveWeb Questions

PostPosted: Tue Jul 26, 2016 11:39 pm
by Jeff Barnes
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: Select all  Expand view

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

Re: FiveWeb Questions

PostPosted: Wed Jul 27, 2016 8:21 am
by Antonio Linares
Jeff,

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

Re: FiveWeb Questions

PostPosted: Wed Jul 27, 2016 1:59 pm
by Lailton
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