At the moment in just inserting the text into chrome using inspect element and then editing the HTML… but whenever i reload the page to run the script my code is removed , i just want to know how to run the script live on the web page as to get the text that changes every time you try and pass the level
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\’‘ at line 1
@Spoonisi : I think you just misunderstood what you are doing. (And there is nothing wrong in that.)
When your browser first loaded the page, it loaded the HTML code (that may or may not have javascript inside). You are free to edit your HTML code, affecting simultaneously the way the page looks. However when you reload the page, you reload it. That means that your browser downloads, and shows the original HTML code (that may or may not have javascript inside). All your changes has been discarded.
Be careful about the words you use:
[quote=Spoonisi]At the moment in just inserting the text into chrome using inspect element and then editing the HTML… but whenever i reload the page to run the script my code is removed [/quote]
(emphasis are mine)
You are talking about “text”, “HTML”, “script” and “code”. These are not the same thing; for me at least. I would use “text” for something that is not code. “HTML” and “script” (javascript I suppose) are two different languages, and “code” is a general term that could mean both of them in this context.
What you probably wanted to ask was how to run your javascript code. Well, you can’t just paste it into your HTML content and expect it to work; your browser may need a reason to run it (and it might be possible that some security mechanism forbid it too).
A proper way to run it is to use the Console
(or Javascript Console
). This is a component of the Developers Tools
that allows you to execute javascript code on the loaded page. This means that your code can interact with the content of the page. That being so, if you know a way to use javascript to grab the words displayed, sort them, write them in the answer section and submit the form, you can totally complete the level that way. (But eh, remember the five seconds limit? You better be quick, or use copy-paste.)
Hi i apologise for the way i worded that i see its quite confusing.
I am basically inserting to the HTML page and i see how it will not work.
ill try the correct method and see if i pass thank you very much for your input.
One last question tho, if i edit the time limit by inspecting the element and changing “5” to “10000” to give me 10000 seconds , will that allow me to still paste the new text and pass the level or does that just start a timer that doesnt affect the level itself?
?
@Spoonisi : No, that won’t work, because the real countdown is handled by the server. That means that the server sends the page to you and waits five seconds for you answer. The countdown you see is just an indication.
However, if the countdown was implemented in such a way that it was handled by javascript code, you might have been able to complete the level by editing the code (HTML and/or javascript).
?
http://www.w3schools.com/jsref/met_doc_getelementsbyname.asp
http://www.w3schools.com/jsref/dom_obj_textarea.asp
EDIT: Or you can read the following post.
EDIT: Or you can read the following posts.
Can be exists many elements with same name, like an array, you must specify. You must set value to textarea not innerHTML.