I will try to get a chance to look over this again, but as I recall you were pretty confused back then with that other thread and it appears that you are here as well. The red highlighted part of your code is nonsense as far as I can tell:
Code:
setAttribute("src", .getAttribute("href")
Both setAttribute() and getAttribute() require objects (these are most often if not exclusively HTML elements) that they will 'act on' in the form of:
Code:
object.setAttribute('attribute_name', 'attribute_value', 0);
and:
Code:
object.getAttribute('attribute_name', 0);
They can be combined somewhat like what you have:
Code:
object.setAttribute('src', another_object.getAttribute('href', 0), 0);
However, not all browsers will necessarily see the src and href attributes as qualifying for a get and set in this manner. Testing would be required to verify that the code is executing properly. Generally, you can do the same thing like so though:
Code:
object.src=another_object.href;
But, since multimedia tags appear to be involved, this approach should also be tested before being relied upon. And, if <param> elements of an <object> tag are also what you want to set or get, you must get them as javascript HTML element objects, not just their parent <object> tag elements.
Note: The 0's are just to satisfy a rare but sometimes essential requirement in IE.
Bookmarks