Forum Moderators: open

Message Too Old, No Replies

javascript

openwnd function with concat

         

Myrnalyn

8:58 am on Mar 16, 2008 (gmt 0)

10+ Year Member



Hi all,
i had used openwnd function to link the other url form in my update form but it will just work with only one function in which i need to have more than one url form to connect with my update form.

what should i do to have more than one openwnd function in my update form? this is my openwnd function code in my update form:

<script language=javascript>
function openwnd(form)
{
url1 = "http://localhost/print.php?r=";
url2 = form.ARP_No.value;
url = url1.concat(url2);
window.open(url);
}

</script>
<script language=javascript>
function openwnd(form)
{
url1 = "http://localhost/NAT.php?r=";
url2 = form.ARP_No.value;
url = url1.concat(url2);
window.open(url);
}

</script>

<script language=javascript>
function openwnd(form)
{
url1 = "http://localhost/JAT.php?r=";
url2 = form.ARP_No.value;
url = url1.concat(url2);
window.open(url);
}

</script>
please help me ..i need your great ideas.thank you

daveVk

11:40 am on Mar 16, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<script language=javascript>
function openwnd(form, pageName)
{
window.open("http://localhost/" + pageName + ".php?r=" + form.ARP_No.value );
}
</script>

Just the one openwnd as above with calls openwnd(form,"print" ) etc