FiveWeb Questions

User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post 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????
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post 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

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 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

Jeff,

Yes

Have you downloaded the files and placed them there ?

Is it working fine ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post 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?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post 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/trun ... "></script>
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jq ... ery-ui.css">
<link type="text/css" rel="stylesheet" href="https://fiveweb.googlecode.com/svn/trun ... styles.css">
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post 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

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

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

Jeff,

Please try this:

Code: Select all

? '<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
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post 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

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

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: FiveWeb Questions

Post 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
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post 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).
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: FiveWeb Questions

Post 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

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

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FiveWeb Questions

Post by Antonio Linares »

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
User avatar
Lailton
Posts: 99
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil
Contact:

Re: FiveWeb Questions

Post 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
Regards,
Lailton Fernando Mariano
https://www.harbour.ninja
Post Reply