ASP, XML & javascript 
Author Message
 ASP, XML & javascript

Hello,

I''m fairly new to ASP, let''s say very new. I have made a small application handling XML files with Javascript code. The poit is, it runs only localy and cannot be put online. I thought that ASP could be the answer since it can handle file loading and saving on a server. So my questions are :

1) Is it possible to give the ASP the loading and saving responsabilities and thus leaving the main code in "raw" javascript ? What I mean is : Can I declare the XML object with ASP and then handle this object with Javascript ? It seems hard to me but maybe someone has a clue ?

2) The other possibility is to rewrite entirely my application in ASP (VBScript or Javascript) but my problem is that this application mainly reads in XML files and display their content on "textarea"s. If I try to do the same thing, the page will have to be reloaded each time the information to display will change ? In my case it is not very handy... :-(

If someone has some clues to help me out. I''ll explain more if needed of course.

Many thanks,

Fred

-----------------------------
This message is posted by http://www.*-*-*.com/



Wed, 22 Jun 2005 01:26:37 GMT  
 ASP, XML & javascript
Hi Fred.

Sounds you're saying starting point of using XML in ASP, if I properly
understand your question.

1)
<%
set x=createobject("msxml2.domdocument")
x.load server.mapPath(path)
response.contentrype="text/xml": response.write x.xml 'or x.save
server.mapPath(path2), or something else, Also possible with Java of which
I'm blind.
%>

2)
Textarea is a nice to place xml string of xml property. You need not reload
xml each time. You can dynamically populate the xml string for the textarea
in server-side. Or in the client-side you can query the server-side asp to
get xml without reloading or redirection. e.g.

sub button1_onclick
set x=createobject("msxml2.domdocument")
x.async=false: x.load "x.asp" 'or "x.xml"
textarea1.vaue=x.xml

All the code is written inline. If you have a problem to do it, let me know
that please.

--
Have a nice day.
Han Pohwan, Microsoft MVP, Korea


Quote:
> Hello,

> I''m fairly new to ASP, let''s say very new. I have made a small

application handling XML files with Javascript code. The poit is, it runs
only localy and cannot be put online. I thought that ASP could be the answer
since it can handle file loading and saving on a server. So my questions are
:
Quote:

> 1) Is it possible to give the ASP the loading and saving responsabilities

and thus leaving the main code in "raw" javascript ? What I mean is : Can I
declare the XML object with ASP and then handle this object with Javascript
? It seems hard to me but maybe someone has a clue ?
Quote:

> 2) The other possibility is to rewrite entirely my application in ASP

(VBScript or Javascript) but my problem is that this application mainly
reads in XML files and display their content on "textarea"s. If I try to do
the same thing, the page will have to be reloaded each time the information
to display will change ? In my case it is not very handy... :-(
Quote:

> If someone has some clues to help me out. I''ll explain more if needed of
course.

> Many thanks,

> Fred

> -----------------------------
> This message is posted by http://Asp.ForumsZone.com



Thu, 23 Jun 2005 13:56:09 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. FREE Tutorials on HTML XHTML CSS JavaScript XML XSL ASP SQL ADO VBScript, SAP - ABAP

2. VBScript/ASP & XML

3. Parsing XML from an ASP page that Creates XML fails

4. JavaScript Variables & ASP

5. ASP & Javascript Variables

6. Javascript,ASP & MSWINSCK

7. Javascript : print() & EI 4 &5

8. xmldoc.xml & string = bstr / Problem with encoding

 

 
Powered by phpBB® Forum Software