how to use request.getParameter("value") within javascript function

I have this particular requirement that on my jsp page, i am getting some parameters set by controller servlet and i need to get the values of these parameteres within my java script function so that i can set the values of my form elements and submit it.

here is the incomplete code snippet :

<% if ( "edit button".equals (hello) ) {%>

<script language="javascript">

window.alert ("in if part");

var val1 = "<%=request.getAttribute("FirmwareVersion")%>";

var val2 = "<%=request.getAttribute("SoftwareProduct")%>";

var val3 = "<%=request.getAttribute("SoftwareVersion")%>";

var val4 = "<%=request.getAttribute("SoftwareOperatingSystem")%>";

putValue (val1, val2, val3, val4);

</script>

<%}<%>

function putValue ( var1, var2, var3, var4) {

document.createUpdateForm.productSoftwareProduct.value = val2;

document.createUpdateForm.productSoftwareVersion.value = val3;

document.createUpdateForm.productSoftwareOperatingSystem.value = val4;

document.createUpdateForm.productFirmwareVersion.value = val1;

}

and then i am submitting the form in another function.

any leads?

regards.

[1256 byte] By [deepak_anuraga] at [2007-11-26 20:23:11]
# 1
then whats d problm yaar ........ :)you can simply use request.getParameter("Key"); instead of ur getAttribute("key");
java_usera at 2007-7-10 0:48:58 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
I tried using var value=request.getParameter("key"). But with window.alert(value) it is not showing anything on page. I guess, it is not getting any value and bypassing the statement but don't know why?any hints?
deepak_anuraga at 2007-7-10 0:48:58 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...