tags:

views:

78

answers:

1

Hello. In my main page, I have a div showing some external html content. Here I have some radio buttons. When the user select a radio, the form of the parent page shound be updated.

The external code is like this:

function updateForm(val){
  $('#photourl', window.parent.document.frm).val(val).change();
};
...
<input name="photo" id="photo" value="someVal" onclick="updateForm(this.value)" type="radio">

It works fine in firefox, opera, flock, msie. It does not work at all in chrome and safari.

Anybody can help me? Thanks

A: 

the second argument in $('#photourl', window.parent.document.frm) is acquired with a nonstandard technique. try $('#photourl', $('#frm', window.parent.document)[0]), or, because it's all in one document really (per your comments), just get rid of it.

just somebody
$('#photourl', document.frm).val(val).change();Now it works! Thanks :-)
carlo