Jump to content

Links stopped working


guyfromfl

Recommended Posts

I have a jQuery UI Dialog that gets links for a user. I don't know exactly what I just did, but the links appear, but are not clickable.  I looked in FireBug and they are surrounded by anchors, and all ' and " seem to be closed correctly. 

 

Hopefully another set of eyes can help me spot the problem.

 

Here is the div container:

<div id='step1'>
<h1>Step 1</h1>
<p>Download and sign your contract.</p>
<h3>Please Select A Format:</h3>
<div id='downloadLinks'>
  <!--  Container for generated download links -->
  <div id='pdfLinks'></div><div id='jpgLinks'></div>
</div>
</div>

 

Here is the success function for the dialog that alters the pdfLinks and jpgLinks divs:

if(log['success'] == true) {		
     $("#jpgLinks #pdfLinks").empty();													
     /* DOWNLOAD IMAGES */
     for (var page=(contractId['pages']-1); page>=0; page--) {
      //$("#downloadLinks").prepend("<a href='contracts/jpg/"+contractId['contract']+ "-" + page + ".jpg'>Page " + (page+1) + "<\/a>");
      $("#jpgLinks").prepend("<span><a href='#' onclick='log(\"" + contractId['contract'] + "-" + page + "\", \"DOWNLOAD_JPG\");'><img src='img/JPG-Link-" + (page+1) + ".png' alt=''><br>Page " + (page+1) + "<\/a><\/span>");
     }

     $("#jpgLinks").prepend("<h5>Standard Image Format<\/h5>");

     $("#pdfLinks").prepend("<span><a href='#' onclick='log(\""+contractId['contract']+"\", \"DOWNLOAD_PDF\");'><img src='img/btnDownloadPdf.png' alt='Downdload PDF' /><br>Download Adobe © PDF<\/a><\/span>");
     $("#pdfLinks").prepend("<h5>Adobe PDF<\/h5>");
     $("#dialog-confirm").dialog("close");
} else {
     alert("There was a problem! Please contact customer support.");
     showDisclosure();
} /* end else */

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/232190-links-stopped-working/
Share on other sites

Ok I figured it out, kind of.

 

I added a div #step2 after step1 and it stopped working.  If I remove div#step2 it works.

 

The problem is I need step 2 and wanted it in another div so I can make it accordian.

 

Anybody know why when I add a div after step1 it disables the links?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.