Hi,
How can I refer to inputs ina a page loaded by ajax in a div from parent and vice versa?
I already tred parent.form.element and also opener.form.element with no luck..
| SitePoint Sponsor |

Hi,
How can I refer to inputs ina a page loaded by ajax in a div from parent and vice versa?
I already tred parent.form.element and also opener.form.element with no luck..




once you are done with copying the ajax loaded content to some div, you can start refering to certain DOM object.





Well, you can't access variable from server side. Maybe you can do something like :
e.g. in PHP
then you can access myvar in your javascript application.echo "<script>var myvar = ".$myvar_value."</script>";

So there's no way to refer to inputs on the loaded page from parent?
Are you using innerHTML?
We miss you, Dan Schulz.
Learn CSS. | X/HTML Validator | CSS validator
Dynamic Site Solutions
Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

Ah. That's probably your problem. innerHTML is a non-standard property. It doesn't always play nice. Be very careful how you use it. I suggest you read this: HTML text as JS string
These links are included in that thread but I'll include them here too:
DOM Scripting: The innerHTML dilemma
InnerHTML is Evil
We miss you, Dan Schulz.
Learn CSS. | X/HTML Validator | CSS validator
Dynamic Site Solutions
Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.
Bookmarks