FiveWeb Questions

Re: FiveWeb Questions

Postby Jeff Barnes » 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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Tue May 03, 2016 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Tue May 03, 2016 5: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: Select all  Expand view  RUN

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

Re: FiveWeb Questions

Postby Antonio Linares » Tue May 03, 2016 6:03 pm

Jeff,

Yes

Have you downloaded the files and placed them there ?

Is it working fine ?
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 » Tue May 03, 2016 6: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Antonio Linares » Tue May 03, 2016 6: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
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 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: Select all  Expand view  RUN

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

Re: FiveWeb Questions

Postby Antonio Linares » Wed May 04, 2016 8:27 am

Jeff,

Please try this:

Code: Select all  Expand view  RUN
? '<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
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Jeff Barnes » Wed May 04, 2016 1: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: Select all  Expand view  RUN

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

Re: FiveWeb Questions

Postby Antonio Linares » Wed May 04, 2016 3:04 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

Re: FiveWeb Questions

Postby Enrico Maria Giordano » Thu May 05, 2016 6: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
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: FiveWeb Questions

Postby Jeff Barnes » Thu May 05, 2016 6: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: FiveWeb Questions

Postby Jeff Barnes » 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: Select all  Expand view  RUN

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

Re: FiveWeb Questions

Postby Antonio Linares » Wed Jul 27, 2016 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb Questions

Postby Lailton » Wed Jul 27, 2016 1: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
User avatar
Lailton
 
Posts: 156
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 54 guests