Jump to content

web_loone_08

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

Everything posted by web_loone_08

  1. ok - i changed your script slightly - i don't know if the changes i made; was where your error was at or not, but try this out - see if it was what your originally wanted to do and then add the script to an external file and link it to your header.php include page and see if it works. <script type="text/javascript"> function updateCreditCardName() { var fNameTxtBox = document.getElementById('fName'); var lNameTxtBox = document.getElementById('lName'); var nameOnCardTxtBox = document.getElementById('ccNameOnCard'); var fName = document.frmAddCustomer.fName.value.toUpperCase(); var lName = document.addCustomer.lName.value.toUpperCase(); document.addCustomer.ccNameOnCard.value = fName + " " + lName; } </script> <form name="frmAddCustomer"> First Name: <input type="text" name="fName" /> </form> <form name="addCustomer"> Last Name: <input type="text" name="lName" /> <input type="text" name="ccNameOnCard" /> </form> edit: you will have to add the oblur function to the "fName" - for some reason it is not in the code i posted.
  2. did you look and see what FireBug said was undefined? you may just need to define a variable in your external JS file; that you may have forgot or left out.
  3. it may be a result of you using all those periods in your tags - getElementsByTagName may have an issue with that.
  4. JavaScript code is client side - you need a server side language to process a file upload (PHP, ASP, JSP, etc) - you can use a combination of the two - this is called AJAX or JSON (depending on which you choose to use).
  5. try this: <html> <head> <title>FLASH DETECTOR</title> <style type="text/css"> #layer1 /* FLASH LAYER */ { display:none; } #layer2 /* STATIC LAYER */ { display:none; } </style> <SCRIPT LANGUAGE=JavaScript1.1> var MM_contentVersion = 6; var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; if ( plugin ) { var words = navigator.plugins["Shockwave Flash"].description.split(" "); for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; var MM_PluginVersion = words[i]; } var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion; } else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) { document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag document.write('on error resume next \n'); document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n'); document.write('</SCR' + 'IPT\> \n'); } function check() { if (MM_FlashCanPlay == true) { document.getElementById("layer1").style.display="block"; alert("Layer 1 Showing"); } else{ document.getElementById("layer2").style.display="block"; alert("Layer 2 Showing"); } } window.onload = function() { check(); } </SCRIPT> </head> <body> <div id="layer1"> FLASH LAYER </div> <div id="layer2"> STATIC LAYER </div> </body> </html>
  6. I would look into PHP Pagination or AJAX & PHP Pagination; this way, you can display only a limited number of items per page.
  7. FF recognizes the onclick event on a select menu; where IE does not seem to - I don't know about Chrome; I haven't designer beta tested it yet; so I don't know much about it, but it seems (from what you are saying) - it is the same way. You want to totally do away with the onclick() event and add a onchange() event to your select tag and set the num parameter to this.value; example below: <form action='index.php/childcareregistration/' method="POST"> Number of Children: <select onchange='buildForm(this.value)'> <option value='1' selected>1</option> <option value='2'>2</option> <option value='3'>3</option> <option value='4'>4</option> <option value='5'>5</option> </select><br /><br /> Your Name: <input type='text' name='parentName'><br> Your Phone Number: <input type='text' name='parentPH'><br> <div id='childCare'>...</div> <div id='notice'>...</div> </form> This works in FF & IE; you'll have to test it for yourself in Chrome, but it should work in all three browsers.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.