Jump to content

Webworldx

Members
  • Posts

    347
  • Joined

  • Last visited

Posts posted by Webworldx

  1. Or do away with the Center and P altogether and use:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><TITLE>Test2</TITLE></HEAD><BODY><div style="text-align: center;">First Paragraph</div><HR SIZE="6" WIDTH="100%"><p>Second Paragraph</p></body></html>

    ?

  2. Could you put up an example of what you're attempting to do?Say you have something like this:

    <div id="outerDiv">Text <span>in here</span> out of here</div><script type="text/javascript">	var divLayer = document.getElementById('outerDiv')	alert(outerDiv.childNodes[0].data); //Text 	alert(outerDiv.childNodes[1].innerHTML); //in here	alert(outerDiv.childNodes[2].data); //out of here</script>

  3. Take the javascript out of the CSS file, and create a new .JS file, with:

    switch (navigator.appName) {case "Microsoft Internet Explorer":document.write("p.nav {+ height: 60px;+ left: 0px;+ ...+ ...+ }")breakcase "Netscape":document.write("p.nav {+ ... Netscape definitions ...+ }")break}

    In. Upload that to your host, and use:<script src='http://link/myfile.js'></script>

  4. What you're asking doesn't make sense. Use:document.getElementById("border").childNodes[0].innerHTML if you just wanted the Hello <b>World!</b>Or were you looking for a way to just display text with no tags? That isn't what childNodes is specifically for, you could just strip the tags out of innerHTML otherwise.Explain it a bit more clearly what you actually want.

  5. If your host has Fantastico available on your host, i'm sure there's Shopping Basket installed on there. Otherwise, the above PayPal idea or as The-Eagle-Eye said, would be a good idea.

  6. I think the BR one's right, to be honest. If you were new to the language, and saw:<B>text</B><I>text</I>etc..you'd think it'd be<BR></BR>Which is where it becomes confusing... <BR /> is a nice way of sorting out "self-closing" tags, like <base /> etc.Center is a bit of a weird tag. I personally love it, and use it all the time. IMG is being depricated in the next XHTML isn't it?I agree that XHTML / XFORMS need to be taken with a pinch of salt, but the language is only at 1.0/1.1, i suppose.http://www.ajaxian.com/archives/2005/06/html_5_vs_xhtml.htmlA nice article :)

  7. <script type="text/vbscript">Function doSomething()	Msgbox "text here"End Function</script><INPUT id=DEL style="WIDTH: 74px; HEIGHT: 40px" type=button size=17 value=Delete width="200" tabindex="21" onclick=doSomething() name="DEL">

  8. <div id="testDiv"><span id="internalspan"><b>Text</b></span></div><script>var divLayer = document.getElementById('testDiv');alert(divLayer.childNodes.length); //returns 1 (the SPAN)alert(divLayer.childNodes[0].childNodes.length); //returns 1 (the <B> tag)alert(divLayer.childNodes[0].childNodes[0].innerHTML); //returns Textalert(divLayer.childNodes[0].innerHTML); //returns <b>Text</b>alert(divLayer.childNodes[0].childNodes[0].parentNode.parentNode.innerHTML); //returns <span id... ../span></script>

  9. var fields = [ "firstName" , "lastName" , "addressTitle" , "address1" , "city1" ];var content = ""for(i = 0; i < fields.length; i++){ if(xmlDocument.getElementsByTagName(fields[i]).item(0).firstChild.data){   content += xmlDocument.getElementsByTagName(fields[i]).item(0).firstChild.data }}document.getElementById("contactInfo").innerHTML = content

    Something like that?

×
×
  • Create New...