The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
RegExp.replace Not Working
I'm using the following function to modify tags used for mouseover text:
Code:
function delHoverX() { re = /(\bdsc00001\b)/i; imgTags = document.getElementsByTagName("img"); for (i=0; i<imgTags.length; i++) { if (re.test(imgTags[i].title)) { origTitle = imgTags[i].title; origAlt = imgTags[i].alt; imgTags[i].title.replace(re, "$1"); imgTags[i].alt.replace(re, "$1"); if (origTitle == imgTags[i].title && origAlt == imgTags[i].alt) { imgTags[i].title = "same"; imgTags[i].alt = "same"; } } else { imgTags[i].title = ""; imgTags[i].alt = ""; } } } For some reason, the regexp.replace is not working. There is a test clause in there to help me diagnose some of what's going on. I'm not a Javascript programmer. I only have a limited background in C. I've been working on this for 2 days and am frustrated out of my mind. Any assistance appreciated. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|