Possible to make a button that presses the enter key?

MarketerX

Regular Member
Mar 7, 2010
404
125
Hey guys, title says everything. I want to make a submit button that "presses" the enter key on the keyboard to submit a form.

I have my reasons for needing a button that does this, it's actually quite important that I figure this out..

Anyone care to enlighten me here? I'm guessin its some JS code...?
 
Add to button simple JS code for onclick event:
Code:
document.form_id.submit();

Will this press the enter button? My button that I want to make is actually located on a different HTML page than my form. My form is within an iframe. Does this make sense??? :)

Can i get the form ID from the iframed page and have my submit button work? I'm guessing no...
 
If both sites are located in the same domain or you have acces to both sites sourcecodes - You can do that. If no - there is no way.
OFC you can try clickjacking but it's illegal and we dont like illegal stuf :)
 
Yeah clickjacking isn't illegal.

Call it by its "Legit" name.. UI Redressing..

And yes I have access to the iframed pages source and can get the FORM's ID.

I will give this a try and let ya know how it works...thanks guys..
 
ok ok its not illegal in 100%. But most action maked by clickjacking are fraudently (illegal).
 
the other way to do it is have a onkeypress event handler in javascript and detect the keycode for enter.
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock