i'm having a problem with a little Javascript in a link
Sorry that it is all in a line but it is actually a link. Please wrap.
This results in a new page with only "Initially processing" showing
Expand|Select|Wrap|Line Numbers
- <a href="javascript:var Aobj = document.getElementsByTagName('span'); for (var i = 0;i < Aobj.length;i++) { if (Aobj[i].className === 'SLA') { Aobj[i].innerHTML += 'Initially processing'; Aobj[i + 1].innerHTML = ''; } }"><br/>Read more</a>
Expand|Select|Wrap|Line Numbers
- <a href="javascript:var Aobj = document.getElementsByTagName('span'); for (var i = 0;i < Aobj.length;i++) { if (Aobj[i].className === 'SLA') { Aobj[i].innerHTML += 'Initially processing'; Aobj[i + 1].innerHTML = ''; alert("stop") } }"><br/>Read more</a>
Expand|Select|Wrap|Line Numbers
- <a href="javascript:var Aobj = document.getElementsByTagName('span'); for (var i = 0;i < Aobj.length;i++) { if (Aobj[i].className === 'SLA') { Aobj[i].innerHTML += 'Initially processing'; Aobj[i + 1].innerHTML = ''; whateverbla } }"><br/>Read more</a>
Can you tell me if i am doing anything wrong or tell me what i could do to stop executing (break results in empty page only).
I can not exclude that the error is somewhere else because i am working in a company corporate portal environment and i don't control everything there.
Thanks in advance and
best Regards
Marcel