faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 3 people (33%) answered Yes
Recently 1 of 3 people (33%) answered Yes

Entry

how would i delete text from a page made by document.write() command

Apr 6th, 2008 19:57
ha mo, Colin Fraser, Simon Horlick,


I do understand that there is not a lot of space to ask very difficult
questions, so I can only respond in the same general tone. Your question
does not refer to the conditions under which you may want to change a
page. Having said that you may want to follow up and find information
about :
     Boolean conditionals and IF statements
     Arrays and pages
     innerHTML and innerTEXT 
The real problem I can see is determining what needs be written in
response to what conditions exist and when those conditions change.
Using the browser as a condition :  
      if (IE)
         dothis()
      else
         dothat()
is easy. As well, using User responses is also easy 
     name=prompt("What is your name?"," ")
     if (name=="john") 
        dothis(name)
     else
        if (name=="mary")
           dothat(name)
        else
           dosomethingdifferent(name)
   **these examples are for illustration only.**
Arrays are different and I dont want to give an example here, too long
to explain, but I understand the W3C Schools has information on 
arrays here..
           http://www.w3schools.com/js/js_arrays.asp
and can explain it better than me.. It is not too difficult to assign
pages as array values or use different array values to wite different
blocks of text, providing that you have set your arrays up correctly. 
As far as I am aware, innerHTML and innerTEXT are, for the moment, IE
specific, but I have been told that Netscape6.x will handle them
adequately, so you may want to look at Microsoft's MSDN for information... 
      http://msdn.microsoft.com/library/default.asp
however, using the Dark Side for anything can be dangerous... 
However, be aware that the more complex your coding is the longer it
will take to load a page, and the more things can go wrong and turn your
brilliant page into trash efficiently and with style.... 
Good luck...
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com