Try this it'll give you a form, intercept the form submission and instead
do an ajax call to the validate page which checks the email and password
and if that's correct will return True and the page will get forwarded via
JS to the next page with your email & password in the URL as args.
Why do
good day great folks..i've been encountering same problem here..i have 2
variables in my function to pass in my controller...i just cant do it right
trying lot of options already..here's my code:
$(function() {
$('#client-login').bind('submit',function(event){
var email = $(
Thank you, Anthony.
document.getElementById('url_with_params').href = "{{=URL('action')}}" +
"/" + param1 ;
is working fine.
>>
Thank you, Bruce.
document.getElementById('url_with_params').href = "{{=URL('action')}}" +
"/" + param1 ;
is working fine.
>
If param1 and param2 are from javascript:
1) You can not write the code in headers as you have current written you
will have to use something like the following:
// javascript function:
function generateURL(param1, param2) {
url = '/action/' + param1 + "/" + param2;
$("url_with_params"
>
> both
>
>
>
> and
>
>
>
>
> are not working ( they are not showing the values of param1 and param2 )
>
You are simply putting the literal strings "param1" and "param2" directly
into your HTML there, so of course the values of those variables won't be
shown. What are param1 and pa
>
> let me brief what i am doing. I am building an application accessing
> google maps api v3. I need the function that decide if a certain point is
> within certain bounds. my understanding is that i need to do that in the
> view ( by passing the point and the coordinates of the bounds ). the
both
and
are not working ( they are not showing the values of param1 and param2 )
>
I wasn't suggesting he should use the URL() function, just pointing out
that it *can't* be used to build a URL on the client side, and showing a
simple example of how to build a URL on the client side via Javascript (use
of the URL() function was incidental and not central to the point of the
e
You do realise that you are missing the closing >?
Also what you are trying to do in this code will never work.
becomes
/param1/param2
Try this:
On Sun, May 20, 2012 at 7:09 PM, Ashraf Mansour wrote:
> thank you for your interest.
>
> let me brief what i am doing. I am building
thank you for your interest.
let me brief what i am doing. I am building an application accessing google
maps api v3. I need the function that decide if a certain point is within
certain bounds. my understanding is that i need to do that in the view ( by
passing the point and the coordinates of
Well honestly if it was a dynamic link I wouldn't even use URL as good
style of JS programming is putting the code in a .js if this is the case
then the web2py parser cannot even access the URL to parse it. (At least I
have never been successful with that process.)
If they are getting the params a
He said param1 and param2 are determined on the client side -- which means
they cannot be set on the server side by web2py. Of course, I don't know
what he's actually doing on the client side, so this exact code may or may
not be relevant. Do you have an alternative suggestion?
Anthony
On Sund
Why would you do the code like that?? [?]
Updated:
jQuery(function() {
var param1 = 'hello'
var param2 = 'world'
jQuery('a#mylink').attr('href', '{{=URL("action", args=["' + param1 +
'","' + param2 + '"])}}');
});
{{=A('...', _href='', _id='mylink')}}
On Sun, May 20, 2012 at 4:36 PM, Ant
On Sunday, May 20, 2012 3:43:38 PM UTC-4, Ashraf Mansour wrote:
>
> thanks for the immediate reply.
>
> param1 and param2 are determined on the client side.
>
> how can it be generated by javascript?
>
>
It depends. Here's one example:
jQuery(function() {
var param1 = 'hello'
var param2 = '
thanks for the immediate reply.
param1 and param2 are determined on the client side.
how can it be generated by javascript?
>
>>>
thanks for the immediate reply.
param1 and param2 are determined on the client side.
how can it be generated by javascript?
On Sunday, May 20, 2012 10:05:10 PM UTC+3, Anthony wrote:
>
> On Sunday, May 20, 2012 1:18:44 PM UTC-4, Ashraf Mansour wrote:
>>
>> I tried this
>>
>>
>>
>> and it did no
On Sunday, May 20, 2012 1:18:44 PM UTC-4, Ashraf Mansour wrote:
>
> I tried this
>
>
>
> and it did not work.:)
>
> what is the right way of doing it?
>
A() doesn't produce a URL -- it produces an anchor tag (i.e., ...), to which you are then appending "/param1/param2",
which obviously doesn't w
{{=URL('controller','action', args=[arg1, arg2])}}
On May 20, 2012 10:18 AM, "Ashraf Mansour" wrote:
> I tried this
>
>
>
> and it did not work.:)
>
> what is the right way of doing it?
>
> On Saturday, December 3, 2011 7:37:58 PM UTC+3, Anthony wrote:
>>
>>
I tried this
and it did not work.:)
what is the right way of doing it?
On Saturday, December 3, 2011 7:37:58 PM UTC+3, Anthony wrote:
>
>
I think this is an important topic, And needs to be highlighted in the book
and by example.
On Saturday, December 3, 2011 7:10:59 PM UTC+3, Vineet wrote:
>
> I referred to the below-mentioned thread (but could not reply to it).
>
>
> https://groups.google.com/group/web2py/browse_thread/thread/61d
@Brian,
Thanks. I will experiment with this plugin.
Looks like very interesting stuff.
--- Vineet
On Dec 5, 6:16 am, Brian M wrote:
> Vineet,
>
> My copy of jQuery.query.js is attached - I'm assuming since it's released
> under the WTFPL the author won't mind :D
>
> You may also want to look at
Vineet,
My copy of jQuery.query.js is attached - I'm assuming since it's released
under the WTFPL the author won't mind :D
You may also want to look at these:
http://stackoverflow.com/questions/2053157/how-to-use-jquery-to-manipulate-the-querystring
http://stackoverflow.com/questions/4344405/jqu
Ignore my comment... I missed the context.
On Dec 4, 12:33 pm, Massimo Di Pierro
wrote:
> what's wrong with?
>
> {{=URL(...,vars=dict(p1=param1,p2=param2))}}
>
> On Dec 4, 2:14 am, Jonathan Lundell wrote:
>
>
>
>
>
>
>
> > On Dec 3, 2011, at 11:32 PM, Vineet wrote:
>
> > > @Anthony, thanks. Your
what's wrong with?
{{=URL(...,vars=dict(p1=param1,p2=param2))}}
On Dec 4, 2:14 am, Jonathan Lundell wrote:
> On Dec 3, 2011, at 11:32 PM, Vineet wrote:
>
> > @Anthony, thanks. Your method worked.
> > Secondly, if I want to pass arguments by name, would it be okay to do
> > something like this--
On Dec 3, 2011, at 11:32 PM, Vineet wrote:
> @Anthony, thanks. Your method worked.
> Secondly, if I want to pass arguments by name, would it be okay to do
> something like this>>
>
> {{=URL(...)}} + '/' + 'p1=' + param1 + '/' + 'p2=' + param2
Almost. You want:
{{=URL(...)}} + '?p1=' + para
@Anthony, thanks. Your method worked.
Secondly, if I want to pass arguments by name, would it be okay to do
something like this>>
{{=URL(...)}} + '/' + 'p1=' + param1 + '/' + 'p2=' + param2
@Brian, I would be interested & grateful to you if you can send me a
copy of jQuery.query
(as mention
Brian,
Yes. I would be interested & grateful to you if you can send me a copy
(as mentioned by you).
Thanks,
Vineet
On Dec 4, 3:53 am, Brian M wrote:
> I've used a jQuery plugin called jQuery.query that can manipulate URLs. If
> memory serves correct you do something along the lines of
> $.quer
Thanks Anthony. That worked.
Secondly, if I want to pass arguments by name, would it be okay to do
something like this>>
{{=URL(...)}} + '/' + 'p1=' + param1 + '/' + 'p2=' + param2
---Vineet
On Dec 3, 9:37 pm, Anthony wrote:
> >
I've used a jQuery plugin called jQuery.query that can manipulate URLs. If
memory serves correct you do something along the lines of
$.query.set('var', value) to set querystring values. And $.query.get('var')
to retrieve.
Sadly the jQuery team seems to have taken down the jQuery plugins site a
On Saturday, December 3, 2011 3:48:06 PM UTC-5, lyn2py wrote:
>
> You can try: {{URL('static','action',args=[param1,param2])}}
No, param1 and param2 are Javascript variables set on the client side, but
the URL function is called on the server side before the page is delivered.
So, param1 and pa
You can try: {{URL('static','action',args=[param1,param2])}}
On Dec 4, 12:10 am, Vineet wrote:
> I referred to the below-mentioned thread (but could not reply to it).
>
> https://groups.google.com/group/web2py/browse_thread/thread/61d57e887...
>
> My question is ---
> If I have two javascript v
>
>
33 matches
Mail list logo