I’ve been reading about XSS and I made a simple form with a text and submit input, but when I execute <script>alert();</script> on it, nothing happens, the server gets that string and that’s all. What do I have to do for make it vulnerable?? (then I’ll learn what I shouldn’t do hehe) Cheers. Answer Indeed just let the server output
Tag: html
Drag and drop an image from desktop to a web text editor (implementation in JavaScript)
I want to implement a web text editor able to recognize when the user drag a image file over it’s editing surface and it automa(gically) starts the upload and insert the image near the cursor position. In other words I don’t want the user to do the usual “insert->image->browse->ok”. At the moment I am not very good at JavaScript. I
Check if dropdown’s selected option is not the first with JavaScript
Below are the options that I have in my HTML code: I want to create JavaScript code that will check whether the user selected an option other than the first one. Here is what I tried: Answer You can check like this if nothing is the first option (usually the case in my experience): To still compare based on the
Changing the type in IE with JavaScript
This code below works in all web browsers except IE: How can I fix it for IE? I did some changes, but it still has an error. I want it to work like this like here: if I don’t enter anything it will put the value back. So I tried this: as you can see the blur does not work.
Remove links with JavaScript in browser
How do I remove links from a webpage with JavaScript? I am using Google Chrome. The code I tried is: Of course, this is test code, which is why I have the alerts and 2 things trying at the same time. The first alert returns “0” the second [Object NodeList] and the third returns “done”. My html body looks like
How to submit form only once after multiple clicking on submit?
I am having problem that when i am trying to submit the form by clicking on the submit button it takes some time to post request during this if i am again click on the Submit button it will again send the all parameters and parametrs get saved twice, thrice ….so on. I don’t know how to limit the the
Refresh iFrame (Cache Issue)
We are getting a weird issue on which we are not sure what exactly cause it. Let me elaborate the issue. Suppose, we have two different html pages a.html and b.html. And a little script written in index.html: A server component is continuously updating both files a.html and b.html. The problem is the content of both files are successfully updating
jQuery’s offset() function
I know jQuery does most when it comes to cross-browser issues. I just wanted to know if offset() method of jQuery serves the purpose of cross-browser compatibility, I mean top, left, etc properties that can be derived from it? Basically once I apply top, left, etc properties (which are derived from offset() function) to an element, I need to make
browser back acts on nested iframe before the page itself – is there a way to avoid it?
I have a page with dynamic data loaded by some ajax and lots of javascript. the page contains a list from which the user can choose and each selected value loads new data to the page. One of these data items is a url provided to an iframe. I use jQuery BBQ: Back Button & Query Library to simulate the
When loading an html page via ajax, will script tags be loaded?
When you load an html document using AJAX, what does it do with the nodes inside the HEAD tag: (script,link,style,meta,title) ignore them or load and parse them? And in the case of jquery ‘s ajax() function? Answer When you call the jQuery.ajax() method, you can specify the dataType property, which describes what kind of data you are expecting from the