Jump to content

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.