DHTML object model parsing under ASP

Discussion in 'ASP General' started by egg, Oct 9, 2004.

  1. egg

    egg Guest

    Dear Sir/Madam,

    I'm about to start a project, the idea is to have a web interface to let
    user specify the URL of a target HTML document,
    based on that URL, retrieved and parsed the HTML document using the DHTML
    object model exposed by ActiveX
    control WebBrowser, getting the position and dimension of each node inside
    the HTML document, processed it and pass
    the result back to the user as a new HTML document.

    I understand by using webBrowser control, it will means load of works for
    server and is not recommended, but I couldn't
    find any other solution that could get the DHTML object model, specifically
    those dimension info for nodes, eg: *.clientWidth,
    *.clientHeight, *.offsetheight, etc. or perhaps there are better ways?

    Thank you for all your time reading this

    Sincerely,
    Egg
     
    egg, Oct 9, 2004
    #1
    1. Advertising

  2. egg wrote:
    > Dear Sir/Madam,
    >
    > I'm about to start a project, the idea is to have a web interface to
    > let user specify the URL of a target HTML document,
    > based on that URL, retrieved and parsed the HTML document using the
    > DHTML object model exposed by ActiveX
    > control WebBrowser, getting the position and dimension of each node
    > inside the HTML document, processed it and pass
    > the result back to the user as a new HTML document.



    ????
    I don't get it. Why not just response.write the html to the client? why is
    it necessary to parse it?


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Oct 9, 2004
    #2
    1. Advertising

  3. egg

    egg Guest

    Dear Sir,

    I understand that, getting the *.clientHeight or any other information from
    DHTML object model is easy from any browser,
    but the targeted user are those that using pocket pc based devices, and
    pocket IE doesn't support DHTML object model
    at all, what I need to do is get a page the user want, parsed it to
    webbrowser or mshtml, so the the dimension and position
    of each node inside the DOM can be retrieved and further computation can be
    done on the server side before passing it
    back to the client pocket pc browser.

    I hope that clear my question a bit better.

    Thanks again for your time.

    Sincerely,
    Egg

    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > egg wrote:
    > > Dear Sir/Madam,
    > >
    > > I'm about to start a project, the idea is to have a web interface to
    > > let user specify the URL of a target HTML document,
    > > based on that URL, retrieved and parsed the HTML document using the
    > > DHTML object model exposed by ActiveX
    > > control WebBrowser, getting the position and dimension of each node
    > > inside the HTML document, processed it and pass
    > > the result back to the user as a new HTML document.

    >
    >
    > ????
    > I don't get it. Why not just response.write the html to the client? why is
    > it necessary to parse it?
    >
    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >
     
    egg, Oct 9, 2004
    #3
  4. Sorry, but no, it's not any clearer. I'm going to back out of this
    discussion.

    Bob Barrows

    egg wrote:
    > Dear Sir,
    >
    > I understand that, getting the *.clientHeight or any other
    > information from DHTML object model is easy from any browser,
    > but the targeted user are those that using pocket pc based devices,
    > and pocket IE doesn't support DHTML object model
    > at all, what I need to do is get a page the user want, parsed it to
    > webbrowser or mshtml, so the the dimension and position
    > of each node inside the DOM can be retrieved and further computation
    > can be done on the server side before passing it
    > back to the client pocket pc browser.
    >
    > I hope that clear my question a bit better.
    >
    > Thanks again for your time.
    >
    > Sincerely,
    > Egg
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:...
    >> egg wrote:
    >>> Dear Sir/Madam,
    >>>
    >>> I'm about to start a project, the idea is to have a web interface to
    >>> let user specify the URL of a target HTML document,
    >>> based on that URL, retrieved and parsed the HTML document using the
    >>> DHTML object model exposed by ActiveX
    >>> control WebBrowser, getting the position and dimension of each node
    >>> inside the HTML document, processed it and pass
    >>> the result back to the user as a new HTML document.

    >>
    >>
    >> ????
    >> I don't get it. Why not just response.write the html to the client?
    >> why is it necessary to parse it?
    >>
    >>
    >> --
    >> Microsoft MVP - ASP/ASP.NET
    >> Please reply to the newsgroup. This email account is my spam trap so
    >> I don't check it very often. If you must reply off-line, then remove
    >> the "NO SPAM"


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Oct 9, 2004
    #4
  5. "egg" <> wrote in message
    news:...
    > Dear Sir,
    >
    > I understand that, getting the *.clientHeight or any other information
    > from
    > DHTML object model is easy from any browser,
    > but the targeted user are those that using pocket pc based devices, and
    > pocket IE doesn't support DHTML object model
    > at all, what I need to do is get a page the user want, parsed it to
    > webbrowser or mshtml, so the the dimension and position
    > of each node inside the DOM can be retrieved and further computation can
    > be
    > done on the server side before passing it
    > back to the client pocket pc browser.



    You might go into the asp.net platform which is able to produce WML and all
    that sort of non-HTML extensions.

    In addition, you could use XML + DTD + XSLT to produce any output you wish.
    But that is a more hard way to support client-platforms.

    > I hope that clear my question a bit better.
    >
    > Thanks again for your time.
    >
    > Sincerely,
    > Egg
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:...
    >> egg wrote:
    >> > Dear Sir/Madam,
    >> >
    >> > I'm about to start a project, the idea is to have a web interface to
    >> > let user specify the URL of a target HTML document,
    >> > based on that URL, retrieved and parsed the HTML document using the
    >> > DHTML object model exposed by ActiveX
    >> > control WebBrowser, getting the position and dimension of each node
    >> > inside the HTML document, processed it and pass
    >> > the result back to the user as a new HTML document.

    >>
    >>
    >> ????
    >> I don't get it. Why not just response.write the html to the client? why
    >> is
    >> it necessary to parse it?
    >>
    >>
    >> --
    >> Microsoft MVP - ASP/ASP.NET
    >> Please reply to the newsgroup. This email account is my spam trap so I
    >> don't check it very often. If you must reply off-line, then remove the
    >> "NO SPAM"
    >>
    >>

    >
    >
     
    Egbert Nierop \(MVP for IIS\), Oct 9, 2004
    #5
  6. egg

    egg Guest

    Thank you for replying.

    For example, a pocket pc user open a page www.someplace.com on pocket IE,
    that page has a single input box and a single submit button
    user type in www.hotmail.com in the input box, pressed the submit button,
    that url is then passed to server, with a webbrowser/mshtml contol
    accepting and loading that page inside the control itself, thus all nodes
    are accessible via DOM, eg: document.clientHeight will return the height
    value of the current html document, in this case, www.hotmail.com main page.
    After processing those information on the server, new html page
    will be created and return as result to the client browser, in this case,
    the pocket IE of that pocket pc user.

    Will it make more sense using CGI instead of asp? is there a better way of
    parsing html other than webbrowser/mshtml control which still allowed
    access to the dhtml object model?

    Again, thanks for not abandoning my post just like that..

    Sincerely,
    Egg

    "Egbert Nierop (MVP for IIS)" <> wrote in
    message news:...
    > "egg" <> wrote in message
    > news:...
    > > Dear Sir,
    > >
    > > I understand that, getting the *.clientHeight or any other information
    > > from
    > > DHTML object model is easy from any browser,
    > > but the targeted user are those that using pocket pc based devices, and
    > > pocket IE doesn't support DHTML object model
    > > at all, what I need to do is get a page the user want, parsed it to
    > > webbrowser or mshtml, so the the dimension and position
    > > of each node inside the DOM can be retrieved and further computation can
    > > be
    > > done on the server side before passing it
    > > back to the client pocket pc browser.

    >
    >
    > You might go into the asp.net platform which is able to produce WML and

    all
    > that sort of non-HTML extensions.
    >
    > In addition, you could use XML + DTD + XSLT to produce any output you

    wish.
    > But that is a more hard way to support client-platforms.
    >
    > > I hope that clear my question a bit better.
    > >
    > > Thanks again for your time.
    > >
    > > Sincerely,
    > > Egg
    > >
    > > "Bob Barrows [MVP]" <> wrote in message
    > > news:...
    > >> egg wrote:
    > >> > Dear Sir/Madam,
    > >> >
    > >> > I'm about to start a project, the idea is to have a web interface to
    > >> > let user specify the URL of a target HTML document,
    > >> > based on that URL, retrieved and parsed the HTML document using the
    > >> > DHTML object model exposed by ActiveX
    > >> > control WebBrowser, getting the position and dimension of each node
    > >> > inside the HTML document, processed it and pass
    > >> > the result back to the user as a new HTML document.
    > >>
    > >>
    > >> ????
    > >> I don't get it. Why not just response.write the html to the client? why
    > >> is
    > >> it necessary to parse it?
    > >>
    > >>
    > >> --
    > >> Microsoft MVP - ASP/ASP.NET
    > >> Please reply to the newsgroup. This email account is my spam trap so I
    > >> don't check it very often. If you must reply off-line, then remove the
    > >> "NO SPAM"
    > >>
    > >>

    > >
    > >

    >
     
    egg, Oct 9, 2004
    #6
  7. egg

    Mark Schupp Guest

    I think clientHeight will return the window size of the rendering window in
    the browser control, not the "design" size of the page.

    You would probably be better off asking about this on a client-side HTML or
    IE newsgroup.

    --
    Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com


    "egg" <> wrote in message
    news:...
    > Thank you for replying.
    >
    > For example, a pocket pc user open a page www.someplace.com on pocket IE,
    > that page has a single input box and a single submit button
    > user type in www.hotmail.com in the input box, pressed the submit button,
    > that url is then passed to server, with a webbrowser/mshtml contol
    > accepting and loading that page inside the control itself, thus all nodes
    > are accessible via DOM, eg: document.clientHeight will return the height
    > value of the current html document, in this case, www.hotmail.com main

    page.
    > After processing those information on the server, new html page
    > will be created and return as result to the client browser, in this case,
    > the pocket IE of that pocket pc user.
    >
    > Will it make more sense using CGI instead of asp? is there a better way of
    > parsing html other than webbrowser/mshtml control which still allowed
    > access to the dhtml object model?
    >
    > Again, thanks for not abandoning my post just like that..
    >
    > Sincerely,
    > Egg
    >
    > "Egbert Nierop (MVP for IIS)" <> wrote in
    > message news:...
    > > "egg" <> wrote in message
    > > news:...
    > > > Dear Sir,
    > > >
    > > > I understand that, getting the *.clientHeight or any other information
    > > > from
    > > > DHTML object model is easy from any browser,
    > > > but the targeted user are those that using pocket pc based devices,

    and
    > > > pocket IE doesn't support DHTML object model
    > > > at all, what I need to do is get a page the user want, parsed it to
    > > > webbrowser or mshtml, so the the dimension and position
    > > > of each node inside the DOM can be retrieved and further computation

    can
    > > > be
    > > > done on the server side before passing it
    > > > back to the client pocket pc browser.

    > >
    > >
    > > You might go into the asp.net platform which is able to produce WML and

    > all
    > > that sort of non-HTML extensions.
    > >
    > > In addition, you could use XML + DTD + XSLT to produce any output you

    > wish.
    > > But that is a more hard way to support client-platforms.
    > >
    > > > I hope that clear my question a bit better.
    > > >
    > > > Thanks again for your time.
    > > >
    > > > Sincerely,
    > > > Egg
    > > >
    > > > "Bob Barrows [MVP]" <> wrote in message
    > > > news:...
    > > >> egg wrote:
    > > >> > Dear Sir/Madam,
    > > >> >
    > > >> > I'm about to start a project, the idea is to have a web interface

    to
    > > >> > let user specify the URL of a target HTML document,
    > > >> > based on that URL, retrieved and parsed the HTML document using the
    > > >> > DHTML object model exposed by ActiveX
    > > >> > control WebBrowser, getting the position and dimension of each node
    > > >> > inside the HTML document, processed it and pass
    > > >> > the result back to the user as a new HTML document.
    > > >>
    > > >>
    > > >> ????
    > > >> I don't get it. Why not just response.write the html to the client?

    why
    > > >> is
    > > >> it necessary to parse it?
    > > >>
    > > >>
    > > >> --
    > > >> Microsoft MVP - ASP/ASP.NET
    > > >> Please reply to the newsgroup. This email account is my spam trap so

    I
    > > >> don't check it very often. If you must reply off-line, then remove

    the
    > > >> "NO SPAM"
    > > >>
    > > >>
    > > >
    > > >

    > >

    >
    >
     
    Mark Schupp, Oct 11, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wade D. Peterson
    Replies:
    0
    Views:
    771
    Wade D. Peterson
    Sep 10, 2003
  2. Jon Davis
    Replies:
    23
    Views:
    1,318
    Jon Davis
    Dec 18, 2004
  3. Replies:
    1
    Views:
    496
    Andreas Wollschlaeger
    Oct 6, 2006
  4. =?Utf-8?B?Znc=?=
    Replies:
    0
    Views:
    464
    =?Utf-8?B?Znc=?=
    Oct 4, 2007
  5. Steve
    Replies:
    1
    Views:
    292
    Richard Cornford
    Apr 9, 2005
Loading...

Share This Page