nitzanly
Posts: 0
Joined: Sun Jan 22, 2012 5:40 pm

Open URL

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Open URL

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..

nitzanly
Posts: 0
Joined: Sun Jan 22, 2012 5:40 pm

Open URL

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Open URL

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/

nitzanly
Posts: 0
Joined: Sun Jan 22, 2012 5:40 pm

Open URL

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Open URL

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

nitzanly
Posts: 0
Joined: Sun Jan 22, 2012 5:40 pm

Open URL

Dowww I forgot I changed the name

Thanks again
Nitzan

Return to “Issues”