Message from discussion
Passing params to evaluate as variables
Date: Thu, 8 Nov 2012 07:14:47 -0800 (PST)
From: kanux02 <nmusa...@gmail.com>
To: casperjs@googlegroups.com
Message-Id: <043e4cd1-c9d0-4eda-90f8-8c8ebb826033@googlegroups.com>
Subject: Passing params to evaluate as variables
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_2906_21778041.1352387687846"
------=_Part_2906_21778041.1352387687846
Content-Type: multipart/alternative;
boundary="----=_Part_2907_11806232.1352387687846"
------=_Part_2907_11806232.1352387687846
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
On Thursday, November 8, 2012 7:12:59 PM UTC+4, kanux02 wrote:
>
> hi. Here
index = 4;
> casper.evaluate(function(id) {
>
> document.querySelector('#phone').setAttribute('value',phone);
> }, {
> id : index
>
> });
>
>
why here index isnt passed should I use closures ot smth like that?
------=_Part_2907_11806232.1352387687846
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
On Thursday, November 8, 2012 7:12:59 PM UTC+4, kanux02 wrote:<blockquote c=
lass=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width:=
1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padd=
ing-left: 1ex;">hi. Here</blockquote><div><br></div><div>index =3D 4; =
</div><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex;=
border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left=
-style: solid; padding-left: 1ex;"><div><span style=3D"font-family: Consola=
s, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', =
'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-col=
or: rgb(238, 238, 238); color: rgb(0, 0, 0); font-size: 14px; line-height: =
18px;">casper.evaluate(function(id) {</span><pre style=3D"margin-bottom: 10=
px; padding: 5px; font-size: 14px; background-color: rgb(238, 238, 238); fo=
nt-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'D=
ejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, ser=
if; overflow: auto; width: auto; max-height: 600px; color: rgb(0, 0, 0); li=
ne-height: 18px;"><code style=3D"font-family: Consolas, Menlo, Monaco, 'Luc=
ida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans M=
ono', 'Courier New', monospace, serif;">document.querySelector('#<wbr>phone=
').setAttribute('value',<wbr>phone);
}, {=20
id : index
});</code></pre></div></blockquote><div><br></div><div><br></div><div>why h=
ere index isnt passed should I use closures ot smth like that?<=
/div>
------=_Part_2907_11806232.1352387687846--
------=_Part_2906_21778041.1352387687846--