Hi all, I've been slaving over this for quite a while.
Scenario: I have a form connected to a Data Source(sql server).
Problem: I can't seem to get any values returned from the fields via Jscript.
Not sure if I'm correctly accessing the fields but here's my code:
function
msoxd__Facilities_PurchaseOrderForm_Quantity1_attr::OnAfterChange(eventObj)
{
var quantity =
("//dfs:myFields/dfs:dataFields/d:Facilities_PurchaseOrderForm/@Quantity1").text;
XDocument.UI.Alert(quantity);
}
I'm not getting any data output to the alert. Any ideas? And thank you in
advance!
S.Y.M. Wong-A-Ton - 07 Apr 2006 09:01 GMT
I'm missing a reference to the Main DOM. You are just listing an XPath
expression here in your code.
Try this:
var quantity =
XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:Facilities_PurchaseOrderForm/@Quantity1").text;
---
S.Y.M. Wong-A-Ton
> Hi all, I've been slaving over this for quite a while.
>
[quoted text clipped - 16 lines]
> I'm not getting any data output to the alert. Any ideas? And thank you in
> advance!