works just fine.
****************
<script>
function getsub() {
location.href="vbchsub.htm";
}
will not work
*************
<script>
function getsub() {
location.href="vbchsub.htm" target="myiframe";
}
works fine but must use a form. (but if I add another form on this page it stops working.)
Here I just change the action with an existing target and it works fine.. until i add the second form.
*****************************
<script>
function getsub() {
myform.action="vbchsub.htm";
myform.submit();
}
form name=myform action="chessub.htm" target="myiframe"></form>
What I want to be able to do is have the javascript go to what ever location I send it by telling it what the url is.
so you can better understand what I am doing, below is a more complete script.
<script>
function getsub() {
$sel = city.value;
$sel = city.value + "sub.htm";
document.myform.action=$sel;
document.myform.submit();
}
</script>
Bottom line is when I click on different cities in a select dropdown box, a list of all subdivisions in that city are loaded
into an iframe. Might me chessub.htm or vabesub.htm and etc... ches meaning city of chesapeake.
I had the whole thing working using the simple form above as it would allow a target, but as soon as I added the regular form
required for the program it stopped working... as if only one form can be on the page... even though each form had a
different name like name=myform and name=mainform.
Bottom line is there anyway to make javascript hit a target....
thanks
Tom
****************
<script>
function getsub() {
location.href="vbchsub.htm";
}
will not work
*************
<script>
function getsub() {
location.href="vbchsub.htm" target="myiframe";
}
works fine but must use a form. (but if I add another form on this page it stops working.)
Here I just change the action with an existing target and it works fine.. until i add the second form.
*****************************
<script>
function getsub() {
myform.action="vbchsub.htm";
myform.submit();
}
form name=myform action="chessub.htm" target="myiframe"></form>
What I want to be able to do is have the javascript go to what ever location I send it by telling it what the url is.
so you can better understand what I am doing, below is a more complete script.
<script>
function getsub() {
$sel = city.value;
$sel = city.value + "sub.htm";
document.myform.action=$sel;
document.myform.submit();
}
</script>
Bottom line is when I click on different cities in a select dropdown box, a list of all subdivisions in that city are loaded
into an iframe. Might me chessub.htm or vabesub.htm and etc... ches meaning city of chesapeake.
I had the whole thing working using the simple form above as it would allow a target, but as soon as I added the regular form
required for the program it stopped working... as if only one form can be on the page... even though each form had a
different name like name=myform and name=mainform.
Bottom line is there anyway to make javascript hit a target....
thanks
Tom