Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Shakazahn

  • Rank
  1. Weirdly enough, it's working fine now...I think the variable wasn't declared outside the function: var xmlDoc; And it was giving me null everytime I tried to use it inside the onreadystatechange function.Edit: Ah, I checked the responseHTML and I got the same error... and I'm getting the error again if I use responseXML as well, I guess it just worked because I changed that to responseText (which doesn't help me much since I need to loop through the objects inside the file)
  2. Hi,I'm trying to make a quick pre-defined layout builder for emails and such, and for that I'm using ajax.I'm storing some elements like:File Test.html <div> Testing...</div> And I'm using a Javascript code to load this file and display it on my main page. It works with .XML but I'd like it to work with .HTML files as well. function ajaxS(object, event) { xmlDoc = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.onreadystatechange = function() { if (xmlDoc.readyState == 4) { if(xmlDoc.status == 200) { alert(xmlDoc.responseXML.childNodes[0].nodeName); } } }; xmlDoc.open("GET", "Test.html", true); xmlDoc.send(null);} I was pretty sure it used to work with HTML files but I'm getting a "xmlDoc is null" error when I call that function.Can anyone point me what am I doing wrong?
  3. Shakazahn


    Yeah, I found out about that when I tried to register it... gonna remake it then, thanks.Another lesson learned the hard way
  4. Shakazahn


    That's what I'm trying to avoid... it is a HTML site with Flash and AJAX content (all the links are Flash + Javascript) so if I have to remove it I'll basically have to do it all over again...
  5. Shakazahn


    Hi,I don't know where this thread would fit since it's not really about any language in particular (maybe XML?) but more about the finishing touches of a site.I finished a site for a friend of mine and I'm trying to add it to the Google Search, but for some reason it says my site isn't indexed.One of the possible reasons they mention is that AJAX driven sites can't be tracked and thus won't be indexed, so they suggested that I make a Sitemap and send it to them.But the thing is, how do I create a Sitemap for an AJAX site?
  6. Worked perfectly, thanks!
  7. Shakazahn

    Text Fader

    I didn't notice anything wrong, worked fine here (IE 7 and FF 3), so it can be a browser issue.Can you be more specific with the problem?
  8. Shakazahn

    Form Action

    I've been trying to do a simple animation to simulate (only simulate, it doesn't check anything at all) a loading bar after the form is submited.Here's the code: <form action="myform.php" method="POST" name="form" id="form" onsubmit="return formcheck(this)">Name: <input type="text" style="width:200px;" name="name" id="name" /></form> And the script: function formcheck(form){ if(form.name.value == "") { alert("Please type your name"); form.name.focus(); return false; } else { var perc = 0; var inter; document.getElementById("body").innerHTML += "<div id=\"message\" class=\"texto\"><p>Please wait while your request is sent... <span id=\"num\">0%</span><br /><div id=\"loader\" style=\"position:relative; width:0%; background-color:teal;\"></div></p></div>"; inter = setInterval(function(){ if(perc < 100) { perc++; document.getElementById("loader").style.width = perc + "%"; document.getElementById("num").innerHTML = perc + "%"; } else { return true; } }, 50); }} But this doesn't work =(After the animation's complete it just halts (the form action isn't called). Any way so I can get around this?
  9. Hum yep these 2 works but I can't use the borders like I want.Here's the site I'm setting up (incomplete, I've got some stuff up but I'm working on the design still): http://daniel.holywannapita.com/index.phpIt happened that I tried to show it to a friend of mine, who was using 800x600 (O_O) and things were just... huge, offscreen and weird (also, he was using IE 6 ugh). So I'm trying to set it so it can be viewed in any resolution, using %s.Currently I'm using tables to look like this but I want it to be div only, someone complained that it doesn't look good using tables on a site at all @_@
  10. Thanks for the reply but this isn't what I was trying to do, I mean, well, it is, but I don't want the "content" (body) having a fixed width.I use a 1440 wide monitor and I'm pretty much used to it, and since most viewers that come to the site use 1024x768, I'm trying to set up a resizable layout.But to get the resizable I'd need to use %s, but on a 1024x768 for example a 80% body and 20% menu looks good, but on my 1440 doesn't (the menu just gets... HUGE!), so I'm trying to set a fixed width for the menu only, and leave the body with a % of what's left.This is what I did:<table style="width:100%;"><tr><td colspan="2" style="width:100%;"><div id="head" style="border:1px solid black;">HEADER</div></td></tr><tr><td style="width:100%;"><div id="body" style="border:1px solid black;">BODY</div></td><td style="width:300px;"><div id="menu" style="border:1px solid black;">MENU</div></td></tr></table> This way the body will resize according to the browser but the menu won't, and it will fit on any resolution. (Sorry if I'm not being clear, just copy and paste, then resize your browser to understand what I mean)And since I've been reading about this tableless stuff all over I'd like to know if there's a way to do something like this without the table.
  11. Shakazahn

    Tableless Question

    I've read some about tableless on the net and I really don't get the point, what's wrong with using tables for layout?Sites made with tables seem to work just as fine as without them, unless there's some hidden technical disavantage on using tables I don't see why shouldn't we use it for layout.Also, one question that I have is how would you format a page to look like this:The main point is that body must occupy all of the screen that's left after the menu, so I don't bother which resolution the viewer's using (the menu has a fixed width, while the body's width is everything else on screen - even if it's resized).I've seen this kind of layout on some blogs and it's what I'm trying to do, though I can't do this without using a table.Any help is welcome, thanks.
  12. I've made a comment box for my site and someone spammed a reaaaallllyyyy long line, and the comment box "broke".I'm using the sliding doors tech, with a 1600w long pic, but what's annoying is that no matter if I set a fixed width or not on FF the comment will just go out of the box (but the box will remain at max-width set) while on IE it'll break no matter what width/max-width I set.Is there a PHP command to force a linebreak from a SQL data?Quick Edit: I'm not asking about \n, but something that would help me prevent comments like that from "breaking" the box and messing the site's layoutQuick Edit2: Found, after some hours (and just after I gave up and resorted to the forums ) the wordwrap($string, $maxchars) command.
  13. I was browsing around and noticed some sites with comments have a resizable background image comment box, how do you do it?For example:The white box with round edges it's something like what I'm trying to do (a comics baloon) but I don't have a clue on how to (besides using multiple images with dif. sizes and maybe checking how many rows the comment has and then display the proper image? I think it's not, there should be something more flexible...).
  14. Shakazahn

    Xml Bug?

    Firefox's consistent with almost everything you try, you also know it'll probably work on any browser just like that except IE.IE's supposedly good, it makes the designer think of ways to work around it's bugs with creativity - alot of creativity. Unfortunately I can't do that, since I intended to use that to read how many childs that element had (and get it's names and some atts) and display on mouse over/out.Instead I loaded a hidden div with PHP and set it to show onmouse over events... not exactly what I wanted but it's working.
  15. Shakazahn

    Xml Bug?

    I just made a new XML file for testing purposes and if I type... <?xml etc?><root><main><firstchild></firstchild><secondchild></secondchild></main></root> ...it works perfectly fine.What I'm using to check is a body onLoad function(): startupload(){ document.getElementById('body').innerHTML = xmlFile.getElementsByTagsName('main')[0].childNodes[0].nodeName + "<br />"; document.getElementById('body').innerHTML += xmlFile.getElementsByTagsName('main')[0].childNodes[1].nodeName + "<br />";} And this displays firstchild / secondchild nicely. But the problem's when I jump a few lines to type something (even though I hadn't, I just ENTER'ed a few lines) and it messes it all up. <?xml etc?><root><main><firstchild></firstchild><secondchild></secondchild></main></root> Simply by doing this Firefox's output becomes: "#text / firstchild" while IE's remain unchanged. Does anyone know what could be the cause of this?I'm using Notepad++ and I've also tried with the basic windows notepad, same results, encoding types UTF-8 and ISO-8859-1.
  • Create New...