Form whose script is visible when click on Google "View page source"
Posted: Wed Apr 03, 2019 5:26 am
Ηι.
Perhaps it's common what I noticed on a webpage that contains a contact form (I used "Use bult-in PHP form processor")
Let me refer to a remark that worries me.
Please see what I've noticed:
In this web page https://www.mentorship.gr/m_communication.php
1. In Editbox > Validate > Data type I selected:
"Custom" and added the following code fro greek characters: /^[Α-Ωα-ωΆ-Ώά-ώ ]+$/
2. In Editbox > Validate > Data length, I selected:
"Data required".
When I published (either with F5 or on web), I used Google > View page source. I shaw all the following script of my communication web page:
The following web page is experimental:
https://www.mentorship.gr/experiment_communication.php
In this page I made none of the Previous changes (1 and 2).
In this page I noticed nothing of the above script. Now my problem is that I cannot add my own constraints.
I have the impression that it is not normal to appear the script of a form.
Probably I'm making a mistake. But I can not figure out what it is.
Thank you.
Perhaps it's common what I noticed on a webpage that contains a contact form (I used "Use bult-in PHP form processor")
Let me refer to a remark that worries me.
Please see what I've noticed:
In this web page https://www.mentorship.gr/m_communication.php
1. In Editbox > Validate > Data type I selected:
"Custom" and added the following code fro greek characters: /^[Α-Ωα-ωΆ-Ώά-ώ ]+$/
2. In Editbox > Validate > Data length, I selected:
"Data required".
When I published (either with F5 or on web), I used Google > View page source. I shaw all the following script of my communication web page:
Code: Select all
<script>
function Validatem_communication()
{
var regexp;
var communicationEditbox1 = document.getElementById('communicationEditbox1');
if (!(communicationEditbox1.disabled || communicationEditbox1.style.display === 'none' || communicationEditbox1.style.visibility === 'hidden'))
{
regexp = /^[Α-Ωα-ωΆ-Ώά-ώ ]+$/;
if (!regexp.test(communicationEditbox1.value))
{
alert("The specified value is invalid.");
communicationEditbox1.focus();
return false;
}
if (communicationEditbox1.value == "")
{
alert("Please enter a value for the \"communicationEditbox1\" field.");
communicationEditbox1.focus();
return false;
}
}
var communicationEditbox2 = document.getElementById('communicationEditbox2');
if (!(communicationEditbox2.disabled || communicationEditbox2.style.display === 'none' || communicationEditbox2.style.visibility === 'hidden'))
{
regexp = /^[Α-Ωα-ωΆ-Ώά-ώ ]+$/;
if (!regexp.test(communicationEditbox2.value))
{
alert("The specified value is invalid.");
communicationEditbox2.focus();
return false;
}
if (communicationEditbox2.value == "")
{
alert("Please enter a value for the \"communicationEditbox2\" field.");
communicationEditbox2.focus();
return false;
}
}
var communicationTextArea1 = document.getElementById('communicationTextArea1');
if (!(communicationTextArea1.disabled || communicationTextArea1.style.display === 'none' || communicationTextArea1.style.visibility === 'hidden'))
{
if (communicationTextArea1.value == "")
{
alert("Please enter a value for the \"communicationTextArea1\" field.");
communicationTextArea1.focus();
return false;
}
}
var m_communicationEditbox1 = document.getElementById('m_communicationEditbox1');
if (!(m_communicationEditbox1.disabled || m_communicationEditbox1.style.display === 'none' || m_communicationEditbox1.style.visibility === 'hidden'))
{
regexp = /^[Α-Ωα-ωΆ-Ώά-ώ ]+$/;
if (!regexp.test(m_communicationEditbox1.value))
{
alert("The specified value is invalid.");
m_communicationEditbox1.focus();
return false;
}
if (m_communicationEditbox1.value == "")
{
alert("Please enter a value for the \"m_communicationEditbox1\" field.");
m_communicationEditbox1.focus();
return false;
}
}
return true;
}
</script>
The following web page is experimental:
https://www.mentorship.gr/experiment_communication.php
In this page I made none of the Previous changes (1 and 2).
In this page I noticed nothing of the above script. Now my problem is that I cannot add my own constraints.
I have the impression that it is not normal to appear the script of a form.
Probably I'm making a mistake. But I can not figure out what it is.
Thank you.