can I write the scriptlet into a function and call it pls respond urgent?

Nitesh Naveen

<%
if (Session.store.length==1)
  Session.store="000" + Session.store
else if (Session.store.length==2)
  Session.store= "00" + Session.store
Response.write(Session.store) 
%>
<script language="javascript">
document.forms[0].storenumber.value = '<%= Session.store %>'; 
</script>
should work alright provided storenumber is already defined before this scriptlet. In case the textfield is defined after this scriptlet, then use
<input type="text" value="<%= Session.store %>">
Session should be a default variable I guess (as in JSP). The varibales defined in the page are also accessible anwyahere in the page.
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact