
phpQuestioner
Members-
Posts
1,485 -
Joined
-
Last visited
Never
Everything posted by phpQuestioner
-
[SOLVED] Is there a way to add attribute to an element?
phpQuestioner replied to optikalefx's topic in Javascript Help
Your write about the name attribute; I didn't mean to leave that one in there, but the rest of the attributes should work fine for all images in your page. -
To mask the div; you need to give it a background color and set the z-index higher then the div with your images in it.
-
The best way to do this is probably server side; using a database. An alternate; client side idea, would be to create a cookie and check for the cookie. If the cookie exist, don't display the form; otherwise display the form. The draw back to that is that someone could just erase their cookies; so that is why I said server side with a database would be the best we to do this.
-
I really need help with my script Im really Confused
phpQuestioner replied to winmastergames's topic in Javascript Help
Just use PHP to send your form results (for which ever form that was submitted) back to the the URL textbox (for which ever form you are collecting the string for). This is the easiest way to do this. -
try this: <script language="javascript"> function printpic() { var picture = window.open("http://www.google.com/intl/en_ALL/images/logo.gif"); picture.print(); } </script> <a href="javascript:void(0)" onclick="printpic()">Print It!</a>
-
Dynamically Enlarge / Decrease embedded flash?
phpQuestioner replied to Gutspiller's topic in Javascript Help
You can increase the object/embed size; but as far as zoom in/out with flash; you need to code your flash with actionscript to do that. Once you have the right ActionScript to do that; you can call the zoom with a button using FS Commands or JavaScript (depends on how you coded your ActionScript). -
try this instead: <script language="javascript"> <!-- var d=new Date(); theDay=d.getDay(); if (theDay == "0") { // Sunday document.write("<script type=\"text/javascrip\" src=\"https://evaleu.shopzilla.com/js/pos_xxxxx.js\" type=\"text/javascript\"></script>"); } if (theDay == "1") { // Monday document.write("<script type=\"text/javascript\" src=\"https://www.pricegrabber.com/rating_merchrevpopjs.php?retid=xxxx\"></script>") } if (theDay == "2") { // Tuesday document.write("<script type=\"text/javascrip\" src=\"https://evaleu.shopzilla.com/js/pos_xxxxx.js\" type=\"text/javascript\"></script>"); } if (theDay == "3") { // Wednesday document.write("<script type=\"text/javascript\" src=\"https://www.pricegrabber.com/rating_merchrevpopjs.php?retid=xxxx\"></script>") } if (theDay == "4") { // Thursday document.write("<script type=\"text/javascrip\" src=\"https://evaleu.shopzilla.com/js/pos_xxxxx.js\" type=\"text/javascript\"></script>"); } if (theDay == "5") { // Friday document.write("<script type=\"text/javascript\" src=\"https://www.pricegrabber.com/rating_merchrevpopjs.php?retid=xxxx\"></script>") } if (theDay == "6") { // Saturday document.write("<script type=\"text/javascrip\" src=\"https://evaleu.shopzilla.com/js/pos_xxxxx.js\" type=\"text/javascript\"></script>"); } //--> </script> <noscript>Add Non-JavaScript Orientated HTML Or Text Here</noscript>
-
[SOLVED] Is there a way to add attribute to an element?
phpQuestioner replied to optikalefx's topic in Javascript Help
You cannot have the same id for every image; but you should be able to access all the image tags a different way. Try This: <script language="javascript"> function addstuff() { document.getElementsByTagName("img").name="mypic"; document.getElementsByTagName("img").title="hello world!"; document.getElementsByTagName("img").alt="This is a picture of......"; document.getElementsByTagName("img").style.width="100px"; document.getElementsByTagName("img").style.height="100px"; document.getElementsByTagName("img").border="1"; } </script> <img src="myimage.jpg"> <br><br> <input type="button" value="Add Attributes" onclick="addstuff()"> -
How to identify the page type on the current page
phpQuestioner replied to optikalefx's topic in Javascript Help
I really don't know what to tell you. If the URL does not contain a filename or a file extension/type; the document.URL will not be able to detect what the file is; nor will any other dom event that I know of off hand. You will just have to determine where you want your domain to be directed to and set that file name and file extension in you else if and else condition. Beyond that; I think you would have to try a server side script; even then I am not sure it could do what you are wanting it to do; without the filename and file extension. -
try this; it may not work, but check and see: <html> <head> </head> <body> <script> var curdate = new Date(); if (curdate.getHours() >= 8.5 && curdate.getHours() < 20.5) { // error is not given because you are open } else { alert('You reporting after hours, please call this number 555-555-5555, then submit the incendent report'); } </script> </body> </html>
-
You just needed to flip some stuff around: <html> <head> </head> <body> <script> var curdate = new Date(); if (curdate.getHours() >= 8 && curdate.getHours() < 20) { // error is not given because you are open } else { alert('You reporting after hours, please call this number 555-555-5555, then submit the incendent report'); } </script> </body> </html>
-
[SOLVED] Post Target IFRAME Not Working in IE (Firefox Works Great)
phpQuestioner replied to casbboy's topic in HTML Help
Post your code; so I can see what is going wrong. -
Since this is a third party script; I suggest you go back to the site where you found it and look for the author's notes/directions on how to implement their script. They usually provide a demo/example of the code and if none of these suggestions help; try to contact the author with your question. - Good Luck
-
Onclick checkbox that inserts data into a Database
phpQuestioner replied to law's topic in Javascript Help
Well first off your using the mysql; you need to be using UPDATE. Then you will have to add an onclick event to a checkbox that will submit your form variable values to you php/mysql. something like: <script language="javascript"> function addinfo() { document.msqlfs.submit(); } </script> I have been here:<br><br> <form name="msqlfs" action="myphpandmysqlpage.php" method="post"> <input type="checkbox" name="checkboxnamehere" value="0" onclick="addinfo()"> Never <input type="checkbox" name="checkboxnamehere" value="1" onclick="addinfo()"> Once </form> -
Your using two onclicks for one button; not two onclick events; but two actual onclicks. That might not be your only problem, but it's diffidently one you need to fix. You need to combine the two onclick events into one onclick.
-
How to identify the page type on the current page
phpQuestioner replied to optikalefx's topic in Javascript Help
Not unless you manually change the page extension from "htm" to "php" in the script I wrote for you. If there is no page extension in the URL; then the client side javascript has no idea what the page extension is. I think what I have provided you; is as close as your going to come to identifying the file name and page extension client side. -
[SOLVED] Is there a way to add attribute to an element?
phpQuestioner replied to optikalefx's topic in Javascript Help
you will have to give the image an id; unless you reference all images in the page. which you can do, but I don't think that is what your wanting to do. try this: <script language="javascript"> function addstuff() { document.getElementById("newlyaddedid").name="mypic"; document.getElementById("newlyaddedid").title="hello world!"; document.getElementById("newlyaddedid").alt="This is a picture of......"; document.getElementById("newlyaddedid").style.width="100px"; document.getElementById("newlyaddedid").style.height="100px"; document.getElementById("newlyaddedid").border="1"; } </script> <img id="newlyaddedid" src="myimage.jpg"> <br><br> <input type="button" value="Add Attributes" onclick="addstuff()"> -
you mean like this: <div id="name"> <script language="javascript"> var people = new Array(); people[0] = "Michael"; people[1] = "Lue"; people[2] = "Rachel"; var max = people.length - 1; for (i=0;i<=max;i++) { document.write(""+people[i]+"<br/>"); } </script> </div>
-
Your form action is for "index.php"; of course it is going to submit back to itself (the domain follows the index page); unless you have another index file, with a different file extension (ie "html" or "htm"). If your "index.php" is supposed to redirect; then you might want to take a look at your php code for this issue.