Jump to content

Targeting multiple IFrames


AV1611

Recommended Posts

When I hit "Submit" I do this:
[code]
<form name="book" method="POST" action="JFBVForm.PHP" TARGET="REFERENCE">
[/code]
I want to do, for example, BOTH of these:
[code]
<form name="book" method="POST" action="JFBVForm.PHP" TARGET="REFERENCE">
<form name="audio" method="POST" action="SOMETHINGELSE.PHP" TARGET="MAIN">
[/code]

How can I do that?

So one displays, for example, an audio-control in an IFrame so you can listen to the Bible on MP3 while the other displays a query result displaying the text of the passage being read...
Link to comment
https://forums.phpfreaks.com/topic/3541-targeting-multiple-iframes/
Share on other sites

OK,

I found the answer on a Google search, but I had to make some slight adjustments.

This now work!

You click the button, and it does 2 things at once.

1. It submits the CHAPTER and VERSE to one frame with the audio control and plays the Bible MP3
2. It submits the CHAPTER and VERSE to another frame and displays the text of the passage

[code]
<PRE lang=jscript><script language=javascript>
<!--
function OnButton1()
{
    document.Form1.action = "http://baptistrevival.com:8081/bible/bibles/bibleform.php"    
    document.Form1.target = "BIBLE";    
    document.Form1.submit();        
    document.Form1.action = "AUDIOPLAY.PHP"  
    document.Form1.target = "ALLSEARCHI";    
    document.Form1.submit();        
    return true;
}
-->
</script></PRE>

<form name="Form1" value="audio" method="POST" >

<input SIZE="4" name="CHAPTER" type="text" ></td>
<input type = "hidden" name="BOOK" value="<?php echo $BOOK; ?>">
<input type = "hidden" name="KJV" value="KJV">
<input style="color: #000000;
   background: #c0c0c0;
   text-decoration: none;
   width: 40px;
   height:20px;
   font-size: 85%;
   text-align: center;" type="submit" name="button1" value="PLAY" onclick="return OnButton1()"></td><td>
</form>
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.