0

hi to all there i have problem with links management, my problem is that i want to pass the resultSet object to javascript function but it can all me do this but display error undefine link value or object value is null my code is

function hyperlinkvalue(passvalue)
{
 
  var hyper=passvalue;
  alert(hyper);
document.formName.textfieldtoassignlinkdata.value=hyper;
}
//"ref is the Arraylist"
// i is the integer of for loop 
  <a href="<%=ref.get(i).toString()%>" name="<%=i%>" onclick="hyperlinkvalue(<%=ref.get(i).toString()%>)"><%out.println(ref.get(i).toString()); %></a>

plz plz plz help me out of this problem

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by __avd
0

Your source code should be surrounded by BB code tags.

...
  <script type="text/javascript">
    function hyperlinkvalue(passvalue) {
        var hyper=passvalue;
        alert(hyper);
        document.formName.textfieldtoassignlinkdata.value=hyper;
    }
</script>

//"ref is the Arraylist"
// i is the integer of for loop

for(i=0;i<ref.size();i++) {
 %>
   <a href="<%=ref.get(i).toString()%>" name="<%=i%>" onclick="hyperlinkvalue("<%=ref.get(i).toString()%>")"><%out.println(ref.get(i).toString()); %></a>
<%
 }
%>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.