Jump to content

external page id element help please


paulmo

Recommended Posts

have tried calling id="dtField" in html page; it's just showing id="dtField" in browser. please show me how to call/echo/write the element in the html page. thanks

 

window.onsubmit = initDate;

function initDate() {
var now = new Date();
var dtString;

if (now.getHours() < 5) {
	dtString = "Good evening.";
}
else if (now.getHours() < 9) {
	dtString = "Good Morning.";
}
else if (now.getHours() < 17) {
	dtString = "Time to work.";
}
else {
	dtString = "Good Evening.";
}

document.getElementById("dtField").innerHTML = dtString;
}

Link to comment
https://forums.phpfreaks.com/topic/142311-external-page-id-element-help-please/
Share on other sites

if you change the innerHTML of the "dtField" div; that is all that will be changed. this would not effect the "col2" div or any content within it.

 

if you are having a problem; i would say this would be it:

 

class="rounded {10px}"

 

that is not the way you create a class. you should not have any spacing or characters other then letters and numbers.

ok, i took out spaces; script still doesn't execute. the rounded corners class is working fine; it's a jquery script.

 

here's the latest; getting

mysql_fetch_array(): supplied argument is not a valid MySQL result resource
also tried assoc...i'm sure more than that is a problem here:

 

$process = mysql_query("SELECT * FROM xxx WHERE MATCH terms AGAINST '%$message%'"); //this is user input which could be 
any string!
$process_results = mysql_query($process);
while ($row = mysql_fetch_array ($process_results))
{ 
echo $process_results['terms']; 
echo " "; 
} 

as i said before the class needs to only have numbers and letters in it; if the brackets is still in there; you will have problems. if this is a jQuery problem; consult there documentation. if this is a php issue; then this thread belongs in the php forum. what exactly are you trying to accomplish, anyway?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.