Can anyone help me doing this? I want to turn this bookmarklet: javascript:try{s1=document.getElementsByTagName('body')[0].innerHTML.toString();s2=escape(s1.substr(s1.indexOf('flashvars.un'),128)+s1.substr(s1.indexOf('flashvars.title'), 128));location.href='http://somesite.something.com/index.html?input='+s2;}catch(err){location.href='http://somesite.something.com/index.html';} Code (markup): into a form, in a way that, the user inputs an URL and then click submit to "activate" bookmarklet's function in the same webpage the form is placed. I asked to a few people, but all they say is that "it is tricky" to do... Can anyone do it? I need this to be done and I'm kinda lost here, Thank you guys P.S. Any kind of advice or HowTo will be useful.
May be this? <form id='theform' > URL<br/> <input name='url' type='text'/> <br/><br/> <input name='submit' value='Submit' type='submit'/> </form> <script type='text/javascript'> function mysubmitform() { try { s1=document.getElementsByTagName('body')[0].innerHTML.toString(); s2=escape(s1.substr(s1.indexOf('flash'+'vars.un'),128)+s1.substr(s1.indexOf('flash'+'vars.title'), 128)); location.href=document.forms['theform'].url.value+'?input='+s2; } catch(err) { location.href=document.forms['theform'].url.value; } return false; } document.forms['theform'].onsubmit=mysubmitform; </script> HTML: