Crossrider Extension fails to get ChildNodes of Object Element in chrome
I have to select a param which is child of Object Element in the DOM.
I am using plain javascript to Select element like below
var param=document.querySelector("param[name=flashvars]");
console.log(param);
I am failing to do so and i am getting element as null.
can somebody help to get this resolved or any work arounds for the same.
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.
Twitter,
Facebook, or email.
Crossrider Extension fails to get ChildNodes of Object Element in chrome
-
Hello Saikiran,
I understand that you are having an issue with getChildNodes in Chrome. Usually, this works without problems and looking at your example I'm not clear why you are not using var param=document.querySelector("[name=flashvars]"); which woks as expected (what's the extra term param in the selector for?).
Try removing the extra term param, but if you require further assistance I need to take a closer look.
Therefore, please provide as much of the following information as possible and I will investigate:
- The extension id
- The file/line number where the code snippet can be found
- Which browser and operating system you are testing on, including version numbers
- The exact steps for reproducing the problem
- Any additional useful data, such as URLs, screenshots, videos, ...
-
-
Hai Shlomo,
param is the child node in Object element in the DOM, so i need to select a param element with flashvars attribute and retrieve its value attribute.
Here is the information u have asked for
1.72380
2.line number is 22
3. os is Windows7
4. try to select any element with an attribute and you will get null in chrome.
5. http://www.metacafe.com/watch/1141298...
I have taken this url as example and i am selecting child of Object element in the DOM which has flashvars as attributes and retrieving it's value attribute.
Hope this info is sufficient and please get back to me if you need more info. -
-
Hello Saikiran,
Thanks for the additional information. I checked your code and tested in Chrome and the problem is not the querySelector but the use of jQuery's .attr() with a regular DOM element. Instead use .value, as follows:var param=document.querySelector("[name=flashvars]").value; -
-
Sorry that is a typo,
I can't able to read element itself. did u tested it
var param=document.querySelector("[name=flashvars]");-
Yes, I tested it and it worked as expected.
-
-
-
-
Loading Profile...




EMPLOYEE
