Page 2 of 2

Telephone number formatting

Posted: Fri Jul 18, 2014 3:05 am
by Yurii Orishchuk

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.


Telephone number formatting

Posted: Thu Sep 11, 2014 1:11 am
by Arjang Raoufinia

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


Telephone number formatting

Posted: Thu Sep 11, 2014 2:20 am
by Yurii Orishchuk

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.


Telephone number formatting

Posted: Thu Sep 11, 2014 2:23 am
by Arjang Raoufinia

I used the International Telephone Input ...

Thanks,


Telephone number formatting

Posted: Thu Sep 11, 2014 4:01 am
by Yurii Orishchuk

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.