Jump to content

Webworldx

Members
  • Posts

    347
  • Joined

  • Last visited

Everything posted by Webworldx

  1. Say you've got umm... <script type='text/javascript'>function doSomething(){ alert('this alert comes on key down');}function keyme(){ window.event.cancelBubble=true;}document.write('<input value="">');document.write('<input onkeydown="keyme()" value="">');</script><BODY onkeydown="doSomething()"> Try typing in the first box... alert comes up. Now try typing in the second. You've stopped the event bubbling up the hierachy to the next one (the top level onKeyDown in the body tag), so it types everything normally.
  2. It's worth testing it out yourself rather than just putting it in - or you won't see the results
  3. Basically, if javascript runs across </script>, it'll count it as the end of the script. If it runs across </head>, it won't, as it's not a javascript tag
  4. Yes, you can write a PHP member login / user cp code yourself, or use one of the many available around the net like:http://www.hotscripts.com/PHP/Scripts_and_...Authentication/
  5. Do you have MySQL installed on your server?
  6. It's going to get a bit complicated here though isn't it? What happens if someone enters the same x & y co-ordinates for two tiles? Does it have to update the position of the tile in the map after clicking? How will the user tell where it is?At the moment, i've got an image in my head of say.. 4 tiles.. you click one of them and it pops up a box with the current x and y co-ordinates of the tile in ( say.. 1, 1), and you can change it and hit save or reset, or click the tile again to close the box. Not sure what happens after the box "saves".Am I going in the wrong direction?
  7. Heh, think you might be looking for window.opener http://www.mozilla.org/docs/dom/domref/dom_window_ref77.html
  8. Not really sure what you're asking for to be honest! I've whipped up this: <script type='text/javascript'>function createBox(obj){ var x = document.getElementById('map' + obj) var y = document.getElementById('span' + obj) x.innerHTML = (x.innerHTML == 'Clicked') ? 'Click' : 'Clicked'; y.style.display = (y.style.display == 'none') ? 'inline' : 'none';}</script><table id="rpgMap" width="400" height="120"> <tr> <td width="50%" vAlign="top"><a href="javascript:createBox(0)" id="map0">Click</a><br /><br /><span id="span0" style="display: none">X: <input size="6" /> Y: <input size="6" /></span></td> <td width="50%" vAlign="top"><a href="javascript:createBox(1)" id="map1">Click</a><br /><br /><span id="span1" style="display: none">X: <input size="6" /> Y: <input size="6" /></span></td> </tr></table> If it's not what you're wanting, do a quickie in Paint and we'll see what we can do.
  9. Not quite sure what you mean with dom.. but i'm guessing you mean DOM features. It really does depend. When I last checked, IE didn't support :focus, and :hover only on A elements, so from that point of view it's worth using JS over CSS - but if you can work a cross browser CSS-style solution, I'd prefer to use that.
  10. So you just want to put some boxes onto the page, then when it's clicked again, take the boxes off?BOX.style.display = (BOX.style.display == "block") ? "none" : "block"Or did you want more than this?
  11. Unless you put a textbox above it, or hold the keydown of anything on the dropdown in a variable [getting complicated]. But yeah.. I believe Google's experimental search drop-down does what you want, but it isn't using the default box, it's a custom made script.
  12. In fact, if you do a:if( x.match(/mysite.com/i) != null){ //The last page visited was on the site}That'd do for it wouldn't it?
  13. <script type="text/javascript"><!--var homePageImage = new Array();homePageImage[0] = "http://www.ucihs.uci.edu/com/pediatrics/newsite/images/homepageimage1.jpg"; homePageImage[1] = "http://www.ucihs.uci.edu/com/pediatrics/newsite/images/homepageimage2.jpg";homePageImage[2] = "http://www.ucihs.uci.edu/com/pediatrics/newsite/images/homepageimage3.jpg";var rotate=2100; var count=0;function rotateImg(imgId){document.getElementById(imgId).src=homePageImage[count];if(count==2) { count=0; }else { count++ }} var winInt = setInterval("rotateImg('peds')",rotate);//--></script> <body onload="rotateImg('peds')"><img id="peds" class="peds" src="" width="430" height="165" alt="UCI School of Medicine, Department of Pediatrics" />
  14. Won't you want to .match() that scott - the referrer shows the full URL doesn't it?
  15. I can see Vista being the end of IE and perhaps the creation of something like Microsoft Browser Live! It is an outdated engine, and it would mean they wouldn't have to support existing legacies. They've got some great people on the IE team now though, so we'll see what happens.
  16. I honestly think IE is a good browser. I run IE7 Beta 1 and run Maxthon on top of it, and I can't find a single thing FireFox has over it, except for perhaps the standards side of it - which MS is working hard to rectify, if you read the IEBlog. Security.. I run Maxthon with scripts auto-disabled apart from on a selected list of trusted sites, no ActiveX, no Java Applets, no Flash. It's 2 clicks to turn them back on, but my virus checker hasn't even brought up a JS-Exploit type script which I used to get all the time. Tabbed browsing with drag-links for new tab, it's great.That aside.. I think if we're just talking about the core browsers with no add-ons (that includes things like Greasemonkey), i'd have to go with Opera. It just feels professional, especially on Linux when compared with FF there.About the whole shipping Windows without a browser - I think that's a bad decision. Remember how annoying it was when Windows didn't include an unzipper?
  17. I've never seen anyone do that, so i'd be interested to know how. It'd be a bit of a security issue if you could change the location of a modal box, as you could then force say, an activex download off the screen and trick the user into hitting enter.The only thing i've seen that comes close, it to override the default window.alert with your own DIV method, like here:http://slayeroffice.com/code/custom_alert/Obviously you'd want to change the code a bit to include a prompt though.
  18. window.open "URL" , "Window Name" , "attributes"?
  19. Pretty sure all the modal dialog's are set by windows itself, so nope
  20. If you want to look at error bubbling in more detail, there's: http://www.mozilla.org/docs/dom/domref/dom_event_ref4.html
  21. <html><head><script id='script1' name='script1' type="text/javascript">function writeIt () {var x="";x += "<html>\n<head>\n";x += "<script>" + window.document.scripts(0).text;x += "<\/script>\n";x += "<\/head>\n<body>\n";x += document.body.innerHTML;x += "\n<\/body>\n<\/html>";alert(x);document.close(); // or document.open();document.write(x);}</script></head><body><input type="button" onclick="writeIt()" value="Write"/>rachit</body></html> Loads fine for me. I backslashed the head, body and html and tidied, although they weren't neccessary changes.
  22. Eeep.. You're wanting to client side transform the XML file? So you've got file.xml, and you want IE to transform it without using an XSL file, or can you use that? If so.. why not just use the method shown in:http://www.w3schools.com/xml/xml_xsl.asp
  23. XSLT with Sablotron should be able to do it on any php host that's enabled it.
  24. Basically because it reads the </script> and terminates the code. If you did <\/script> it'll read it fine
×
×
  • Create New...