Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
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?
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.
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?
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?
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???
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
Can you help me with this???
Thanks in advance...
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...
Community
Company
Feedback