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
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.

Link to comment
Share on other sites

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 " "; 
} 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

i will explore that bracket situation with jquery rounded corners; i used the documentation.

 

i just want to echo that id=dtField...took out all other js on page, followed example from book. sent e-mail to authors so maybe they'll write back.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.