AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Shortening Bookmarklets

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Precise



Joined: 30 Dec 2007
Posts: 18
Location: East Coast

PostPosted: Sat Jul 12, 2008 7:47 pm    Post subject: Shortening Bookmarklets Reply with quote

When trying to use a javascript bookmarklet with an llbbrowse browser object in a gui, you may need to use something like this:

Code:

javascript:function D(a,b){c=b.split('|');d=false;for(q=0;q<c.length;q++){if(c[q]==a)d=true;}return d;}function E(){f0=document.forms[0];f0['avname'].value='aaaaaaaaaaaaaaaf';f0['password'].value='pass';f0['checkpassword'].value='pass';f0['bmonth'].value='02';f0['bday'].value='06';f0['byear'].value='1986';f0['email'].value='preciseisme@domain';f0['optin_newsletters'].checked=true;f0['captentry'].value='seminary';for(i=0;i<f0['EULA'].length;i++){if(D(f0['EULA'][i].value,'on')){f0['EULA'][i].checked=true;}}}E()


But when you enter it, nothing happens. The bookmarklet works fine in Firefox, but won't work in IE. It could be that IE is not cutting off the end of the bookmarklet. IE can only handle so many characters in the url box.

Code:

javascript:function D(a,b){c=b.split('|');d=false;for(q=0;q<c.length;q++){if(c[q]==a)d=true;}return d;}function E(){f0=document.forms[0];f0['avname'].value='somename';for(i=0;i<f0['EULA'].length;i++){if(D(f0['EULA'][i].value,'on')){f0['EULA'][i].checked=true;}}}E()


Last edited by Precise on Tue Jul 15, 2008 8:11 am; edited 2 times in total
Back to top
View user's profile Send private message
n-l-i-d
Guest





PostPosted: Sun Jul 13, 2008 8:51 am    Post subject: Reply with quote

Does it work from the addressbar in Internet Explorer?

You should use the newer COM version if you would like to add an IE-Window to your GUI, the lbbrowse-version is obsolete.

HTH
Back to top
Guest






PostPosted: Mon Jul 14, 2008 12:52 am    Post subject: Reply with quote

Nope, it does not work in the IE Explorer bar. That would explain it. The problem though is that it is too long. Is there any way around this?
Back to top
Precise



Joined: 30 Dec 2007
Posts: 18
Location: East Coast

PostPosted: Tue Jul 15, 2008 8:03 am    Post subject: Solved Reply with quote

By removing some of the fields and seperating the javascript into several smaller ones I was able to get these to work. I'm new to javascript so I had no idea what I was doing with it.
Back to top
View user's profile Send private message
BoBo²
Guest





PostPosted: Tue Jul 15, 2008 9:00 am    Post subject: Reply with quote

Quote:
IE can only handle so many characters in the url box [address field].
Your damn right. To be more specific, the number of characters the addressbar is able to handle depends on the IE release!

I would be interested too how to hand over complete (multiline) JavaScript functions that way, but I'm to stupid to find out how to make it work ... Sad
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group