Shame on all you people that know javascript and have not offered up some tidbits.
I did want to say that I would never ever use javascript unless forced to in a web page, but I know better than to say "NEVER". I do not like the word "script" included in the same sentence with the words "web page". And I did not want to learn something new to program with, my head has enough to accomplish what needs to be done with the tools I have.
But I came across some javascript language in learning some php programming code, why you ask? Because Powerbasic does not do CGI on a Linux OS. HINT! HINT! It is ok, none of my users use linux as a desktop anyways.
Well my hand has now been twisted to do some javascript code because I found three little variations of similiar javascript code that you can use in your powerbasic coded cgi programs.
I actual did not use all three javascript functions of code yet but there are three useful javascript functions I like: ALERT, CONFIRM AND PROMPT
My php html code only uses the javascript ALERT function now, but i will surely use the CONFIRM and the PROMPT code too.
Here it is and do not ask me what the "history.go" is, I do not know, look it up, it will fun. NOT!
This piece of php code is some of what i am using but the functions can be easily created into powerbasic code. the web page i wrote calls itself over and over in a web page form program i wrote to send emails. the function "message" calls the other two functions "header" and "footer", so "message" is the main function for me that i call.
the variable "$msg" in the function "message" might be assigned "you did not fill in the email field". All this is similar to MSGBOX and it might actually be the same thing except for you can have the user input a line using the PROMPT function.
this piece of code may not actually work, i just listed them for you get a look at.
i am just bringing this to your attention so you can do a search and find out more about these three pieces of javascript functions, ALERT, CONFIRM, PROMPT.
you can place some more code after the PROMPT function inside the javascript block of script such as a "IF" statement.
I like this better than placing some stupid little red colored asterick mark you barely can see in a form, but it is ok if you do not want the user to have to run any javascript, but what freaking web page these days do not have javascript on them, HUH. This is so much better also for blind people, yes, you know exactly who i am talking about.
I did want to say that I would never ever use javascript unless forced to in a web page, but I know better than to say "NEVER". I do not like the word "script" included in the same sentence with the words "web page". And I did not want to learn something new to program with, my head has enough to accomplish what needs to be done with the tools I have.
But I came across some javascript language in learning some php programming code, why you ask? Because Powerbasic does not do CGI on a Linux OS. HINT! HINT! It is ok, none of my users use linux as a desktop anyways.
Well my hand has now been twisted to do some javascript code because I found three little variations of similiar javascript code that you can use in your powerbasic coded cgi programs.
I actual did not use all three javascript functions of code yet but there are three useful javascript functions I like: ALERT, CONFIRM AND PROMPT
My php html code only uses the javascript ALERT function now, but i will surely use the CONFIRM and the PROMPT code too.
Here it is and do not ask me what the "history.go" is, I do not know, look it up, it will fun. NOT!
This piece of php code is some of what i am using but the functions can be easily created into powerbasic code. the web page i wrote calls itself over and over in a web page form program i wrote to send emails. the function "message" calls the other two functions "header" and "footer", so "message" is the main function for me that i call.
the variable "$msg" in the function "message" might be assigned "you did not fill in the email field". All this is similar to MSGBOX and it might actually be the same thing except for you can have the user input a line using the PROMPT function.
Code:
function header() { ?> <HTML> <HEAD><TITLE>javascript to use</TITLE></HEAD> <BODY> <?php } function footer() { ?> </BODY> </HTML> <?php } function message($msg) { header(); echo "<SCRIPT>alert(\"$msg\");history.go(-1)</SCRIPT>"; footer(); exit; }
i am just bringing this to your attention so you can do a search and find out more about these three pieces of javascript functions, ALERT, CONFIRM, PROMPT.
Code:
<HTML> <HEAD><TITLE>javascript to use </TITLE></HEAD> <BODY> <script language="JavaScript"> alert("Error: you made a error.") </script> </BODY> </HTML> <HTML> <HEAD><TITLE>javascript to use </TITLE></HEAD> <BODY> <script language="JavaScript"> var temp=confirm("Do you really want to do this?") if(temp) window.location="hewantstodothis.htm" </script> </BODY> </HTML> <HTML> <HEAD><TITLE>javascript to use </TITLE></HEAD> <BODY> <script language="JavaScript"> var temp=prompt("you missed this entry, enter your email address, ") </script> </BODY> </HTML>
I like this better than placing some stupid little red colored asterick mark you barely can see in a form, but it is ok if you do not want the user to have to run any javascript, but what freaking web page these days do not have javascript on them, HUH. This is so much better also for blind people, yes, you know exactly who i am talking about.
Comment