JScript open 2 iFrames

Discussion in 'JavaScript' started by gilgalbiblewheel, Feb 13, 2006.

  1. #1
    JScript open 2 iFrames
    I need to open 2 iFrames with the extension "?keyword=<%=Keyword%>"

    This is what I have so far:
    <script language="JavaScript" type="text/javascript">
    	<!--
    function twoframes(keyword)
    {
    document.getElementById("ifrVerse").src="tripledemoduo.asp?keyword="  + keyword
    document.getElementById("ifrVerse2").src="tripledemoduo.asp?keyword="  + keyword
    }
    	//-->
    	</script>
    Code (markup):
    And
    <input type="button" onclick="twoframes(document.getElementById,'<%=Keyword%>')" value="Change URL of the two iframes">
    ...
    <tr>
    <td>
    <iframe
    src ="/wheelofgod/tripledemoduo.asp"
    width="300" height="1200" name="ifrVerse" id="ifrVerse">
    </iframe>
    </td>
    <td>
    <iframe
    src ="/wheelofgod/tripledemoduo.asp"
    width="300" height="1200" name="ifrVerse2" id="ifrVerse2">
    </iframe>
    </td>
    </tr>
    
    Code (markup):
    I'm getting this:
    <input type="button" onclick="twoframes(document.getElementById,'')" value="Change URL of the two iframes">
    Code (markup):
     
    gilgalbiblewheel, Feb 13, 2006 IP
  2. gilgalbiblewheel

    gilgalbiblewheel Well-Known Member

    Messages:
    435
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #2
    Ok. I think I know the reason but don't know how to fix it. The Keyword is found in:
                     <textarea name="Keyword" id="Keyword"></textarea>
                     </textarea>
    Code (markup):
    Unlike the other keywords (which I have written <%=keywordb%>, <%=keywordc%>...) this one's in textarea.
     
    gilgalbiblewheel, Feb 13, 2006 IP
  3. torunforever

    torunforever Peon

    Messages:
    414
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Is the textarea between the form tags?

    Also, this isn't causing your problem, but neaten up your html by losing the second closing tag </textarea>
     
    torunforever, Feb 14, 2006 IP