I just want to give an update if anyone is following this thread. I found the answer:
Code:
function go1(identity,keyword)
{
url = 'showversea.asp?id=' + identity + '&keyword=' + keyword
//alert(bookSelect.action);
//bookSelect.submit();
alert(url);
ifrVerse.location = url;
}
//-->
The problem was this:
I have set an alert. It said:
Code:
http://127.0.0.1/showversea.asp?id=15418&keyword=brutish
But when the iFrame opens it writes only this in the URL.
Code:
http://127.0.0.1/wheelofgod/showversea.asp?id=15418
The second URL shows what the select name "id" is picking up "15418" from the option value. But it fails to pick up the "keyword" <%=Keyword%>. The page of dropdown is ASP-generated, in other words the ASP builds the dropdown from the result of the database table. Here is the section of the source:
Code:
<script language="JavaScript" type="text/javascript">
<!--
function go1(identity,keyword)
{
document.forms['bookSelect'].action = 'showversea.asp?id=' + identity + '&keyword=' + keyword
alert(bookSelect.action);
bookSelect.submit();
}
//-->
</script>
And
Code:
<form name="bookSelect" action="showversea.asp" method="get" target="ifrVerse">
<select name="id" size="10" style="width:200;" onchange="go1(document.forms['bookSelect'].id[document.forms['bookSelect'].id.selectedIndex].value,'brutish');">
<option value="14659">Psalms 49:10</option>
<option value="15418">Psalms 92:6</option>
<option value="15440">Psalms 94:8</option>
</select>
To check it out use Internet Explorer:
http://i.domaindlx.com/wheelofgod/kj...s&optAction=on
I need to put that in the JavaScript with the '+' such as 'the cat ate the dog' as 'the+cat+ate+the+dog':
Code:
<script language="JavaScript" type="text/javascript">
<!--
function go1(identity,keyword)
{
url = 'showversea.asp?id=' + identity + '&keyword=' + keyword
//alert(bookSelect.action);
//bookSelect.submit();
alert(url);
ifrVerse.location = url;
}
function go2(identity,keyword)
{
url = 'showversea.asp?id=' + identity + '&keyword=' + keyword
//alert(bookSelect2.action);
//bookSelect2.submit();
alert(url);
ifrVerse2.location = url;
}
//-->
</script>
Code:
<select name="id" size="10" style="width:200;" onchange="go1(document.forms['bookSelect'].id[document.forms['bookSelect'].id.selectedIndex].value,'<%=Keyword%>');">