Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

lil help with javascript


ghost's Avatar
0 0

I was wondering wheni put this is the url

javascript:void(document.forms[0].to.value="myemail@domain.com")

it does not actually send the info to my email. When i alert the cookies with

javascript:alert(document.cookie)

it does not show that there has been any change. Is my script incorrect? are some websites just not succeptible to it? thx oin advance!


ghost's Avatar
0 0

are you trying to change the forms but alert them as a cookie? those are two different things. you also need a ; after them both.


ghost's Avatar
0 0

ok first, you change it like this: markupjavascript:void(document.forms[0].INPUT.value=&quot;myemail@domain.com&quot;); where INPUT is the name of the input. ie., with <input type="text" name="something"> the "name="something"" is what you put there. second, it doesn't necessarily save it to your cookies, so alerting your cookie isn't going to tell you anything. you could do this though: javascript:alert(document.forms[0].INPUT.value), where INPUT is again the name of the input.

also, some sites aren't vulnerable to this. for example, I've tried it on a site but they filter the input for the email.

hope this helps.


ghost's Avatar
0 0

it does help. thx a bunch to the both of ya!

edit: ummm… how do i know if the site is not succeptible? when i alert the form it does not do anything. anymore help would be appriciated!


ghost's Avatar
0 0

you can very easy make a script that will not let users create alerts.or let them create an alert,but just not let them alert what they want,just an alert that tells the users how noobish they are,trying t make alerts and stuff and that is't of no use to try it ^^


ghost's Avatar
0 0

when you alert the form it should tell you the new value of the input. if not, something's wrong with the javascript on your end. if you alert it and do see the new value (your email) you can go ahead and submit the form.


ghost's Avatar
0 0

EVERY site is succeptible to cookie modification, not sure about forms tho


ghost's Avatar
0 0

well yes you can change ANY form values/cookies you want through javascript. javascript is a client-side script, meaning you can do whatever you want with it, keep in mind YOU are the one sending the site data so you have the power to change whatever you want. (it's the same concept with user agent changers too – it's just your browser sending data to the server.)