Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #1523
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin3!goblin.stu.neva.ru!newsfeed2.funet.fi!newsfeeds.funet.fi!uio.no!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="UTF-8" |
| Message-Id | <4283243.ZASKD2KPVS@PointedEars.de> |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <php@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Wed, 11 May 2011 16:31:05 +0200 |
| User-Agent | KNode/4.4.7 |
| Content-Transfer-Encoding | 8Bit |
| Subject | Re: error while call php function in javascript? |
| Newsgroups | comp.lang.php |
| References | <3ece3c5d-94b1-4fea-9af7-08657b1eaae5@d19g2000prh.googlegroups.com> <215ls6ppav5asq72thq1qobc6k4bmiea2l@4ax.com> |
| Followup-To | comp.lang.php |
| MIME-Version | 1.0 |
| Lines | 31 |
| NNTP-Posting-Date | 11 May 2011 16:31:08 CEST |
| NNTP-Posting-Host | 4e063e38.newsspool3.arcor-online.net |
| X-Trace | DXC=Q9J8dgT0nG0nBOkdL^Lo7>McF=Q^Z^V384Fo<]lROoR18kF<OcfhCO;N0[:CD9KV>0DZm8W4\YJN<m`dM^Igo6:7`3P^E\P9_E7HkI7PeH9oh6 |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.php:1523 |
Followups directed to: comp.lang.php
Show key headers only | View raw
Jeff North wrote:
> Amit Prakash Pawar wrote:
>>| // Javascript
>>| [code]
>>| var my_url=document.getElementById('url').value;
>>|
>>| // my_url='http://www.test.com';
>>|
>>| var final_post_url=<?=encrypt_url(my_url)?>;
>>| alert(final_post_url);
>>| [/code]
>>| how to get correct encrypted data through java script?
>
> try (note the quotes placement:
> var final_post_url="<?=encrypt_url(my_url)?>";
But `my_url' still is the identifier of a *client-side* variable, which
exists only *after* PHP has parsed the code, substituted the `<?php … ?>'
sections, and returned the result to the Web server for it to include
it in its HTTP response.
Please do not post attribution novels.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
error while call php function in javascript? Amit Prakash Pawar <amitppawar2007@gmail.com> - 2011-05-11 05:10 -0700
Re: error while call php function in javascript? Tim Streater <timstreater@waitrose.com> - 2011-05-11 14:30 +0100
Re: error while call php function in javascript? Gregor Kofler <usenet@gregorkofler.com> - 2011-05-11 15:38 +0200
Re: error while call php function in javascript? Jeff North <jnorthau@yahoo.com.au> - 2011-05-11 23:51 +1000
Re: error while call php function in javascript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-05-11 16:31 +0200
csiph-web