0

Possible Duplicate:
Javascript - Get element from within an iFrame

I'm trying to select options using greasemonkey on page. document.getElementById("q10") is returning null. I'm sure it's something to do with the iframe, but I don't know how to access it.

Here is where the iframe is loaded.

  <td valign="top" height="88%" colspan="2">
    <iframe id="initialtextFrame" name="initialtextFrame" title="Survey Questions" frameborder="0" scrolling="auto" style="height: 100%; width: 100%"
        src= '/hc/64261160/?cmd=file&amp;file=preChatSurveyContent&amp;site=64261160&amp;sessionkey=H909985739716063515-5531034935655418229K8398902&amp;survey=Pre-Chat' 
    >This functionality requires frames.To read the LivePerson accessibility policy, please go to the <a href='http://www.liveperson.com/help/accessibility.asp'>Liveperson accessibility policy page</a>.<img src="/hcp/window3/common/trans.gif" width="10" alt="" /></iframe>
  </td>

This is the select option I am trying to select within the frame

<select tabindex="3" name="ude!1841972" id="q10" size="1">
    <option id="q10r0" value="" label="" selected='selected'>Select One</option>
    <option id="q10r1" value="Chat-Field Tech-Denver Metro" label="Chat-Field Tech-Denver Metro" >Chat-Field Tech-Denver Metro</option>
    <option id="q10r2" value="Chat-Field Tech-CO Springs-SLC, UT" label="Chat-Field Tech-CO Springs-SLC, UT" >Chat-Field Tech-CO Springs-SLC, UT</option>
    <option id="q10r3" value="Chat-Field Tech-Outstate CO-MT-UT-Wy" label="Chat-Field Tech-Outstate CO-MT-UT-Wy" >Chat-Field Tech-Outstate CO-MT-UT-Wy</option>
</select>

Trying document.getElementById("q10r3") and "q10" both return null

4

0 に答える 0