Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying an update message within a page

Status
Not open for further replies.

apple17

Programmer
Jul 5, 2005
46
0
0
US
I have a page where a user selects from a drop down and then, in javascript, I check off an appropriate checkbox. I'd like to also display a message WITHIN THE PAGE, not an ALERT box that indicates the update made on the page. I'd like this message to be in the middle of the page, next to the drop down.

How can I do thia?
 
You can create an element dynamically like so:

Code:
var newDiv = document.createElement('div');

and append it to another element like so:

Code:
existingEl.appendChild(newDiv);

You can fill in the contents of the new DIV using:

Code:
newDiv.innerHTML = '<p>Some text here!</p>';

That should give you something to go on.

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top