I'm using this script which restricts uploading until a fee is paid.
When the user selects the upload button the 'alert-text' from this script(below) pops-up with a message. That's works successfully.
However, I tried to add a link to the message, and when I retried it, the message and the requirement was skipped altogether. When I removed the link from the message, all was well again, the message popped-up as before.
Why, in the this line of code below:
Code:
document.getElementById('alert_text').innerHTML =
can't I add a link to that line and still have it perform successfully? Any ideas? Thanks.
Code:
<script>
//
function takeAction()
{
if (document.getElementById('upload_permission').innerHTML == "Y")
{
window.location.href = "/upload.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 videos 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 credit is on file.<br>";
document.getElementById('upload_restrictions').innerHTML = "You may use this webpage to upload videos.";
document.getElementById('login_request').innerHTML = "";
document.getElementById('alert_text').innerHTML = "";
}
else
{
if (upload_permission.length > 1) // referrer send back more than just a flag! -JG
{
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 = "You need to <a href='uploadfee.php' style='text-decoration:underline;'>purchase 1 upload credit</a> to upload videos.<br>";
document.getElementById('login_request').innerHTML = "";
document.getElementById('alert_text').innerHTML = "Please click on the 'purchase 1 upload credit' link to pay upload fee.";
}
}
</script>
<!-- ==========================================================
|