Jump to content

phpQuestioner

Members
  • Posts

    1,485
  • Joined

  • Last visited

    Never

Everything posted by phpQuestioner

  1. do it like this: <script language="javascript"> var myaye = 0; function begin() { myaye=myaye+1; if (myaye <= 100) { document.getElementById('slider').style.height= myaye + "px"; } setTimeout("begin()", 10); } function step() { setTimeout("begin()", 10); } window.onload=function() { step(); } </script> <div id="slider" style="border:solid 1px black;width:100px"> </div>
  2. client side or server side cookies
  3. Just do this: "i<=3" and you will not need a setTimeout; because when it reaches, it will stop.
  4. You need to reference the dateObject "getMonth()". Basic Example: <script language="javascript"> var d = new Date(); var month = d.getMonth(); alert(month); </script>
  5. It's because you are not define your href location; so it just reloads you page. try it this way: <style type="text/css"> .setnone { display : none; } .setdisplay { display : inline; } </style> <script language="javascript"> function changeClass() { setClassName("eventsetting","setdisplay"); } function setClassName(targetName, nameOfClass) { var target = document.getElementById(targetName) if(document.implementation && document.implementation.createDocument) { target.setAttribute("class", nameOfClass); } else { target.className = nameOfClass; } } </script> <a href="javascript://" onmouseup="changeClass();">Edit Events</a> <div id="eventsetting" class="setnone"> stuff in here </div>
  6. I am not sure how transparent you want it; but it does appear to be somewhat transparent in FF & IE. You can use CSS to add even more transparency to the png. Try Something Like This: <style type="text/css"> #pngIDHere { filter:alpha(opacity=50); -moz-opacity:0.50; } </script> PS: This question is not AJAX related.
  7. This sounds like basic javascript; you really don't need ajax to do this, unless you want to get the directions sever side. Well a basic example would be like this: <script language="javascript"> function info(director) { document.getElementById('directions').innerHTML = director; } </script> <div id="directions"></div> <br><br> First Name: <input type="text" name="FirstName" onfocus="info('Please Enter Your First Name')"> <br><br> Last Name: <input type="text" name="LastName" onfocus="info('Please Enter Your Last Name')">
  8. Looking into the overflow css property; the ideal example you provided would probably have to be implemented with dhtml; looks like a custom scrollbar/scroll buttons (custom scrolling div).
  9. You have a good weekend too. Good Luck with your adventure into server side language.
  10. You still cannot prevent a browser refresh with this method; there is no way to control that.
  11. The original code I gave you does work; you have changed the code around and now it doesn't work. Revisit the original code I posted for you: http://www.phpfreaks.com/forums/index.php/topic,179668.msg800958.html
  12. You can not stop the browser from being refreshed, but you can redirect to the current page, if some condition is not meet. That is about the best you can do.
  13. First off; you probably will need to post some code; so people can look at what your talking about. Also this thread may be better off in the AJAX forum; which is located here: http://www.phpfreaks.com/forums/index.php/board,51.0.html
  14. DON'T DOUBLE POST! http://www.phpfreaks.com/forums/index.php/topic,179223.0.html You can also do something simple and disable the button onsubmit.
  15. Search Google for PHP & MySQL tutorials (that is if your server allows PHP and/or MySQL). Search for specific pages that contain code examples of what your trying to do.
  16. don't actually know what your trying to do, but here you go: var URL = document.getElementById('http://wiicharged.com/hubchat/'+urlselection+'/shout.swf').value;
  17. EDIT Sorry time limit got me <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <script language="javascript"> var totalimgs = document.images.length; function addstuff() { for (i=0;i<=totalimgs;i++) { var names = i + 1; document.images[i].style.border="solid 2px red"; document.images[i].style.width="100px"; document.images[i].style.height="100px"; document.images[i].title="hello world!"; document.images[i].alt="This is a picture of......"; document.images[i].name="Picture"+names+""; document.images[i].id="Pic"+names+""; } } function escapeErrors() { return true; } window.onerror=escapeErrors; </script> <br><br> <input type="button" value="Add Attributes" onclick="addstuff()">
  18. Here is another version too; this version will allow you to give all your images unique names and ids. <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <script language="javascript"> var totalimgs = document.images.length; function addstuff() { for (i=0;i<=totalimgs;i++) { var names = i + 1; document.images[i].style.border="solid 2px red"; document.images[i].style.width="100px"; document.images[i].style.height="100px"; document.images[i].title="hello world!"; document.images[i].alt="This is a picture of......"; document.images[i].name="Picture"+names+""; document.images[i].id="Pic"+name+""; } } function escapeErrors() { return true; } window.onerror=escapeErrors; </script> <br><br> <input type="button" value="Add Attributes" onclick="addstuff()">
  19. script correction - sorry about that <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <script> var totalimgs = document.images.length; function addstuff() { for (i=0;i<=totalimgs;i++) { document.images[i].style.border="solid 2px red"; document.images[i].style.width="100px"; document.images[i].style.height="100px"; document.images[i].title="hello world!"; document.images[i].alt="This is a picture of......"; } } function escapeErrors() { return true; } window.onerror=escapeErrors; </script> <br><br> <input type="button" value="Add Attributes" onclick="addstuff()">
  20. Your going to have to create a image of your octagon button and either add <a> tag with a "href" wrapping your octagon image or add your octagon image to a input button with the css background property and give your button a DOM event.
  21. So I am assuming that these images you want to print are in one page - right? Why don't you just create a css style sheet for print media and set-up your css for this stylesheet to hide everything on the page, except for your images? Then just add a window.print() onclick event to a button.
  22. Your code only opens a predefined url in your pop-up. If you want the individual end user to be able too open up a url of their choice in your pop-up; then you need to do it like this. <html> <head> <script language="javascript"> function popUp() { day = new Date(); id = day.getTime(); var URL = document.getElementById('urlselection').value; window.open(URL,'' + id + '','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300') } </script> </head> <body> <div style="text-align: left;"><a href="http://wiicharged.com/index.php?action=hubs"><img style="border: 0px solid ; width: 656px; height: 125px;" alt="Wii forum friend codes" src="http://i27.tinypic.com/2n24pag.png"></a><br> <br><br> <form onsubmit="popUp(); return false"> <input type="text" id="urlselection"> <input type=button value="Join the hub" onClick="popUp()"> </form> </body> </html>
  23. I am not sure which page of the site the slideshow is on. Is it a automated slideshow or does it have controls? If you would just Google "JavaScript Slideshows"; I'm sure you will find plenty of examples and tutorials on how to do what you want to do. Try to find one with an example/demo; so you can see how it works.
  24. Not sure if you're familar with collections and single elements. Here are some details about it getElementsByTagName http://developer.mozilla.org/en/docs/DOM:element.getElementsByTagName Notice it returns a node list which doesn't support any of the attriubtes you listed above. Try to save your code as HTML and test it Not sure if you have heard of this saying nogray, but "there is workaround for almost everything". <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <img src=""> <script> var totalimgs = document.images.length; function addstuff() { for (i=0;i<=totalimgs;i++) { document.images[i].style.border="solid 2px red"; document.images[i].style.width="100px"; document.images[i].style.height="100px"; document.images[i].title="hello world!"; document.images[i].alt="This is a picture of......"; } } function escapeErrors() { return true; } window.onerror=escapeErrors; </script> <br><br> <input type="button" value="Add Attributes" onclick="add()">
×
×
  • 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.