• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Open URL in Safari with Post params
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open URL in Safari with Post params


  • Subject: Re: Open URL in Safari with Post params
  • From: Simon Forster <email@hidden>
  • Date: Thu, 10 Nov 2011 21:17:20 +0000

No. That's using GET rather than POST. In theory GET's used when state isn't changed while POST may well change state somewhere.

Anyway, different.

S

On 10 Nov 2011, at 18:57, Emmanuel LEVY wrote:

> You mean, as in:
>
> open location "https://www.somewhere.net?firstname=fred&lastname=bert"; ?
>
> Emmanuel
>
> On Nov 10, 2011, at 6:21 PM, Simon Forster wrote:
>
>>
>> Hi
>>
>> Hoping someone can help me. I'd like to open a URL in Safari and submit some post params at the same time. I can achieve the end result quite easily using Safari's `do JavaScript` functionality:
>>
>> tell application "Safari"
>> 	activate
>> 	tell window 1 to set current tab to make new tab
>> 	do JavaScript "location = 'https://www.somwhere.net/';
>> 	onload = function() {
>> 		document.forms[0].item1.value = 'fred';
>> 		document.forms[0].item2.value = 'bert';
>> 		document.forms[0].submit();
>> 	}" in document 1
>> end tell
>>
>> But being an impatient blighter I find that waiting for the the first page to load is a waste of time. Why not go straight to the page I want, submitting the post parameters as I go - but I can't find the syntax.
>>
>> TIA for an pointers.
>>
>> Simon _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> AppleScript-Users mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> Archives: http://lists.apple.com/archives/applescript-users
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Open URL in Safari with Post params
      • From: Thomas Fischer <email@hidden>
References: 
 >Open URL in Safari with Post params (From: Simon Forster <email@hidden>)
 >Re: Open URL in Safari with Post params (From: Emmanuel LEVY <email@hidden>)

  • Prev by Date: Re: Open URL in Safari with Post params
  • Next by Date: Re: message reply content
  • Previous by thread: Re: Open URL in Safari with Post params
  • Next by thread: Re: Open URL in Safari with Post params
  • Index(es):
    • Date
    • Thread