Hi All,
I am a newby to XML. I'm not even sure all that it can do but I have a project that is making use of it so I am having to learn it. I have received some Open Source Code that has everything I need for the most part. I just need to add some more functionality. Enough chit-chat. Here is my question.
I want my XML/JScript to call a ASP Function. I am very familiar with ASP and VBScript but lacking in the area of JScript and XML.
I have an ASP file that reads as follows.
index.asp
-----------------------------------
<html XMLNS:XS>
<head>
<?import namespace="XS" implementation="htmlEditor.htc" />
</head>
<body style="margin: 0, 0, 0, 0;">
<XS:htmlEditor id="xsEditor" onSave="alert(xsEditor.content);"/>
</body>
</html>
<%
Function Whatever()
'Do whatever I want to do here
End Function
%>
------------------------------
The onSave is called by the following code which comes from htmlEditor.htc:
htmlEditor.htc
----------------------------
<public:component tagName=htmlEditor>
<public:event name="onSave" ID="editorSave" />
</public:component>
function buttonClick(button) {
if(command=='Save') {
var oEvent = createEventObject();
editorSave.fire(oEvent);
}
)
<span id="buttonSave" command="Save"
onClick="buttonClick('buttonSave');this.state=false;" <img src="icon_save.gif" alt="Save"></span>
------------------------
This is obviously not all the code but I think it is enough for you to get the idea of what is going on. I want to call the function Whatever() from the onSave event instead of it firing the alert.
Any help would be greatly appreciated.
WaltD
I am a newby to XML. I'm not even sure all that it can do but I have a project that is making use of it so I am having to learn it. I have received some Open Source Code that has everything I need for the most part. I just need to add some more functionality. Enough chit-chat. Here is my question.
I want my XML/JScript to call a ASP Function. I am very familiar with ASP and VBScript but lacking in the area of JScript and XML.
I have an ASP file that reads as follows.
index.asp
-----------------------------------
<html XMLNS:XS>
<head>
<?import namespace="XS" implementation="htmlEditor.htc" />
</head>
<body style="margin: 0, 0, 0, 0;">
<XS:htmlEditor id="xsEditor" onSave="alert(xsEditor.content);"/>
</body>
</html>
<%
Function Whatever()
'Do whatever I want to do here
End Function
%>
------------------------------
The onSave is called by the following code which comes from htmlEditor.htc:
htmlEditor.htc
----------------------------
<public:component tagName=htmlEditor>
<public:event name="onSave" ID="editorSave" />
</public:component>
function buttonClick(button) {
if(command=='Save') {
var oEvent = createEventObject();
editorSave.fire(oEvent);
}
)
<span id="buttonSave" command="Save"
onClick="buttonClick('buttonSave');this.state=false;" <img src="icon_save.gif" alt="Save"></span>
------------------------
This is obviously not all the code but I think it is enough for you to get the idea of what is going on. I want to call the function Whatever() from the onSave event instead of it firing the alert.
Any help would be greatly appreciated.
WaltD