function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
miku1051miku1051 

Jquery VF window popup…juery.Urgent help..?


Hi i want to open a popup window using jquery after clicking on more button..

Jqyery more/less link in pageblock table

<script src="https://code.jquery.com/jquery-1.8.2.js" type="text/javascript"></script>
<title>jQuery Add More/Less link to Text</title>
<script type="text/javascript">
$(function() {
var showChar = 120, showtxt = "more", hidetxt = "less";
$('.sfdc_richtext').each(function() {
var content = $(this).text();
if (content.length > showChar) {
var con = content.substr(0, showChar);
var hcon = content.substr(showChar, content.length - showChar);
var txt= con +  '<span class="dots">...</span><span class="morecontent"><span>' + hcon + '</span>&nbsp;&nbsp;<a href="" class="moretxt">' + showtxt + '</a></span>';
$(this).html(txt);
}
});
$(".moretxt").click(function() {
if ($(this).hasClass("sfdc_richtext")) {
$(this).removeClass("sfdc_richtext");
$(this).text(showtxt);
} else {
$(this).addClass("sfdc_richtext");
$(this).text(hidetxt);
}
$(this).parent().prev().toggle();
$(this).prev().toggle();
return false;
});

});
</script>



Using this jquery code i am able to show the more/less link in which characters are more than 120.Now i want to open a VF window pop when anyone clicks on that more link.I am new to query please help.Also i need to pass a id to that VF page window popup when anyone clicks on more link.

enter image description here

above is the page block table and more link in image.

<apex:pageBlockTable value="{!salesFaqList}" var="faq" id="pbTable" rendered="{!showData}">

                  <apex:column value="{!faq.FAQ_Categories__c}" width="190px" style="height:50px"/>

      <apex:column value="{!faq.Answer__c}" />
</apex:pageBlockTable >



Answer is the last field in page block table.I want to open a VF pop up window on click of that link and also pass ID in URL of that page.Please help
Vinita_SFDCVinita_SFDC
Hello,

You are not using jquery no conflice mode. Please refer following threads for sample code:

http://salesforce.stackexchange.com/questions/15596/jquery-modal-popup-is-trapped-in-visualforce-page