google-code-export / nyromodal

Automatically exported from code.google.com/p/nyromodal
1 stars 1 forks source link

Nyromodal is not working when we use <a> tag under function onchange() tag to display images on runtime #547

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When user selects any option from Sort by dropdown
2. and click on thumbnail images
3. bigger image is not opening in nyromodal popup.

What is the expected output? What do you see instead?
Bigger image should get open in Nyromodal popup on thumbnail image click. 
Bigger image is opening in same window instead of in nyromodal.

What version of the product are you using? On what operating system?
IE6, IE8 & Sharepoint, Windows XP

Please provide any additional information below.
"Overall my observation is Nyromodal is not working when we use <a> tag under 
function onchange() tag to display images on runtime."

I have created one page where i display images in 5x4 gridview on page load. 
When i click on image, bigger image is opening in nyromodal popup. Here it 
works fine.
But when i choose any option from Sort type. Image is opening in nyromodal 
popup.

eg:-

It will work fine when display images using HTML
<a href="img/img1.jpg" id="imgFiche" class="nyroModal" title="UCLA" 
rel="gal">Gallery Img 1</a>
<a href="img/img2.jpg" id="imgFiche1" class="nyroModal" title="UCLA1" 
rel="gal">Gallery Img 2</a>
<a href="img/img3.jpg" id="imgFiche2" class="nyroModal" title="UCLA2" 
rel="gal">Gallery Img 3</a>

But when we want to display more than 100 images on page we use javascript. 
function onchange()
{
for(var ictr=0;ictr <rows.length;ictr++)    
{
optString = optString + "<td style='border:1px solid #C6C6C6'>"
+ "<a href='" + textlink6 + "' id='imgFiche" + ictr + "' 
class='nyroModal'>Gallery Img" +  ictr +"</a>"
+ "</td>";
}
}

Can you please help me?

Original issue reported on code.google.com by ashpawa...@gmail.com on 20 Nov 2010 at 7:23

Attachments: