php-general Digest 20 May 2013 16:40:33 -0000 Issue 8238

Topics (messages 321140 through 321147):

pass parameter via URL
        321140 by: iccsi
        321141 by: shiplu
        321142 by: Jim Giner
        321143 by: iccsi
        321144 by: iccsi
        321145 by: shiplu
        321146 by: Jim Giner

Symfony?
        321147 by: Tedd Sperling

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message --- I would like to know how can I pass a parameter via URL using control value on the form.
something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,

Regards,

Iccsi
--- End Message ---
--- Begin Message ---
On Mon, May 20, 2013 at 7:17 PM, iccsi <inu...@gmail.com> wrote:

> I would like to know how can I pass a parameter via URL using control
> value on the form.
> something like myPage.php?MyID=txtMyID.value
> I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.
>
> Your help and information is great appreciated,
>
>
This is more a js question. Because form.controlname.value is only
available in javascript. A similar question I answered long ago on
Stackoverflow is
http://stackoverflow.com/questions/9009311/get-change-remove-url-parameters-with-jquery/9009558#9009558

And here is function I wrote that does it using pure javascript.
http://shiplu.mokadd.im/61/parse-query-string-by-pure-javascrirpt/



-- 
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader

--- End Message ---
--- Begin Message ---
On 5/20/2013 9:17 AM, iccsi wrote:
I would like to know how can I pass a parameter via URL using control
value on the form.
something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,

Regards,

Iccsi
Yes - this is a JS question.  But - the answer is:

var url="myPage.php?MyID="+txtMyId.value;

Now the variable 'url' contains your url

--- End Message ---
--- Begin Message ---
Thanks for the message and helping,
Your js looks like to parse URL.
Please let me know if I am wrong,
Do you have any code to generate the URL parameter using control value?

Thanks again for helping,

Iccsi,


"shiplu" wrote in message news:cado5mdcvbrquxcviuay9fvajjb+6ba872lbhrrhtdd8bjoa...@mail.gmail.com...

On Mon, May 20, 2013 at 7:17 PM, iccsi <inu...@gmail.com> wrote:

I would like to know how can I pass a parameter via URL using control
value on the form.
something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,


This is more a js question. Because form.controlname.value is only
available in javascript. A similar question I answered long ago on
Stackoverflow is
http://stackoverflow.com/questions/9009311/get-change-remove-url-parameters-with-jquery/9009558#9009558

And here is function I wrote that does it using pure javascript.
http://shiplu.mokadd.im/61/parse-query-string-by-pure-javascrirpt/



--
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader
--- End Message ---
--- Begin Message ---
Thanks a million for helping,
I just need to have a JS function to return a string var which contains my variable from sending page and call the function onClick on the button.
Please let me know if I am wrong,
Thanks again for helping,

Regards,

Iccsi,

"Jim Giner"  wrote in message news:40.54.04612.03b2a...@pb1.pair.com...

On 5/20/2013 9:17 AM, iccsi wrote:
I would like to know how can I pass a parameter via URL using control
value on the form.
something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,

Regards,

Iccsi
Yes - this is a JS question.  But - the answer is:

var url="myPage.php?MyID="+txtMyId.value;

Now the variable 'url' contains your url
--- End Message ---
--- Begin Message ---
On Mon, May 20, 2013 at 7:49 PM, iccsi <inu...@gmail.com> wrote:

> Thanks for the message and helping,
> Your js looks like to parse URL.
> Please let me know if I am wrong,
> Do you have any code to generate the URL parameter using control value?
>
> Thanks again for helping,
>
> Iccsi,
>
>
> "shiplu"  wrote in message news:**CADO5mDCVbRquXCviuaY9fVajJb+**
> 6Ba872LbHrRHTdD8bJOATLg@mail.**gmail.com...
>


You can generate the url using string concatenation operator +.

To keep it consistent and out of error you need to reverse the same
function i have given then you can perform both. The idea is there.

-- 
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader

--- End Message ---
--- Begin Message ---
On 5/20/2013 10:06 AM, iccsi wrote:
Thanks a million for helping,
I just need to have a JS function to return a string var which contains
my variable from sending page and call the function onClick on the button.
Please let me know if I am wrong,
Thanks again for helping,

Regards,

Iccsi,

"Jim Giner"  wrote in message news:40.54.04612.03b2a...@pb1.pair.com...

On 5/20/2013 9:17 AM, iccsi wrote:
I would like to know how can I pass a parameter via URL using control
value on the form.
something like myPage.php?MyID=txtMyID.value
I can use myPage.php?MyID=1, but cannot use
myPage.php?MyID=txtMyID.value.

Your help and information is great appreciated,

Regards,

Iccsi
Yes - this is a JS question.  But - the answer is:

var url="myPage.php?MyID="+txtMyId.value;

Now the variable 'url' contains your url

Then put my sample statement in the function that your onclick= is calling. Although - I don't know what you mean by 'sending page'. This all has to be done in the same page. Or if you want the 'value' to be sent to the 'myPage.php' script, you could just make 'txtMyID' a hidden input field and use a POST action instead of a GET.
--- End Message ---
--- Begin Message ---
Hi gang:

Who uses Symfony?

Cheers,

tedd


_____________________
t...@sperling.com
http://sperling.com


--- End Message ---

Reply via email to