I am new to PHP and mySql.
I have writen a script (using the db.php PEAR extension) to access a database, but the username and password to connect to the database are imbedded in the script for anyone to find.
Does anyone know how to securely hide this information.
I have tried searching via...
Also i think you will need to change the following line of code
from
if(total != 0 && document.frmName.nameOfField.checked) {
to
if(total != 0 && document.forms[frmName].elements[nameOfField].checked) {
Although I havn't checked this out for this situation.
Hi,
If the name of the formfield is set in the HTML then you can retrieve it as below
var nameOfField = formfield.name;
or if you are looking to assign the name via javascript then use the following
formfield.name = "some name";
Hope this helps
John
Hi PH,
Thanks for your reply.
I changed to rs.box to rs.bof (this was a typo on my part), and added the [] around Picture Code, and all works fine now.
The script was copied from Microsofts help files, which you would think would have it correct (with the [] around the field name), but then...
Hi,
I am very new to using Access, i am trying to create my first database using it.
The database is ok, but i am having problems creating a "find button" for the data access page. It should search the first field which is a numerical code.
I have looked at the help files and found vbscript...
Hi,
I have been asked to produce an on-line application form, which requires a date of birth to be entered and then checked.
But I hit a problem with the date format, as the site is for the uk, the date format is dd/mm/yyyy, but the system date is represented in javascript in the usa format...
Hi,
I came across this script the other day for validating phone/fax numbers, it's about the best one i've seen, although it had a few bugs in it, which i've ironed out (exp originally came up with a syntax error, it had () where the shouldn't have been, and didn't like properly formated...
Thank you 'empios' for your answer, that works fine, i've added onload=toggle() to the body tag so that the links are hidden to start with.
I take it then that any property set in an external CSS can not be changed by javascript.
Bit of a pain, but suppose i can work round it.
Thanks again.
Here is my Javascript code
function toggle() {
division = document.getElementById("links");
state = division.style.display;
if (state == "none") {
division.style.display = ""; }
else {
division.style.display = "none"; }
}
This works with in-line styles, but as soon as...
Hi,
I am trying to change the display property of div via Javascript (to show and hide links).
This works fine when i use inline styles, but if i use a separate style sheet it does not work, can any one help?
Sample code
In-line:
<div id="links" style="display:none"> .........
css:
#links...
Thanks for the help everyone especially theboyhope,
Changed the code to pass the layer id as a string, and added the document.getElementById(Tablayer) within the hideLayer() function, and it now works in all 3 browsers.
Thanks again
John [atom]
The function is called using the following
<a href="javascript:hideLayer(map1, -499);" class="small"><<Hide Map 1 / </a>
The value of dis is the width of the map as negative number to move it off the side of the page.
The value of Tablayer is the ID of the div eg. "map1"
The initial...
I have a web page that has 3 maps each in a separate div hidden off the side of the page. When you click a button the chosen map then scrolls into view.
This part of the code works fine in IE, Opera and Firefox, but when it comes to hide the maps again, the script to hide doesn't work in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.