Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  Add ReplyNew TopicNew Poll

 View Signature link
#
I'm using a custom main profile and wanting a "view signature" link like the default profile that brings up the user's signature as a pop up, not sure what to put in though. Tried playing around with code from the inspect element tool but can't seem to get it right. Anyone know how?
PM
#
Try inserting the full link:

CODE
<a href="javascript:void(0);" onclick="document.getElementById('sig_popup').style.display='block';">View Signature</a>

signature
user posted image
#
QUOTE (Cory @ Jul 12 2018, 05:52 AM)
Try inserting the full link:

CODE
<a href="javascript:void(0);" onclick="document.getElementById('sig_popup').style.display='block';">View Signature</a>


Hi Cory, that's actually the first thing I tried after grabbing it from the inspect element tool but nothing happens when I click it on the page
PM
#
This should work:

CODE
<a href='javascript:void(0);' onclick="document.getElementById('sig_popup').style.display='block';">View Signature</a>
<div id='sig_popup' style='position:absolute;display:none;'>
   <div class='tableborder'>
       <table width="100%" cellspacing="1px" cellpadding="6px">
           <tr>
               <td width="98%" class="pformstrip">Signature</td>
               <td width="2%" class="pformstrip"><a href="javascript:document.getElementById('sig_popup').style.display='none';void(0);">[x]</a></td>
           </tr>
           <tr>
               <td class="row2" colspan='2' width="100%">
                   <!-- |signature| -->
               </td>
           </tr>
       </table>
   </div>
</div>

signature
user posted image
#
That does work, thank you! Is there any way of stipulating where exactly it pops up on the screen or some way I can nudge it with a margin of something? My view signature link is in a corner at the bottom so would like to move the pop up closer to the center of screen if possible

This post has been edited by Heaven is a Halfpipe: Jul 12 2018, 01:41 AM
PM
#
Do you want it directly in the center of the screen, both horizontally and vertically?

signature
user posted image
#
Yes that would work
PM
#
Try this instead:

CODE
<a href='javascript:void(0);' onclick="document.getElementById('sig_popup').style.display='block';">View Signature</a>
<div id='sig_popup' style='position:absolute;display:none; left: 50%; top: 50%'>
  <div class='tableborder'>
      <table width="100%" cellspacing="1px" cellpadding="6px">
          <tr>
              <td width="98%" class="pformstrip">Signature</td>
              <td width="2%" class="pformstrip"><a href="javascript:document.getElementById('sig_popup').style.display='none';void(0);">[x]</a></td>
          </tr>
          <tr>
              <td class="row2" colspan='2' width="100%">
                  <!-- |signature| -->
              </td>
          </tr>
      </table>
  </div>
</div>

<script>
$('#sig_popup').css({
 'margin-bottom': $('#sig_popup').height() + 'px',
 'margin-right': $('#sig_popup').width() + 'px'
});
</script>

signature
user posted image
#
'margin-bottom': $('#sig_popup').height() + 'px',

Am I supposed to edit a value in where its bold?

This post has been edited by Heaven is a Halfpipe: Jul 12 2018, 03:14 PM
PM
#
No, the JavaScript sets the value for you.

signature
user posted image
#
Okay well nothing happened, the signature pops up in the same place

This post has been edited by Heaven is a Halfpipe: Jul 12 2018, 03:43 PM
PM
#
Link, please. PM it to me if you want to keep it private.

signature
user posted image
#
QUOTE (Cory @ Jul 12 2018, 08:54 PM)
Link, please. PM it to me if you want to keep it private.


Done
PM
#
Perhaps this will give a more desirable effect:

CODE
<a href='javascript:void(0);' onclick="document.getElementById('sig_popup').style.display='block';">View Signature</a>
<div id='sig_popup' style='position:absolute;display:none'>
 <div class='tableborder'>
     <table width="100%" cellspacing="1px" cellpadding="6px">
         <tr>
             <td width="98%" class="pformstrip">Signature</td>
             <td width="2%" class="pformstrip"><a href="javascript:document.getElementById('sig_popup').style.display='none';void(0);">[x]</a></td>
         </tr>
         <tr>
             <td class="row2" colspan='2' width="100%">
                 <!-- |signature| -->
             </td>
         </tr>
     </table>
 </div>
</div>

<script>
$('#sig_popup').css({
'margin-top': '-' + $('#sig_popup').height() + 'px',
'margin-left': '-' + $('#sig_popup').width() + 'px'
});
</script>

signature
user posted image
#
More desirable indeed. Thanks, Cory!
PM
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options Add ReplyNew TopicNew Poll