RE: Modal Popup destroyes Javascript

542690, modificado hace 16 años. New Member Mensajes: 6 Fecha de incorporación: 5/03/08 Mensajes recientes
I have the following codesnipped as source in a webcontent portlet.
the modal popups work perfectly, but after closing one, the links become inactive.
Have I missed something?

<script type="text/javascript">
<!--
function myPopUp(titlename,url) {
var popup = Liferay.Popup({ title:titlename,
modal:true,
width:640,
height:600,
center:true,
html:url });

jQuery(popup).load(url,{windowState : 'LiferayWindowstate.EXCLUSIVE'} );
}
//-->
</script>

<table width="548" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<h4>VIDEO DEMONSTRATIONS</h4>
<a href="#" onclick="myPopUp('Oak Demonstration','/widget/web/guest/testpop/-/56_INSTANCE_gp4J');">Click oak</a> <br />
<a href="#" onclick="myPopUp('Oak Demonstration','/widget/web/guest/testpop/-/56_INSTANCE_Eet0');">Click Polyester</a><br />
<a href="#" onclick="myPopUp('Oak Demonstration','/widget/web/guest/testpop/-/56_INSTANCE_gp4J');">Click Sponge</a><br />
<a href="#" onclick="myPopUp('Oak Demonstration','/widget/web/guest/testpop/-/56_INSTANCE_0qF0');">Click Paper Towel</a></td>
</tr>
</tbody>
</table>
542690, modificado hace 16 años. New Member Mensajes: 6 Fecha de incorporación: 5/03/08 Mensajes recientes
Oh btw the JavaScriptDebugger Reports two recurring errors

Liferay._ajaxOld is not a function

and

Liferay.Chat is undefined.
2314215, modificado hace 15 años. Junior Member Mensajes: 63 Fecha de incorporación: 25/02/09 Mensajes recientes
I'm experiencing this same problem... I'm using the built in modal popup window to display basic html that's in web content...

It works fine, but when I close the window... all of my links no longer work...

Were you able to find a fix for this?
thumbnail
4682465, modificado hace 15 años. Regular Member Mensajes: 221 Fecha de incorporación: 5/03/10 Mensajes recientes
hi..
i want to know whether the following code given by you will work for simple jsp portle???

<script type="text/javascript">
<!--
function myPopUp(titlename,url) {
var popup = Liferay.Popup({ title:titlename,
modal:true,
width:640,
height:600,
center:true,
html:url });

jQuery(popup).load(url,{windowState : 'LiferayWindowstate.EXCLUSIVE'} );
}
//-->
</script>

<table width="548" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<h4>VIDEO DEMONSTRATIONS</h4>
<a href="#" onclick="myPopUp('Oak Demonstration','/widget/web/guest/testpop/-/56_INSTANCE_gp4J');">Click oak</a> <br />
<a href="#" onclick="myPopUp('Oak Demonstration','/widget/web/guest/testpop/-/56_INSTANCE_Eet0');">Click Polyester</a><br />
<a href="#" onclick="myPopUp('Oak Demonstration','/widget/web/guest/testpop/-/56_INSTANCE_gp4J');">Click Sponge</a><br />
<a href="#" onclick="myPopUp('Oak Demonstration','/widget/web/guest/testpop/-/56_INSTANCE_0qF0');">Click Paper Towel</a></td>
</tr>
</tbody>
</table>


i would also like to know if i want to open different jsp pages according to the links clicked then where i have to write the page path ie url of the jsp pages and how will i be writing it???

All the jsp pages will be in tomcat, so do i specify the path of jsp pages..
whether the url path will be in place of

'/widget/web/guest/testpop/-/56_INSTANCE_gp4J'

Can you help me with this???

Thanks in advance...