Aug 13, 2003 #1 hemuravi Programmer Jul 15, 2003 2 IN can i insert javascript code in jsp or vice versa...pls let me know at the earliest possible. Thanks and regards, Hema
can i insert javascript code in jsp or vice versa...pls let me know at the earliest possible. Thanks and regards, Hema
Aug 13, 2003 #2 Hattusas Programmer Nov 11, 2001 344 TR Here is code sample from one of jsp page.. <html> <head> <%@include file="/HTTPBaseJSP.jsp" %> <%@page import="com.sahinler.kasa.db.*" %> <% DBKasaHareket dbKasaHareket = (DBKasaHareket)session.getValue("dbKasaHareket" DBHesaplar dbHesaplar = (DBHesaplar)session.getValue("dbHesaplar" %> <script language="JavaScript" > function getTanim(slc){ document.forms[0].HesapTanim.value=hesapTanimArray[slc.selectedIndex]; } var hesapKodArray = new Array(); var hesapTanimArray = new Array(); hesapKodArray[0]='Seciniz...'; <% for (int i=0;i<dbHesaplar.size();i++) { DBHesap dbHesap = (DBHesap)dbHesaplar.get(i); %> hesapKodArray[<%=(i+1)%>]='<%=dbHesap.getKod()%>'; hesapTanimArray[<%=(i+1)%>]='<%=dbHesap.getTanim()%>'; <% } %> </script> A for loop used to be build a javascript array... Salih Sipahi Software Engineer. City of Istanbul Turkey s.sipahi@sahinlerholding.com.tr Upvote 0 Downvote
Here is code sample from one of jsp page.. <html> <head> <%@include file="/HTTPBaseJSP.jsp" %> <%@page import="com.sahinler.kasa.db.*" %> <% DBKasaHareket dbKasaHareket = (DBKasaHareket)session.getValue("dbKasaHareket" DBHesaplar dbHesaplar = (DBHesaplar)session.getValue("dbHesaplar" %> <script language="JavaScript" > function getTanim(slc){ document.forms[0].HesapTanim.value=hesapTanimArray[slc.selectedIndex]; } var hesapKodArray = new Array(); var hesapTanimArray = new Array(); hesapKodArray[0]='Seciniz...'; <% for (int i=0;i<dbHesaplar.size();i++) { DBHesap dbHesap = (DBHesap)dbHesaplar.get(i); %> hesapKodArray[<%=(i+1)%>]='<%=dbHesap.getKod()%>'; hesapTanimArray[<%=(i+1)%>]='<%=dbHesap.getTanim()%>'; <% } %> </script> A for loop used to be build a javascript array... Salih Sipahi Software Engineer. City of Istanbul Turkey s.sipahi@sahinlerholding.com.tr
Aug 18, 2003 #3 vbkris Programmer Jan 20, 2003 5,994 IN jsp code in javascript >> possible javascript code in jsp >> not possible Known is handfull, Unknown is worldfull Upvote 0 Downvote
jsp code in javascript >> possible javascript code in jsp >> not possible Known is handfull, Unknown is worldfull