nogray
-
Posts
930 -
Joined
-
Last visited
Posts posted by nogray
-
-
try changing the 'hand' to 'pointer' and see if it works.
-
I can't really tell for sure what your function does without seeing the actual code, but this could be a problem
$.facebox.close(); wrapTag("<p style=\'" + style1 +"\'>","</p>", document.forms.source.source_code); return false;
(the onclick event)
simply, make a function that will run all these functions and use that function in the onclick event instead.
-
Given both pages are in the same domain, you can add a function in the parent window to replace the source of the viewing image and call it from the iframe using "parent.FUNCTIONNAME()"
e.g.
Main page <script type="text/javascript"> function replace_img(src){ document.getElementById('display').src = src; } </script> <iframe ....></iframe> <img src="images/spacer.gif" id="display" border="0" alt="" /> Iframe page: <img src="images/some_image.jpg" onclick="parent.replace_img("images/some_image_large.jpg");" border="0" alt="" />
Not tested
-
Check the headers of image.php
-
Adding the a script tag will stop processing the page, so adding the confirmation in the head (you almost have it) will do the trick.
Just remove the function so the confirm message shows up right away.
The main issue is PHP runs before JavaScript exists, so you'll need to redirect the user to the overwrite page (not in the same page) If they want to over write the file. Here are a few option
upload the file with a temporary name (ie time of upload) and if exists ask the user to overwrite or rename. The next page will take the file and change it.
Give the user the option to overwrite if exists before they upload the file. If they didn't check it and it exists, return an error the file already exists.
<SCRIPT LANGUAGE="JavaScript"> var response = confirm('The file "<?=$upload?>" already exists would you like to overwrite?'); if (response) { location.href = "confirm_overwrite.php?ID=SOME_ID_TO_IDENTIFY_THE_FILE"; } // otherwise show the page with a new name </SCRIPT>
-
I assume xajax sets the body cursor to an hour glass when it runs an ajax request. Search the JS code for "cursor" and you might find the solution.
Just downloaded the code and they have an option to set it off
in the xajax_core_uncompressed.js line 62 (line 5 in the compressed version)
xajax.config.setDefault('waitCursor', false);
You might've turned it to true somewhere in your script
or comment the following code in the compressed version
update:function(){return{onWaiting:function(){if(xajax.config.baseDocument.body)
xajax.config.baseDocument.body.style.cursor='wait';},
line 18
-
try this
<marquee>Some Text</marquee>
-
-
-
search for setTimeout
example
alert("hello"); setTimeout("alert('world')", 5000);
-
If the files on your computer (local drive) this might not work
if (http.status == 200)
-
Hi, I made a site that help webmasters convert text to png using AJAX and got a lot of request to make a standalone script. I finally got the time to release the first beta edition.
If possible, could you guys go through it and let me know if you find any problems with the code. Also, any comments on improving the performance will be handy.
here is the site
standalone solution
http://www.text2png.com/code_standalone.php
Thanks
Sam
-
change the onchange to oncilck
-
the form name or is can't start with a number
name = '5_min_test'
you can change it to
name = 'five_min_test'
-
To stop the event, you have to use "return" in your event call
example
function checkForm(){ if (something) return false; return true; } onSubmit event <form onsubmit="return checkForm();" onClick event <input type="submit" onclick="return checkForm();"
-
yeah, head will work.
-
<div id="my_vertical_txt"></div> <script type="text/javascript"> var str = "TEXT"; var txt = ""; for (i=0; i<str.length; i++) txt += str.charAt(i)+"<br />"; document.getElementById('my_vertical_txt').innerHTML = txt; </script>
Not tested.
-
body will work, but it won't be a valid html document (for W3C validation)
-
In The head section add something like this
<noscript><meta http-equiv="refresh" content="0;url=http://yourdomain.com/JS_IS_A_MUST.html"></noscript>
This will redirect to JS_IS_A_MUST.html where you can explain why JS must be enabled.
Be carefull with this implementation, Seach engines will NOT be able to spider your pages that contain this tag.
-
innerText is only IE
use something like this
document.getElementById('size').setAttribute('value', selects.options[selects.selectedIndex].text);
-
addEventListener = Firefox
attachEvent = IE
-
You have a few issues with your code
i.class = "buttons";
To assign a class name to an object, you should use className, so your code will be
i.className = "buttons";
if (a = true)
First a is an object (not a boolean) assuming it's an input field you can access it's value using the value attribute
a.value
for comparson use the douple == signs otherwise the statment will always be true since it's only assigning true to a
Finally, all input values are strings so to compare it to a boolean will return false. Your if statment should look like this
if (a.value == "true") {
-
I tested your code an it works fine, could be a problem with something else in your code. Try to isolute all the events and try them one by one to see what's causing the issue.
-
you can loop through a string using it's length property and charAt() method
e.g.
var str = "hello world"; for (i=0; i<str.length; i++){ if (str.charAt(i) == " ") alert("space"); }
Not tested
how to use noscript to direct the user to other page & how to save value??
in Javascript Help
Posted