Dear Rick,
I would show in GridColumn a short description in the link, and a long description on MouseOver.
I have seen MouseOver event, but I do not know how to manage it.
Please how to build something like ToolTipText?
Thank you very much for support.
You can use the title=Some text to display
attribute to add a simple tooltip.
For anything 'manual' you have to do a lot more work capturing the mouseenter
and mouseleave
or jQuery hover()
events and then manually creating the pop overs.
Alternately you can use Bootstrap and it's popover control.
Dear Rick,
I am trying HoverPanel windows, jusk like in your example:
https://webconnection.west-wind.com/docs/_1q100dywk.htm
I did build a Column expression like
Expression="HRef([Attivita.wc?Id=]+alltrim(Day7)+[ onmouseover=LookupPanel.startCallback(event,Id=]+alltrim(Day7)+[)] +[ onmouseout=LookupPanel.hide()] ,Time7)"
This is the link in browser:
I added the hoverpanel to the page:
<ww:wwHoverPanel ID="LookupPanel" runat="server"
EventHandlerMode="ShowHtmlAtMousePosition"
ServerUrl=""
NavigateDelay="250"
PostbackMode="Post"
ScriptLocation="WebResource"
CssClass="blackborder"
Style="display: none; background: white;"
PanelOpacity="0.89"
ShadowOffset="8"
ShadowOpacity="0.18">
</ww:wwHoverPanel>
I added on OnLoad()
IF .LookupPanel.IsCallback
.ShowCustomerDetail()
RETURN
ENDIF
But nothing happen and ShowCustomerDetail() never runs.
Why OnMouseOver does not trigg?
Please what is wrong?
Thank you very much for support.
I'm only guessing but I would say you have invalid HTML/JavaScript syntax. When you include action elements the values need to be contained within double quotes.
The expression you show is not what is being used to generate the GIF image you posted... and the posted GIF image is missing the double quotes around the HTML Events for onMouseOver() and onMouseOut()!
First the expression you posted in Foxpro Code, your first parameter "ID" in your GIF is spelled out as "IDAttivita=".
Next, when you call on an HTML event within an element, the JavaScript must be contained within double quotes. These are missing in both the FoxPro code you show and the GIF image you posted.
Expression="HRef([Attivita.wc?Id=]+alltrim(Day7)+[ onmouseover=LookupPanel.startCallback(event,Id=]+alltrim(Day7)+[)] +[ onmouseout=LookupPanel.hide()] ,Time7)"
My best guess:
Expression='HRef([Attivita.wc?IdAttivita=]+alltrim(Day7)+[ onmouseover="LookupPanel.startCallback(event,Id=]+alltrim(Day7)+[)"] +[ onmouseout="LookupPanel.hide()] ,Time7)"'
If it still does not work you need to post the actual code that is being used to generate the HTML, the GIF does not match the FoxPro you posted.
Best
Dear Harvey,
Many thanks again for support, I am following now the "Calling back to the Current Page" section of Rick example, utilizing wwWebErrorDisplay object.
I have the HoverPanel:
<ww:wwHoverPanel ID="LookupPanel" runat="server"
EventHandlerMode="ShowHtmlAtMousePosition"
ServerUrl=""
NavigateDelay="250"
PostbackMode="Post"
ScriptLocation="WebResource"
CssClass="blackborder"
Style="display: none; background: white;"
PanelOpacity="0.89"
ShadowOffset="8"
ShadowOpacity="0.18">
</ww:wwHoverPanel>
I use on grid column:
Expression="this.Page.CompanyColumnExpression()"
This is the function:
**********************************
FUNCTION CompanyColumnExpression()
**********************************
RETURN [<a href="Attivita.wc?IdAttivita=] + Giorno7 + [" ] +;
[ onmouseover="LookupPanel.startCallback(event,'IdAttivita=] + ALLTRIM(Giorno7) + [');" ] +;
[onmouseout="LookupPanel.hide();" ]+ ;
[>] + DaOra7 + [</a>]
ENDFUNC
I added in OnLoad():
IF .LookupPanel.IsCallback
.ShowCustomerDetail()
RETURN
ENDIF
This is the function:
*****************************
FUNCTION ShowCustomerDetail()
*****************************
lcID = Request.Params("IdAttivita")
loError = CREATEOBJECT("wwWebErrorDisplay")
loError.width = 350
loError.ErrorImage = "~/webControls/images/warning.gif"
loError.InfoImage = "~/webControls/images/info.gif"
=SEEK(lcID,"Attivita","idattivita")
m.Desc1=ALLTRIM(Attivita.Desc1)
loError.ShowMessage(;
"<b>"+;
m.Desc1+;
"</b>")
Response.Write(loError.Render())
Response.End()
ENDFUNC
OnMouseOver triggs, in debug I see text passed to wwWebErrorDisplay.ShowMessage(), I see class wwHoverPanel to run in WebControlsJquery.prg and I see the postback activity on console:
Calendario2.wc?IdAttivita=74&__WWEVENTCALLBACK=LookupPanel
However I do not see any HoverPanel and wwWebErrorDisplay in the page.
I have the same problem both in Chrome and FireFox.
I cannot understand what is wrong.
I tryed all of examples on documentation, but I never seen HoverPanel
https://webconnection.west-wind.com/docs/_1q100dywk.htm
Please, is not possible to get a result like this one showed on documentation?
I am using Web Connection 6.05
Dear Rick,
why I cannot define Title property in FoxPro?
I see Column's Text and Tooltip properties in debug, but I do not see Title property and I get error with:
this.Column7.Title="some text"
Unfortunately Tooltip property does not get any tooltip to the column text.
Many thanks for support.
Luca,
in this case "title" is used as a HTML attribute, it's not a VFP property.
So is there no way to set it programmatically?
Simply add it to the HTML you already have in CompanyColumnExpression().
I tryed, but it does not work, please could show an example?
Thank you, Tore.
Something like this should work, not tested. Unfortunately I only work with this irregularly, so I don't remember all the specifics.
**********************************
FUNCTION CompanyColumnExpression()
**********************************
RETURN [<a href="Attivita.wc?IdAttivita=] + Giorno7 + [" ] +;
[title="Some text to show"] + ;
[ onmouseover="LookupPanel.startCallback(event,'IdAttivita=] + ALLTRIM(Giorno7) + [');" ] +;
[onmouseout="LookupPanel.hide();" ]+ ;
[>] + DaOra7 + [</a>]
ENDFUNC
Finally I have a result!
If is not possible to get a better result with HoverPanel then I will use Title attribute.
Thank you very much again, Tore.
Dear Rick,
I followed step by step your example in
https://webconnection.west-wind.com/docs/_1q100dywk.htm
calling back to the current page using wwWebErrorDisplay.
In page's source I see the LooupPanel
<div id="LookupPanel" class="blackborder" style="display: none; background: white;" >
</div>
and I see the script function
<script type="text/javascript">
$().ready( function() {
$("#LookupPanel").draggable( { }).shadow( { offset: 8, opacity: 0});
});
function LookupPanel_GetHoverPanel() {
var hover = new HoverPanel("#LookupPanel");
hover.serverUrl = "/renieri/Calendario2.wc";
hover.completed = null;
hover.errorHandler = null;
hover.postbackMode = "Post";
hover.navigateDelay = 250;
hover.adjustWindowPostition = true;
hover.eventHandlerMode = "ShowHtmlAtMousePosition";
hover.panelOpacity = 0;
hover.shadowOffset = 8;
hover.shadowOpacity = 0;
hover.hoverOffsetRight = 0;
hover.hoverOffsetBottom = 0;
return hover;
}
var LookupPanel = LookupPanel_GetHoverPanel();$('#LookupPanel').hover(
function () { LookupPanel.show(); },
function () { LookupPanel.hide(); });
$('#LookupPanel').css( {opacity: 0});
</script>
I see IsCallBack triggers in page OnLoad()
IF .LookupPanel.IsCallback
.ShowCustomerDetail()
RETURN
ENDIF
I see ShowCustomerDetail() compile text for wwWebErrorDisplay
*****************************
FUNCTION ShowCustomerDetail()
*****************************
lcID = Request.Params("IdAttivita")
loError = CREATEOBJECT("wwWebErrorDisplay")
loError.width = 350
loError.ErrorImage = "~/webControls/images/warning.gif"
loError.InfoImage = "~/webControls/images/info.gif"
=SEEK(lcID,"Attivita","idattivita")
m.Desc1=ALLTRIM(Attivita.Desc1)
loError.ShowMessage(;
"<b>"+;
m.Desc1+;
"</b>")
Response.Write(loError.Render())
Response.End()
ENDFUNC
but I do not see any HoverPanel.
Please what is wrong?
I tryed to run demo page (wcDemoMain.prg) but also AJAX HoverPanel sample does not show HoverPanel.
I know Framework is deprecated, but I am using WC 6.05 that was not deprecated when you issued it.
I am enthusiast to develop still with WC and FoxPro, because I work thanks to WC.
Thank you very much for support.