Thank you. Exactly what I was looking for ![]()
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
Thank you. Exactly what I was looking for ![]()
Is there any way to hide the information passed via fiveweb in the address bar?
function IncludeScripts()
? '<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>'
? '<script src="https://bitbucket.org/fivetech/fiveweb/downloads/jquery.maskedinput.js"></script>'
return nilJeff,
> Is there any way to hide the information passed via fiveweb in the address bar?
You could encode it and then decode it from the FiveWeb app, so the info seen by the user is meaningless
Jeff Barnes wrote:Another question..
For .js and .css files, I notice (for example in FiveWeb.prg) they are loaded from the internet (see sample below).
Is there anyway to have all these .js and .css files loaded from my server instead of the internet?
I realize I can just change the URL to my server but I would need to know where (what files) I need to look at so I can have all pointed to my server.
Reason: If anything changes on google or bitbucket (files get removed for example), I don't want my webapp to crash.
function IncludeScripts() ? '<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>' ? '<script src="https://bitbucket.org/fivetech/fiveweb/downloads/jquery.maskedinput.js"></script>' return nil
#include "fiveweb.ch"
function Main( cParams )
if pcount() > 0
Process( cParams )
return nil
endif
SetTheme( "redmond" )
GetText()
return nil
//----------------------------------------------------------------------------//
function Process( cParams )
local aParams := hb_aTokens( cParams, ":" )
do case
case aParams[ 1 ] == "showtext"
ShowText(aParams)
end case
return nil
Function GetText()
local oDlg, oGet, cText := Space( 30 )
DEFINE DIALOG oDlg TITLE "Test" SIZE 650, 400
@ 69, 190 SAY "Text:" SIZE 110, 40 OF oDlg
@ 66, 315 GET oGet VAR cText SIZE 300, 40 OF oDlg
@ 265, 189 BUTTON "Ok" SIZE 110, 40 OF oDlg ;
ACTION ( "document.location = '" + AppName() + "?showtext:' + " ) + 'oGet.value'
ACTIVATE DIALOG oDlg NOWAIT
return nil
Function ShowText( aParams )
LOCAL cText := ALLTRIM(aParams[2])
MsgInfo(cText)
Return Nil#include "fiveweb.ch"
function Main( cParams )
if pcount() > 0
Process( cParams )
return nil
endif
SetTheme( "redmond" )
GetText()
return nil
//----------------------------------------------------------------------------//
function Process( cParams )
local aParams := hb_aTokens( cParams, ":" )
do case
case aParams[ 1 ] == "showtext"
ShowText(aParams)
end case
return nil
Function GetText()
local oDlg, oGet, cText := Space( 30 )
DEFINE DIALOG oDlg TITLE "Test" SIZE 650, 400
@ 69, 190 SAY "Text:" SIZE 110, 40 OF oDlg
@ 66, 315 GET oGet VAR cText SIZE 300, 40 OF oDlg
@ 265, 189 BUTTON "Ok" SIZE 110, 40 OF oDlg ;
ACTION ( "document.location = '" + AppName() + "?showtext:' + " ) + 'oGet.value'
ACTIVATE DIALOG oDlg NOWAIT
return nil
Function ShowText( aParams )
local oDlg
LOCAL cText := ALLTRIM(aParams[2])
DEFINE DIALOG oDlg TITLE "Test" SIZE 650, 400
@ 265, 189 BUTTON "Ok" SIZE 110, 40 OF oDlg
ATail( oDlg:aControls ):cAction = 'MsgInfo( unescape( "' + cText + '" ) )'
ACTIVATE DIALOG oDlg NOWAIT
Return NilIs there a way to "unescape" the info when trying to save it to the dbf?
What I am doing is passing the data with aParams then doing a
MyDBF->Text := aParams[2]
Jeff,
You may do:
cText = StrTran( cText, "\", "" )
unless you need to save "\" too
function Decode( cText )
cText = StrTran( cText, "\[", "[" )
cText = StrTran( cText, "\(", "(" )
cText = StrTran( cText, "\)", ")" )
cText = StrTran( cText, "\]", "]" )
cText = StrTran( cText, "\/", "/" )
cText = StrTran( cText, "\\", "\" )
return cTextThanks Antonio ... The same idea hit me on my drive home ![]()
Two more questions:
Is there a way to set a button as the default button so if the user hits the enter key it activates the button?
I'm trying to allow the user to select some "canned" text from a list and have it placed into the text field.
I need it to allow the user to keep adding if they want to select other items.
Is there any type of "refresh" for fields?