To Javascript, or not to Javascript

Discussion in 'NZ Computing' started by Shane, Aug 29, 2005.

  1. Shane

    Shane Guest

    Im in need of a method to change the information displayed in part of a
    webpage, depending on certain events.
    I thought frames would be the way this was done, but didnt like the
    thought of frames in my pages, asked around and was told xml-http-request
    might be what I'm looking for.
    However, there is a _strong_ posssibilty that some or all of my pages will
    be viewed with a text browser, and that lynx wont handle Javascript.
    Ideas?
    Be ya best friend... honest :)
    TIA
     
    Shane, Aug 29, 2005
    #1
    1. Advertisements

  2. Shane

    AD. Guest

    Seeing you mentioned xml-http-request, I assume you need to get data from
    or send data to the server without page reloads?
    Without Javascript (or some sort of plugin eg Java or Flash), the only way
    of updating anything would be with page reloads and server side code.
    Apparently some 'ajax' libraries will degrade gracefully to page loads if
    the client does not support xml-http-request. But don't quote me on that :)
     
    AD., Aug 30, 2005
    #2
    1. Advertisements

  3. Shane

    Shane Guest

    At times there is need to send data to the server, Id prefer not to reload
    the whole page, but at this point I dont think there is much choice

    What serverside code would be required?.. Ive managed to get my scripts
    down to 6 seconds, from >25 seconds, so Im not in a hurry to put much load
    back on the server if I can help it

    http://en.wikipedia.org/wiki/AJAX
    hmm
    I _might_ have to stay with the JScript, and look at an alternative for
    Browsers that dont/wont support it
     
    Shane, Aug 30, 2005
    #3
  4. Shane

    AD. Guest

    I dunno, depends on what you want to do. But I imagine that it's the same
    code you already have, it's just that you end up calling it more often
    with different parameters.
     
    AD., Aug 30, 2005
    #4
  5. Shane

    Ron McNulty Guest

    I came across a site once that had information on using CSS to update parts
    of a progress popup window during a long-running operation. Unfortunately I
    can't find it now. It used the absolute positioning capabilities of CSS to
    update specific parts of the window. Sounds like the same technique could be
    harnessed to do what you are want.

    I'm not a CSS expert, but someone else might be able to expand on this.

    Otherwise I think JS is your only option.

    Regards

    Ron
     
    Ron McNulty, Aug 30, 2005
    #5
  6. T'was the Tue, 30 Aug 2005 22:39:53 +1200 when I remembered "Ron
    I haven't seen anything in the CSS spec that would allow for this, not
    to say it isn't there, but I haven't seen it. Perhaps an answer to
    your problem might be AJAX (Asynchronous JavaScript and XML), which is
    explained here http://en.wikipedia.org/wiki/AJAX, and allows websites
    to have kind of functionality as the Gmail (http://gmail.google.com)
    website.
     
    Waylon Kenning, Aug 30, 2005
    #6
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.