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 

java

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



Joined: 18 Apr 2007
Posts: 127

PostPosted: Sun Jan 04, 2009 3:54 am    Post subject: java Reply with quote

not AHK related but...

hi, i wounder how (if possible) to make to javascript on one url link


can i make this do both on one singel attempt when i enter it in the adress?
Code:
javascript:window.open("http://google.com",'mywin','left=20,top=20,width=1,height=1,toolbar=1,resizable=0');
; and
javascript:with(document.forms[0]){elements[1].value="text";submit();void(0)}


know there is better way to search goggle directly but this is just a example for me to learn if it can do two things or not
_________________
you'll have to excuse me...I'm from Sweden, so my English is not that good...(but now it's better cuz JSLover/Guest is helping me)...
Back to top
View user's profile Send private message Send e-mail MSN Messenger
tank



Joined: 21 Dec 2007
Posts: 3700
Location: Louisville KY USA

PostPosted: Sun Jan 04, 2009 4:36 am    Post subject: Reply with quote

ok where to start
first of all none of this is meant to make me an ass but its just gonna come out that way
first of all
the title java has nothing to do with javascript which incedently also has nothing to do with AHK

Why would you post this hear
sigh
Code:
javascript:window.open("http://google.com",'mywin','left=20,top=20,width=1,height=1,toolbar=1,resizable=0');with(document.forms[0]){elements[1].value="text";submit();void(0)}

I honestly have no clue what you are trying to do and in what context so my next help is here
How To Ask Questions The Smart Way
Please if your going to waste our time with unrelated Questions try structureing a question explain not only what you have but what you hope to accomplish.
we see your JavaScript and no one knows are these executed on the same page? if we assume yes then the answer no matter that it feels yucky is correct
I would render a guess that the second javascript is actually executed on the new window if so the answer is different and you might check in some JavaScript forums Wink
but you give us no described end result and no context ??
JavaScript executed via bookmarklets can be entered up to 1024 characters in IE7 each statement separated by a semi colon

Please i hope you take this as a learning experience and not an attack but in the end the message is the same
just to proove im not an ass here is an alternate for executing on new window
I have not and will not test this nor will i help you debug it either
Code:
javascript:window.open("http://google.com",'mywin','left=20,top=20,width=1000,height=1000,toolbar=1,resizable=0');window.open("javascript:with(document.forms[0]){elements[1].value=\"text\";submit();void(0)}",'mywin','left=20,top=20,width=1,height=1,toolbar=1,resizable=0');

_________________

We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Back to top
View user's profile Send private message
Frankie



Joined: 02 Nov 2008
Posts: 2850

PostPosted: Sun Jan 04, 2009 8:34 pm    Post subject: Reply with quote

Well put. Any more questions about this can be directed to forums such as the below:
http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s
http://www.jsworkshop.com/bb/
http://codingforums.com/forumdisplay.php?f=2
http://www.tek-tips.com/threadminder.cfm?pid=216

For additional forums try a google search like...
http://www.google.com/search?rlz=1C1CHMI_enUS302US305&sourceid=chrome&ie=UTF-8&q=javascript+forums
_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run
Back to top
View user's profile Send private message
Display posts from previous:   
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