Hi everyone, good to be on board. I have joined this group as I am in the process of writing functions and come across a problem which I would like to air.
As can be seen this code will open a request box for the user's name BUT when the user browses back to the index page the request is made a second time which will certainly drive the user mad. Anyone any ideas how to complete the code to state that if the user is already logged into the site that he NOT be asked to log in again. All suggestions welcome and acknowledge, Macca1
My piece of code which I am writing on the Mac is:
<font face="Arial" size="4" color="#FF0000">
<script>
var whatName=prompt("Please type in your name:","");
function yourName(myName){
if ((whatName != "")&&(whatName !=null)){
document.writeln(" Hello "+whatName+" thank you for contacting Photography")
}else{
document.writeln("Hi there you are welcome to Photography!")
}
}
yourName(whatName);
</script>
</font>




Reply With Quote
