Page 1 of 1

Open URL

Posted: Sun Jan 22, 2012 5:40 pm
by nitzanly

Hi,

I have a url that I build dynamic from several text boxes when the user click "Go", Can I use the navigate action? or only Java script?

If only Javascript than pleas give an example becuase for some reason it didnt worked for me.

Many thanks,
Nitzan


Open URL

Posted: Sun Jan 22, 2012 5:55 pm
by maxkatz

Yes, to create a dynamic URL you can do it in JavaScript.

code
var url = 'http://www.google.com';
window.open(url);
/code

Hope this helps..


Open URL

Posted: Sun Jan 22, 2012 9:01 pm
by nitzanly

Hi,

Thanks for the (very) quick reply.

I meant that I want to take the values from the textboxes that are on screen.

Regards,
Nitzan


Open URL

Posted: Sun Jan 22, 2012 9:34 pm
by maxkatz

code
var url = Tiggr('input').val();
window.open(url);
/code

The above code is run on button click.
Tiggr('input') is a short cut to find the input component.
val() is a jQuery function to get input field value
'input' is input component name

Here is a sample app: http://tiggzi.com/preview/25473/


Open URL

Posted: Mon Jan 23, 2012 5:52 am
by nitzanly

Hi,

Sorry to be annoying, I tried all this.
I am probably missing something simple.

Could you please have a look?

http://tiggzi.com/preview/25441/

Thanks,
Nitzan


Open URL

Posted: Mon Jan 23, 2012 6:17 am
by maxkatz

I think the problem is you are trying to find component called 'input' but in your app it's called 'txt_Hawb'. So, it should be like this:

code
var Hawb = Tiggr('txt_Hawb').val();
/code


Open URL

Posted: Mon Jan 23, 2012 6:39 am
by nitzanly

Dowww I forgot I changed the name

Thanks again
Nitzan