How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask TheDoctor Your Own Question

TheDoctor
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1527
Experience:  M.S. in Internet Information Systems
59032869
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

**For TheDoctor** Need a new improved background function

Resolved Question:

**For TheDoctor** Need a new improved background function similar to the one you did earlier today


 


More details you can find on http://caxlo.com/bgimg.pdf

Submitted: 1 year ago.
Category: Homework
Expert:  TheDoctor replied 1 year ago.

Hello again! Thank you for requesting me.

The PDF you provided is a single page and all it says is to move the JS to a different file. Is that all you need done? Move the background changing code to a separate file while keeping all the other JavaScript code in the index file where it was to begin with?

Customer: replied 1 year ago.
Yea I just need if i press example presPart3 or 4 or 5 it needs to call the js file with the bg imasges function all the other code can stay but the image background function to be in a seperate file.

Thanks
Expert:  TheDoctor replied 1 year ago.
In the PDF you sent me, the code is presPart1, 2, and 3.

Are you saying that you want to add additional parts, or rename the existing parts? If what you want is to be able to add additional pages, then please let me know.
Customer: replied 1 year ago.
In 0,1,2 i will have different functions. In 3,4,5 will be the Background i need u to do. And I will have 6,7,8 I also will have different functions.

So if you could just do the bg function fo presPart3,4,5
Expert:  TheDoctor replied 1 year ago.
That is not what I need to know.

Will you be adding additional parts? As in, will index.html hae part 0, 1, 2, 3, 4, 5, 6, 7, 8?

Or will there be a DIFFERENT HTML FILE for parts 3, 4, 5, and a completely different HTML file for parts 6, 7, and 8?

Your answer completely changes the JavaScript code. So it is a very important distinction.
Customer: replied 1 year ago.
Yes the index will have additional parts
Expert:  TheDoctor replied 1 year ago.

Hello again!

Please download the files here:

http://wikisend.com/download/147112/newBG.zip

The code for the background is in the background JavaScript file.

I have altered it so that you can have as many pages as you want. Of course, the code needs initialized/called.

First, on line 27 of index.html, you will see:

setupBackground(3);

This tells the background code that there are a total of three pages with backgrounds.

Next, the code needs triggered whenever the page is changed. This is done at index.html at line 130:

updateBackground();

Now, let's say that you wanted to add a "Page4". You would change the integer passed into setupBackground to 4. You would also make certain that there is a bg13.jpg, bg14.jpg, and bg15.jpg in the images folder.

You can use this background JavaScript file in any page you want with however many images you want. You just need to 1.) pass to it the number of pages and 2.) call the updateBackground function on page change.

Customer: replied 1 year ago.

can we just change the links Page one: presPart1 to presPart3


Page two: presPart2 to prePart4 , and Page three: presPart3 to presPart5 links, because I have other function that will be called when calling prespart 0,1,2,


 


and the PresPart0 I just need a plain white background, When I click on it it changed the background too. I just need it to be the plain white background which is called from the bundle.css


 


I just need the presPart3 presPart4, presPart5 to call the background javascript image function.

Expert:  TheDoctor replied 1 year ago.
That is why I asked if was ADDITIONAL or if you wanted to CHANGE the names. The change is a completely different code that I have to write. And you replied additional, not the change, so I didn't write the code that you are now asking for. I have to rewrite it again. I'll let you know once it is done.
Customer: replied 1 year ago.

Im sorry I thought that I did mentioned that I have additional files and needed to be change.

Expert:  TheDoctor replied 1 year ago.
No, you've only mentioned 3, 4, 5, and made references to pages, which is not the name of a page, but of a link within a page. Then I specifically asked if there were separate files OR just additional items on the index, and you replied additional items on the index. So I wrote the code the opposite way of what you want.
Expert:  TheDoctor replied 1 year ago.

This will be ready shortly.

Expert:  TheDoctor replied 1 year ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1527
Experience: M.S. in Internet Information Systems
TheDoctor and 5 other Homework Specialists are ready to help you
Customer: replied 1 year ago.

I got an issue when adding pages. After I add pages prespart6,7 etc. The link button doesnt work and it won topen the pages 3,4,5. Here is my whole folder. www.caxlo.com/doneAgain.zip I just want prespart 3,4,5 to have images all the other pages will be different will have text I want them to be seperate I dont want to have to change nothing in the background.js file that file should just be for pages 3,4,5 all the rest should be able to do whatever

Expert:  TheDoctor replied 1 year ago.

Alright. The last thing you told me was that the presParts would be in different files. They are not, they are all in the same file. So that requires different code. Now that I have seen what you have done, the accurate description is: "All nine presParts are in the same file, the background functionality is to be applied to only three parts: 3, 4, and 5". That was never clear from anything you said.

I would need to know that, as having different parts within the same file means that you need to limit the application of the code to specific parts. Having parts in different files, which is what you told me, means that you can simply apply the code to the page without explicitly limiting its application. These kinds of details and distinctions are critical when programming, which is why I asked about the location of the other parts multiple times. If you are not a professional programmer, I can understand not being as nit-picky as someone like me. But the saying "the devil's in the details" is never more true than with programming.

 

I've made the changes and here are the files:

 

http://wikisend.com/download/167292/anotherVersion.zip

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3458
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3124
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2385
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1988
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1876
    Bachelors Degree and CPA with Accounting work experience
  • http://ww2.justanswer.com/uploads/avremote/photoa.jpg Seanna's Avatar

    Seanna

    Tutor

    Satisfied Customers:

    1781
    3,000+ satisfied customers, all topics, A+ work
 
 
 

Related Homework Questions