Jump to content

Webworldx

Members
  • Posts

    347
  • Joined

  • Last visited

Posts posted by Webworldx

  1. Yes, it's the zone alarm external script to block popups. You've got no need to worry (unless you don't want ZA doing it.. then you can turn it off in the options panel)

  2. It's just the name of a function, it could well be:

    <script type="text/javascript">french_fries();</script>

    :)Somewhere else in the document, there'll be:

    function postamble(){}

    With what the function actually does :)

  3. Not to mention that their HTML is ancient and you are suppose to use XHTML, right?Use big sites to see how NOT to do the things. Use smaller but standart compilant sites to see how you SHOULD do the things. See aspnetguy's site (spatterdesign) for instance :) .

    Agreed, look at standards compliant web development to better your skills. You can't go far wrong then :)
  4. Like:var myArray = new Array();myArray[0] = new Array( "value in [0][0]" , "value in [0][1]" );myArray[1] = new Array( "value in [1][0]" , "value in [1][1]" );?

  5. Say you've got:document.getElementById('something').innerHTML = "....";document.getElementById('something').style.color="#FF0000";document.getElementById('something').style.backgroundColor="#000000";document.getElementById('something').title = "this";you could instead do:with( document.getElementById('something') ){ innerHTML = ".." style.color = "#FF0000"; style.backgroundColor = "#000000"; title = "this";}:)

  6. I'm slightly confused on what you're looking for. Is it, say you've got a paragraph:"Some text in here needs to be translated"and all the words would be individually converted to the new language? If so, the simple way to do it would be a myArray = theString.split(/ /gi)then pass all the values of myArray through your function.

  7. Why not use a table to do this and show/hide the rows dependant on the options selected?I've noticed a few of the option lists contain exactly the same information too, would it not be worth restructuring the whole code and "loading in" the select boxes and their values dynamically?

  8. Was just about to say, your code should look more like:

    <script type="text/javascript">function validate_form(thisform){ with (thisform){  if ( validate_required(fname,"Name must be filled out!") == false){fname.focus();return false }  if ( validate_email(email,"Not a valid e-mail address!")==false) { email.focus();return false } }}function validate_required(field,alerttxt){with (field){if (value==null||value==""){alert(alerttxt);return false}else {return true}}}function validate_email(field,alerttxt){with (field){apos=value.indexOf("@")dotpos=value.lastIndexOf(".")if (apos<1||dotpos-apos<2) {alert(alerttxt);return false}else {return true}}}</script><form action="submitpage.htm" onsubmit="return validate_form(this)"method="post"><input type="text" name="fname" size="20"><input type="text" name="email" size="30"><input type="submit" value="Submit"></form>

  9. How far is your form going up to? If you're having more than say, three select boxes, it may be worth holding the chosen numbers into an array (select 1 = 0, select 2 = 1, select 3 = 2 etc etc), and querying that at the end. You can always then checkif(selectBox[x] == 0) skip:)

  10. Well, it's certainly possible - but it's probably better spending your time learning more useful Javascript things :) Have a read through the W3Schools JS tutorials

  11. <html><head><script type="text/javascript">function PrototypeFunction(){rental=prompt("Type the word","");document.getElementById('formname').box2.value=rental}</script><body onload="PrototypeFunction()"><form id="formname"><input type=text name="box2" ></form></body></html>

  12. Wouldn't:

    <script type='text/javascript'>var randomBG = [];randomBG[0] = "http://here.here.com/image.jpg";randomBG[1] = "http://here.here.com/image.jpg";randomBG[2] = "http://here.here.com/image.jpg";randomBG[3] = "http://here.here.com/image.jpg";var rand = Math.floor( Math.random() * randomBG.length );document.getElementsByTagName('BODY')[0].style.backgroundImage = 'url(' + randomBG[rand] + ')';</script>

    Work?

×
×
  • Create New...