yeah i just had a why am i being such an idiot moment where i realised all i need is this
function changeDiscription (newdiscription){
document.getElementById('discriptionPlaceholder').firstChild.nodeValue = newDiscription ;
}
all i wanted to do was change the text displayed in a p tag i tryed document.write() at first so i got to thinking about reloading the tag but that seamed like more trouble then it was worth then found out i could just replace the tag rather then reloading it but that maid keeping track of the id a pain but just now i thought it why am i replacing this there is nothing wrong with it i just need to change the text node in it and since that's the only child it has its the first child so all i need to do is change the value of that
Quote:
|
Why change the content of something instead of just SWITCHING which content is being displayed???
|
mostly laziness im making this for my dads site and i dont want him to come to me every time he wants to add something but he can handle uploading one file resizing and renaming pictures then uploading them so im going to get everything working then switch over to an external javascript then write a small program for him that reads that .js file tells him what is there. then asks if he wants to change any thing? if he does it will alter the value stored in that part of the array in the .js file then it will asks if he wants to add anything new? if he does it will add the 15 new values he gives it in to the array in the .js file for him then i can make him lots of the same page and all i have to change is the value of 15 numbers on each rather then the value of 30 numbers on each actually there will be 2 more to determine weather or not to display a previous or next page link based on the size of the array so by changing content rather changing weather not im displaying it since i was planning to do 100 pages to start him off that's 1500 extra tedious boring edits i get to skip which is the part of programming i hate figuring out how to make something work i enjoy but once i have it working the way i want i find stuff like data entry so what i wrote is actually useful boring
Quote:
|
(And have to point out that the correct spelling is dEscription. Sorry.)
|
yeah i know i have bad spelling but at least i have consistently bad spelling so i will spell it wrong the same way every time and as long as all my variables are spelled the same they will work it occasionally causes me problems when i spell one of the reserved words wrong but thats why i use a editor that colors my code so i know i messed up right away