gilgalbiblewheel
02-15-2006, 10:22 PM
Javascript problem in setting URL
I'm having difficulty in setting up the URL in by Javascript.
I have:
<script language="JavaScript" type="text/javascript">
<!--
function go1(Keyword,Keywordc,Keywordb,Keywordd,Keyworde,Keywordf,Keywordg,Keywordh)
{
document.getElementById('ifrVerse').src='showversea.asp?id=' + [color=red]document.bookSelect.id1.options[document.bookSelect.id1.selectedIndex].value[/color] + '&keyword=' + Keyword.replace(/[ ]/g,'+') + '&keywordc=' + Keywordc
}
function go2(Keyword,Keywordc,Keywordb,Keywordd,Keyworde,Keywordf,Keywordg,Keywordh)
{
document.getElementById('ifrVerse2').src='showversea.asp?id=' + [color=red]document.bookSelectb.id2.options[document.bookSelectb.id2.selectedIndex].value[/color] + '&keyword=' + Keyword.replace(/[ ]/g,'+') + '&keywordc=' + Keywordc
}
//-->
</script>
This is the URL I get:
/showversea.asp?id=[color=red]8654[/color]&keyword=[color=red]8654[/color]&keywordc=[color=blue]king[/color]
As you see [color=red]8654[/color] is written twice. And [color=blue]king[/color] is bumped over to &keywordc. It should be with &keyword.
I have 2 forms:
<form name="bookSelect" action="showversea.asp" method="get" target="ifrVerse">
<select name="id1" id="id1" size="10" style="width:200;" onchange="go1(document.getElementById('id1').value,'<%=Keyword%>','<%=Keywordc%>');">
and
<form name="bookSelectb" action="showversea.asp" method="get" target="ifrVerse2">
<select name="id2" id="id2" size="10" style="width:200;" onchange="go2(document.getElementById('id2').value,'<%=Keyword%>','<%=Keywordc%>');">
The iFrames I have no problem with but here they are:
<iframe
src ="/wheelofgod/kjvresplistbox.asp"
width="300" height="1200" name="ifrVerse" id="ifrVerse">
</iframe>
</td>
<td>
<iframe
src ="/wheelofgod/kjvresplistbox.asp"
width="300" height="1200" name="ifrVerse2" id="ifrVerse2">
</iframe>
I'm having difficulty in setting up the URL in by Javascript.
I have:
<script language="JavaScript" type="text/javascript">
<!--
function go1(Keyword,Keywordc,Keywordb,Keywordd,Keyworde,Keywordf,Keywordg,Keywordh)
{
document.getElementById('ifrVerse').src='showversea.asp?id=' + [color=red]document.bookSelect.id1.options[document.bookSelect.id1.selectedIndex].value[/color] + '&keyword=' + Keyword.replace(/[ ]/g,'+') + '&keywordc=' + Keywordc
}
function go2(Keyword,Keywordc,Keywordb,Keywordd,Keyworde,Keywordf,Keywordg,Keywordh)
{
document.getElementById('ifrVerse2').src='showversea.asp?id=' + [color=red]document.bookSelectb.id2.options[document.bookSelectb.id2.selectedIndex].value[/color] + '&keyword=' + Keyword.replace(/[ ]/g,'+') + '&keywordc=' + Keywordc
}
//-->
</script>
This is the URL I get:
/showversea.asp?id=[color=red]8654[/color]&keyword=[color=red]8654[/color]&keywordc=[color=blue]king[/color]
As you see [color=red]8654[/color] is written twice. And [color=blue]king[/color] is bumped over to &keywordc. It should be with &keyword.
I have 2 forms:
<form name="bookSelect" action="showversea.asp" method="get" target="ifrVerse">
<select name="id1" id="id1" size="10" style="width:200;" onchange="go1(document.getElementById('id1').value,'<%=Keyword%>','<%=Keywordc%>');">
and
<form name="bookSelectb" action="showversea.asp" method="get" target="ifrVerse2">
<select name="id2" id="id2" size="10" style="width:200;" onchange="go2(document.getElementById('id2').value,'<%=Keyword%>','<%=Keywordc%>');">
The iFrames I have no problem with but here they are:
<iframe
src ="/wheelofgod/kjvresplistbox.asp"
width="300" height="1200" name="ifrVerse" id="ifrVerse">
</iframe>
</td>
<td>
<iframe
src ="/wheelofgod/kjvresplistbox.asp"
width="300" height="1200" name="ifrVerse2" id="ifrVerse2">
</iframe>