Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Telephone number formatting

Alex,

Yes exactly.

For example here is a solution to get generated pdf onto the page:

1 Add HTML component, set dimmentions for it "auto" and "auto".

2 Fill component HTML with following code:

pre

<iframe width="100%" height="500px" id="pdfOutContainer"</iframe

/pre

3 Add button to the page and add JS click event handler with following code:

pre

console&#46;log("generating pdf&#46;&#46;&#46;");

var doc = new jsPDF();

doc&#46;text(20, 20, 'HELLO!');

doc&#46;setFont("courier");
doc&#46;setFontType("normal");
doc&#46;text(20, 30, 'This is a PDF document generated using JSPDF&#46;');
doc&#46;text(20, 50, 'YES, Inside of PhoneGap!');

var pdfUriString = doc&#46;output('datauristring');
console&#46;log(pdfUriString);

var pdfOutContainer = jQuery("#pdfOutContainer");
pdfOutContainer&#46;attr("src", pdfUriString);

/pre

That's all. After you clicked on the button you will get your PDF in the browser if it supports.

Regards.

Arjang Raoufinia
Posts: 0
Joined: Tue Sep 02, 2014 1:58 pm

Telephone number formatting

Yurii,
I have tried to format phone number as you described in this post and I am still having trouble implementing it.

Here is what I have done:
I have downloaded the JS from the link you mentioned:
http://jquery-plugins.net/tag/input-f...

Created a new js called phonenumber
copied the js code text from build/js/intTelinput.js into the js file phonenumber
created an input called phonenumber_input
created an event on the page "onload" to run the following:
jQuery('[name="phonenumber_input"]').phonenumber();

the page just hangs on loading...
What am I doing wrong? thanks,.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Telephone number formatting

Hi Arjang,

Here is lot of plugins by this link http://jquery-plugins.net/tag/input-f...

Please specify what exactly plugin you choose.

Regards.

Arjang Raoufinia
Posts: 0
Joined: Tue Sep 02, 2014 1:58 pm

Telephone number formatting

I used the International Telephone Input ...

Thanks,

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Telephone number formatting

Arjang,

Ok, this case you need:

1 Download file http://jackocnr.com/lib/intl-tel-inpu... and paste it in new JS asset.

2 Download file http://jackocnr.com/lib/intl-tel-inpu... and paste it in new CSS asset.(this is individual plugin requirement).

2 Add "page show" event handler with following code:

pre

&#47;&#47;Note: you should replace "mobiletextinput_85" with your input component name&#46;
Apperyio("mobiletextinput_85")&#46;intlTelInput({});

/pre

Regards.

Return to “Issues”