Well anyway, fourteen years old, and have to use a free host, and therefore I cannot access HTML. I got to do with JavaScript. But for some reason, this script won't work.
I want it to do the function "load", but for some reason it's not working, the pages aren't showing errors for me? :shrugs:
Code:<script> if(location.href.match('post/')){ document.write("<iframe style='display:none' id='ZBI' name='ZBI'></iframe>"); function load(){ post = document.getElementsByName('Post')[0].value; document.getElementById('ZBI').src = "(link removed)?post="+ post +""; } // Do "load" on Submit button = document.getElementsByTagName('button'); for(i=0;i<button.length;i++){ if(button[i].type == "submit" && button[i].innerHTML == "Submit Post"){ button[i].onClick = load break; } } </script>
my guess would be that the form fires the "submit()" and ignores the click event from the submit button
try running the "load" on the "onsubmit()" event of the form
"
form.onsubmit=load;
"
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
www.amrosama.com | the unholy methods of javascriptCode:eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
I don't have access to HTML.
This script only works in IE, so I really don't know what I'm doing wrong with poor Firefox.
why the sad face we are here
i found out how to fix it, i tried similar code and found out that this:
will not work with the "C" capital , i know this may sound crazy but its the reason try this, instead:Code:button[i].onClick = load
its tested and im sure of it, enjoyCode:button[i].onclick = load
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
www.amrosama.com | the unholy methods of javascriptCode:eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
Nope, it still only works on IE and Opera, but it still doesn't work on Firefox. I thought Opera was fussy with JavaScript. This is the first time I've had a problem with Firefox.![]()
can i have a link ?
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
www.amrosama.com | the unholy methods of javascriptCode:eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
I tried, it doesn't work, believe me
I just don't know why it won't though.
I highly suspect it's this part of code, but where >.<
Code:button = document.getElementsByTagName('button'); for(i=0;i<button.length;i++){ // Just thinking could it be if(button[i].type? if(button[i].type == "submit" && button[i].innerHTML == "Submit Post"){ button[i].onClick = load break;
hmm,
are you sure you are using "button" not "input"?
remove this " button[i].type == "submit" " and try, what happens?
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
www.amrosama.com | the unholy methods of javascriptCode:eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
I got it working on Firefox, because I did load() onclick instead of load.
But now, I'm having troubles getting a textarea value in a variable, Firefox issue only![]()
glad you got the first problem solved
i think it would be better to use innerHTML to get value of a textarea
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
www.amrosama.com | the unholy methods of javascriptCode:eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks