Jump to content

How to improve the look of the output?


Chrisj

Recommended Posts

This code works successfully, however the outputted message looks boring and unprofessional.

 

This text appears with a plain grey border around it:

 

"You cannot upload without first logging in.

If you have not already logged in, please do that first."

 

Can someone help me improve the look of that output?

How do you add attributes to those script lines? And the border too?

 

This script is located inside container5.

The css code for container5 is below.

 

I see where the container elements can be changed,

but the text:

 

"You cannot upload without first logging in.

If you have not already logged in, please do that first."

 

is within it's own grey-bordered box inside container5 that has it's own blue border.

 

I don't understand where in the java script it creates a grey border that surrounds that text. Can you help me further? Thanks.

 

<div id="column-wide">

      <div id="generic-container">

<div class="container5">
        <!-- ========================================================== -->
<script>
          //
          function takeAction()
          {
            if (document.getElementById('upload_permission').innerHTML == "Y")
            {
              window.location.href = "/up.php";
            }
            else
            {
              alert(document.getElementById('alert_text').innerHTML);
              return false;
            }
          }
          //
          var member_credits = document.getElementById('member_credits').innerHTML;
          var upload_permission = document.getElementById('upload_permission').innerHTML;
          //
          if (upload_permission == "")
          {
            document.getElementById('upload_credit').innerHTML = "";
            document.getElementById('upload_restrictions').innerHTML = "You cannot upload without first logging in.<br>";
            document.getElementById('login_request').innerHTML = "If you have not already logged in, please do that first.";
            document.getElementById('alert_text').innerHTML = "Please log in before attempting an upload.";
          }
          else if (upload_permission == "Y")
          {
            document.getElementById('upload_credit').innerHTML = "Your upload is on file.<br>";
            document.getElementById('upload_restrictions').innerHTML = "You may use this webpage to upload.";
            document.getElementById('login_request').innerHTML = "";
            document.getElementById('alert_text').innerHTML = "";
          }
          else
          {
            if (upload_permission.length > 1)  // referrer send back more than just a flag! 
            {
              document.getElementById('upload_credit').innerHTML = "*** " + upload_permission + " ***";
              document.getElementById('upload_restrictions').innerHTML = "";
              document.getElementById('login_request').innerHTML = "";
              document.getElementById('alert_text').innerHTML = upload_permission + "\r\nPlease contact the webmaster for assistance.";
            }
            else
            {
              document.getElementById('upload_credit').innerHTML = "No update credits on file.<br>";
              document.getElementById('upload_restrictions').innerHTML = "Please select<a href='page.php?page=13'><font size='2' color='#000000' face='Arial'><u>Upload Terms</u></font></a>to proceed<br>";
              document.getElementById('login_request').innerHTML = "";
              document.getElementById('alert_text').innerHTML = "Please select the link titled 'Upload Terms' to proceed with your initial upload.";
            }
          }
        </script>
        <!-- ========================================================== -->
							</div>

      </div>

    </div>

Link to comment
Share on other sites

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.