SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2005
    0 Post(s)
    0 Thread(s)

    How to replace html with other html with javascript

    Hey, I am trying to figure out how to replace something with javascript, instead of just add something underneath what I already have. To explain this better, I have my site set up:

    So, when you enter your email, it checks if it is valid, and then it sends the email, but underneath the text input box, it displays the text "thank you for your interest... bla bla bla"

    I would like to know if it is possible to instead of add that text at the bottom, to simply replace the the form that is above it.

    Here is the javascript code to insert it.
    Code JavaScript:
    getResponse: function(transport) {
    	var newData = transport.responseText;

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Christchurch, New Zealand
    104 Post(s)
    4 Thread(s)
    yes it's possible, but it will require someone who works with the Prototype library to properly advise.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts