PDA

View Full Version : other page's script recognize in div



index236
9 Aug 2007, 10:03 PM
A.jsp


<script language=javascript>
function sends(){
var succ=function(o){
Ext.get('contents').update(o.responseText,true);
scriptOfBpage(); <-- execute script of B page.. but error
}
var fails=function(o){
alert('실패');
}
var att={
url:'b.jsp',
success:succ,
failure:fails
}
Ext.Ajax.request(att);
}
function asdf(){
alert('asdf');
}
</script>
<body>
<div onclick='sends();'>전송</div>

<div id='contents'></div> <------ insert of B page's content


B.jsp


<span onclick='test2();'>
ssssssssssss
</span>

<script language=javascript>

function scriptOfBpage(){
alert('this is a b page's script');
}

</script>


i want to know this problem's solutions. please help me.

mystix
9 Aug 2007, 10:15 PM
please refer to 6272 - points (5) and (7)