473,327 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Inserting HTML inside a script

Hi, and thank you in advance for any assistance.

I would like to use a script to determine if a date meets a condition, and,
if it does, then create a table row with a couple of cells, and then put
some text in the cells. I don't know if that is possible, so that's my first
question. It seems to me that the HTML would have to be in the script, but
I'm not experienced enough to know.

The second question is how might I search for info through a search engine
for this? Any suggestions on terms?
Thank you...
Steve E.


Jan 24 '07 #1
2 2292
VK
On Jan 25, 1:38 am, "Serious_Practitioner"
<Serious_PractitionerNOS...@att.netwrote:
I would like to use a script to determine if a date meets a condition, and,
if it does, then create a table row with a couple of cells, and then put
some text in the cells.
var deadline = new Date(2006,1,1);
// year, month, day where month goes 0-11
// (0 - January, 11 - December)
// day goes in the regular way 1-31
// silly, I know ;-) so just memorize

var now = new Date();
// current date

if ( now.getTime() < deadline.getTime() ) {
// here I'm not sure: if you want to insert the row
// right on page load then use document.write();
// otherwise DOM methods will be needed.
// More info would help.
}

The second question is how might I search for info through a search engine
for this? Any suggestions on terms?
javascript scripting dynamic table insert row DOM

Jan 24 '07 #2
Thank you, VK, for your note. More info -

The information that I want to present this way is about classes or seminars
that will take place on given dates. For each seminar, I'd like to make the
comparison to the date, then, if the date has not passed, build a table with
one row and three (or four) cells; one cell would be the name of the class,
the next cell would be a description, the next cell would be the date and I
forgot what I wanted the fourth cell for. I realize that the date of the
class would have to be in the code for the comparison. And I know it's a
little awkward, because we would need similar code blocks for each class. I
can't take the time now to learn enough about MySQL and PHP to do this using
those tools - that's a few months away. This is a stopgap solution.

Thank you again.
Steve E.

"VK" <sc**********@yahoo.comwrote in message
news:11**********************@s48g2000cws.googlegr oups.com...
On Jan 25, 1:38 am, "Serious_Practitioner"
<Serious_PractitionerNOS...@att.netwrote:
>I would like to use a script to determine if a date meets a condition,
and,
if it does, then create a table row with a couple of cells, and then put
some text in the cells.

var deadline = new Date(2006,1,1);
// year, month, day where month goes 0-11
// (0 - January, 11 - December)
// day goes in the regular way 1-31
// silly, I know ;-) so just memorize

var now = new Date();
// current date

if ( now.getTime() < deadline.getTime() ) {
// here I'm not sure: if you want to insert the row
// right on page load then use document.write();
// otherwise DOM methods will be needed.
// More info would help.
}

>The second question is how might I search for info through a search
engine
for this? Any suggestions on terms?

javascript scripting dynamic table insert row DOM

Jan 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Rainmaker | last post by:
Greetings, I have not been able to find the documentation that will allow me to insert php code inside the html code in the $message block in the mail() function. Using the example in the help...
1
by: Ben | last post by:
Hi all, I'm trying to write inside a table cell from external javascript but am not successful. When I insert inside a form within <td...>, it works but does not work for normal table cell. My...
2
by: j van c | last post by:
I have a menubar on my main page. when clicking on a menu item I want to open an existing htm page at a certain position in my main page I use no frames. It should be replacing a div-section....
3
by: sklett | last post by:
Hi- I understand that the Page class has methods for inserting client script into the page. I don't want to build my entire client block w/ a StringBuilder because I only need 1 dynamic...
2
by: ste-m | last post by:
Hi there, I was wanting to calculate how long my web pages take to load, and to insert this time into my HTML source code (not visible from the browser, but only in source view) as a HTML...
2
by: Slain | last post by:
I have a big list of HTML files, which need to be updated with a common text. <script language=JavaScript src="./highlight.js"></script> I need to add the above line in each of the html...
1
by: javediq143 | last post by:
Hi All, This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in...
5
by: atlanteavila | last post by:
Hello all, I have a problem with inserting text with quotes, or html code in to a MYSql Database. I've been trying to create my own content management system, and unfortunately I've come accross a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.