0

I have a JSP Page like Below

< html >
< head >
< head >
< script type="text/javascript" src=../../jquery.js">
</head>
<script type="text/javascript">
$().ready(function() {
alert("Page Is Loading....");   
    // Do Some
});

</script>

< body >
< span id="Refresh">
// here I wrote a Some HTML code
< %@include file="/../../some.jsp" %>
< /span>
< /body >
< / html >

The some.jsp also contains the some HTML element that are handled By the some JQuery Function. But I did'nt include the jquery.js in some.jsp

All functions are working fine when first time is page loading.But My Problem is, I try to refresh the span with an id value is Refresh, I am not able to get the Jquery Functionality in between the Span Tag.But, The some.jsp Jquery Function is work well after the Span is Refresh.

How Can I solve the Problem..

Is there any way to dynamically load the jquery.js

2
  • what jquery functionality is not available??? do you want the $().ready() function to be fired when the the span is reloaded???. (The document.ready method will fire only when the document is reloaded and finished reloading), when a particular element is reloaded document.ready will not get fired Commented Oct 14, 2009 at 13:14
  • Put the script tag into the head tag! Commented Oct 14, 2009 at 13:46

1 Answer 1

1

I think what you need is jQuery live.

But I can't be sure unless you tell what you are doing in:

// Do Some

And what elements are coming from some.jsp.

jQuery live is used to bind event handlers for elements which are later added/replaced in the DOM.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.