NimbleKit - fast iOS app development

Freelancer required for Javascript to Resize Images

Anything about NimbleKit SDK

Freelancer required for Javascript to Resize Images

Postby MyGunJammed » Sun Feb 20, 2011 4:28 am

I am looking for a programmer to write a short javascript code that I can use in my Nimblekit App. I need the code to load different sized image (within the HTML body) based on whether the USER is operating an Iphone or an Ipad?

Because the Iphone and Ipad have extremely different viewing areas I would create two images from the same image. One smaller image for the iphone and a larger image for the Ipad. The javascript would just have to load the correct image, which will be embedded into the HTML code and aligned with CSS. There could be a couple images on the same page.

I would need to purchase the javascript and the programmer would have to explain how to install it correctly. I will pay 50 US dollars - that number could be negotiable if it's not fair - I simply do not know how long it would take an experienced javascript programmer to write this code up. I could pay with Paypal. Also negotiable if programmer requires other means of payment.

Send me a message, or post, if interested. If you have questions about this project please ask me.


I will include the following code example to attempt to show what I need done. Thanks!

Code: Select all
  
// Iphone device - normal sized image
<p>The apple is the pomaceous fruit of the apple tree.  It is one of the most widely cultivated tree fruits.  <img src="apples.png" alt="apples" /></p>


//  Ipad device - large sized image
<p>The apple is the pomaceous fruit of the apple tree.  It is one of the most widely cultivated tree fruits.  <img src="big_apples.png" alt="apples" /></p>

//  Note: how only the images are different.   I don't want to have two of each page.  I would rather have one HTML page with a Javascript image code that determines the device and loads the correct image. 



See this link for additional reference:
viewtopic.php?f=6&t=2263
MyGunJammed
 
Posts: 40
Joined: Mon Feb 07, 2011 4:53 am

Re: Freelancer required for Javascript to Resize Images

Postby fernandovalente » Sun Feb 20, 2011 5:47 pm

First of all, you will need to assign a id to your img tag. For example:

Code: Select all
<img id="apple" />


Use NKGetDeviceType to find out which device you're using. Then change the src attribute value.
Code: Select all
function changeImages(){
         if (NKGetDeviceType().indexOf("iPad")>-1){
                  document.getElementById("apple").setAttribute("src", "applebig.png");
         }
         else {
                  document.getElementById("apple").setAttribute("src", "apple.png");
         }
}


Also, add this function to the onLoad attribute on your body tag.

Code: Select all
<body onLoad="changeImages()">


My 2 cents.
fernandovalente
 
Posts: 122
Joined: Thu Jun 04, 2009 9:59 pm

Re: Freelancer required for Javascript to Resize Images

Postby fernandovalente » Sun Feb 20, 2011 5:48 pm

First of all, you will need to assign a id to your img tag. For example:

Code: Select all
<img id="apple" />


Use NKGetDeviceType to find out which device you're using. Then change the src attribute value.
Code: Select all
function changeImages(){
         if (NKGetDeviceType().indexOf("iPad")>-1){
                  document.getElementById("apple").setAttribute("src", "applebig.png");
         }
         else {
                  document.getElementById("apple").setAttribute("src", "apple.png");
         }
}


Also, add this function to the onLoad attribute on your body tag.

Code: Select all
<body onLoad="changeImages()">


My 2 cents.
fernandovalente
 
Posts: 122
Joined: Thu Jun 04, 2009 9:59 pm

Re: Freelancer required for Javascript to Resize Images

Postby MyGunJammed » Sun Feb 20, 2011 6:11 pm

That's the stuff. Seems to be working. Do you have a paypal account? If so, please give me the email to use for it.
MyGunJammed
 
Posts: 40
Joined: Mon Feb 07, 2011 4:53 am

Re: Freelancer required for Javascript to Resize Images

Postby fernandovalente » Sun Feb 20, 2011 6:16 pm

MyGunJammed wrote:That's the stuff. Seems to be working. Do you have a paypal account? If so, please give me the email to use for it.


Well, you don't have to pay me... however I will make no objection to that in case you really want to do that :D

PayPal: [e-mail removed]
Last edited by fernandovalente on Sun Feb 20, 2011 6:24 pm, edited 1 time in total.
fernandovalente
 
Posts: 122
Joined: Thu Jun 04, 2009 9:59 pm

Re: Freelancer required for Javascript to Resize Images

Postby MyGunJammed » Sun Feb 20, 2011 6:20 pm

I have transfered $50.00 to your paypal account. You can edit out your email in the message above if you wish. If you could, please acknowledge here that you received the payment. I appreciate your help. It will save me a lot of time. If I have other requests I will make them on this forum. Thank you again for your help.
MyGunJammed
 
Posts: 40
Joined: Mon Feb 07, 2011 4:53 am

Re: Freelancer required for Javascript to Resize Images

Postby fernandovalente » Sun Feb 20, 2011 6:24 pm

MyGunJammed wrote:I have transfered $50.00 to your paypal account. You can edit out your email in the message above if you wish. If you could, please acknowledge here that you received the payment. I appreciate your help. It will save me a lot of time. If I have other requests I will make them on this forum. Thank you again for your help.


I got the money! Thank you so much :D
fernandovalente
 
Posts: 122
Joined: Thu Jun 04, 2009 9:59 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests