java in c code?
-
hi, does any one know how to put a small java script code (about 10 lines) into a c code script? what i am doing is creating a web page (by putting html in the c code) and it works but now i want to add java in and it does not work. i thought it was like this: strcat( buffer, "
It is now " "<!--" "var currentTime = new Date()" "var day = currentTime.getDate()" "var month = currentTime.getMonth()" "var year = currentTime.getFullYear()" "document.write(day + / + month + / + year)" "
" ); any suggestions? thanks ;)
-
hi, does any one know how to put a small java script code (about 10 lines) into a c code script? what i am doing is creating a web page (by putting html in the c code) and it works but now i want to add java in and it does not work. i thought it was like this: strcat( buffer, "
It is now " "<!--" "var currentTime = new Date()" "var day = currentTime.getDate()" "var month = currentTime.getMonth()" "var year = currentTime.getFullYear()" "document.write(day + / + month + / + year)" "
" ); any suggestions? thanks ;)
what do you mean about "work"? need Java code similar to your c code as bellow? String sBuf="
-
hi, does any one know how to put a small java script code (about 10 lines) into a c code script? what i am doing is creating a web page (by putting html in the c code) and it works but now i want to add java in and it does not work. i thought it was like this: strcat( buffer, "
It is now " "<!--" "var currentTime = new Date()" "var day = currentTime.getDate()" "var month = currentTime.getMonth()" "var year = currentTime.getFullYear()" "document.write(day + / + month + / + year)" "
" ); any suggestions? thanks ;)
Define "does not work." How big is
buffer
? Don't the lines need to be terminated with a\n
character so that it is output correctly.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
Define "does not work." How big is
buffer
? Don't the lines need to be terminated with a\n
character so that it is output correctly.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
by doing this, the only thing that shows up on the web page is the top part of the page i created, then "It is now" and then on the following line is "variable status" but what i wanted it to do is after "It is now" it should show the correst date on the webpage. in powerpoint this javascript works. . . . strcat( buffer, " " "
It is now " "<!--" "var currentTime = new Date();\r\n" "var day = currentTime.getDate();\r\n" "var month = currentTime.getMonth();\r\n" "var year = currentTime.getFullYear();\r\n" "document.write(day + / + month + / + year);\r\n" "
\r\n" "
VARIABLE STATUS
" . . . thanks...;)
-
by doing this, the only thing that shows up on the web page is the top part of the page i created, then "It is now" and then on the following line is "variable status" but what i wanted it to do is after "It is now" it should show the correst date on the webpage. in powerpoint this javascript works. . . . strcat( buffer, " " "
It is now " "<!--" "var currentTime = new Date();\r\n" "var day = currentTime.getDate();\r\n" "var month = currentTime.getMonth();\r\n" "var year = currentTime.getFullYear();\r\n" "document.write(day + / + month + / + year);\r\n" "
\r\n" "
VARIABLE STATUS
" . . . thanks...;)
Show me the relevant pieces of your code that create the HTML file and then write to it.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow